diff --git a/.claude/hooks/inject-test-context.py b/.claude/hooks/inject-test-context.py new file mode 100755 index 00000000000..bcd8265b283 --- /dev/null +++ b/.claude/hooks/inject-test-context.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +""" +Injects modern test framework context when working on test files. + +Trigger: Read, Edit, or Write operations on files in src/test-modern/ ending with Test.java +Purpose: Provides BDD naming conventions, tag hierarchy, and test structure guidance to Claude +Source: docs/test/claude-test-context.md (single source of truth) + +Note: Assumes CLAUDE_PROJECT_DIR environment variable is set, falls back to /workspace +for devcontainer environments. +""" +import json +import sys +import os + + +def main(): + try: + data = json.load(sys.stdin) + except json.JSONDecodeError: + sys.exit(0) + + tool_input = data.get("tool_input", {}) + + # All three tools (Read, Edit, Write) use file_path for the target file + file_path = tool_input.get("file_path", "") + + # Only trigger for modern test files + if "src/test-modern" not in file_path or not file_path.endswith("Test.java"): + sys.exit(0) + + # Read context from the docs file (single source of truth) + project_dir = os.environ.get("CLAUDE_PROJECT_DIR", "/workspace") + context_file = os.path.join(project_dir, "docs/test/claude-test-context.md") + + try: + with open(context_file, 'r') as f: + context = f.read() + print(context) + except FileNotFoundError: + print("Warning: Test context file not found: docs/test/claude-test-context.md", file=sys.stderr) + print("Please read docs/test/test-writing-best-practices.md for test conventions.", file=sys.stderr) + except Exception as e: + print(f"Warning: Error reading test context: {e}", file=sys.stderr) + + sys.exit(0) + + +if __name__ == "__main__": + main() diff --git a/.claude/hooks/validate-owasp-encoding.py b/.claude/hooks/validate-owasp-encoding.py new file mode 100755 index 00000000000..6f488007f7f --- /dev/null +++ b/.claude/hooks/validate-owasp-encoding.py @@ -0,0 +1,274 @@ +#!/usr/bin/env python3 +""" +OWASP Encoding Validator Hook for Claude Code + +This hook validates that JSP and Java files use proper OWASP encoding +to prevent XSS vulnerabilities. + +Exit codes: +- 0: Safe patterns detected or non-applicable file +- 2: Unsafe patterns detected (blocks the operation with feedback) +""" + +import json +import re +import sys + + +def get_file_content_from_input(tool_input: dict) -> tuple[str, str]: + """Extract file path and content from tool input.""" + file_path = tool_input.get("file_path", "") + + # For Write tool, content is in 'content' field + # For Edit tool, new content is in 'new_string' field + content = tool_input.get("content", "") or tool_input.get("new_string", "") + + return file_path, content + + +def check_jsp_unsafe_patterns(content: str) -> list[str]: + """ + Check JSP content for unsafe EL expressions without OWASP encoding. + + Unsafe patterns: + - ${param.xxx} - raw parameter access + - ${requestScope.xxx} - raw request scope access + - ${sessionScope.xxx} - raw session scope access + - ${xxx} without Encode wrapper - any unencoded EL expression + + Safe patterns: + - ${Encode.forHtml(...)} + - ${Encode.forJavaScript(...)} + - ${Encode.forHtmlAttribute(...)} + - + - ${fn:escapeXml(...)} + """ + issues = [] + + # Pattern for raw EL expressions that are NOT inside Encode.for* or c:out + # This regex finds ${...} expressions + el_pattern = r'\$\{([^}]+)\}' + + # Safe wrappers that indicate proper encoding + safe_wrappers = [ + r'Encode\.for\w+\s*\(', # Encode.forHtml(), Encode.forJavaScript(), etc. + r'fn:escapeXml\s*\(', # JSTL escapeXml function + ] + + for match in re.finditer(el_pattern, content): + el_expr = match.group(0) + el_content = match.group(1) + + # Skip if this is inside a safe wrapper + is_safe = False + + # Check if expression uses safe encoding functions + for safe_pattern in safe_wrappers: + if re.search(safe_pattern, el_content): + is_safe = True + break + + if is_safe: + continue + + # Check if this ${} is inside a tag + # Look backwards from the match to find if we're in a c:out + start_pos = max(0, match.start() - 200) + context_before = content[start_pos:match.start()] + context_after = content[match.end():match.end() + 50] + + # Robust check: if or ) appears after + has_cout_open_before = '', context_after)) + has_cout_close_after = bool(re.search(r'', context_after)) + if has_cout_open_before and (has_self_closing_after or has_cout_close_after): + is_safe = True + + if is_safe: + continue + + # Check for high-risk expressions (user input) + high_risk_patterns = [ + r'param\.', # Request parameters + r'requestScope\.', # Request scope + r'sessionScope\.', # Session scope + r'cookie\.', # Cookies + r'header\.', # Headers + r'initParam\.', # Init parameters + ] + + is_high_risk = any(re.search(p, el_content) for p in high_risk_patterns) + + if is_high_risk: + issues.append( + f"CRITICAL: Unencoded user input in EL expression: {el_expr}\n" + f" This can lead to XSS vulnerabilities.\n" + f" Use: ${{Encode.forHtml({el_content})}} or " + ) + else: + # For other expressions, warn but be less strict + # Check if it looks like it might contain user data + if re.search(r'[Nn]ame|[Vv]alue|[Ii]nput|[Dd]ata|[Tt]ext|[Mm]essage|[Cc]omment', el_content): + issues.append( + f"WARNING: Potentially unsafe EL expression: {el_expr}\n" + f" If this contains user input, use OWASP encoding.\n" + f" Suggested: ${{Encode.forHtml({el_content})}} or " + ) + + return issues + + +def check_java_unsafe_patterns(content: str) -> list[str]: + """ + Check Java content for unsafe output patterns without OWASP encoding. + + Unsafe patterns: + - response.getWriter().write(userInput) + - out.println(userInput) without encoding + - PrintWriter writing raw strings with user data + + Safe patterns: + - Encode.forHtml(userInput) + - Encode.forJavaScript(userInput) + - response.getWriter().write(Encode.forHtml(...)) + """ + issues = [] + + # Pattern for direct output to response without encoding + # Look for response.getWriter().write/print patterns + output_patterns = [ + (r'response\s*\.\s*getWriter\s*\(\s*\)\s*\.\s*(?:write|print|println)\s*\(\s*(?!Encode\.)', + "response.getWriter().write() without OWASP encoding"), + (r'out\s*\.\s*(?:write|print|println)\s*\(\s*(?!Encode\.)', + "out.print() without OWASP encoding"), + # PrintWriter/Writer pattern - matches generic usage but will be filtered + # to exclude known-safe patterns like System.out, System.err, logger, file I/O + (r'\b\w+\s*\.\s*(?:write|print|println)\s*\(\s*(?!Encode\.|")', + "PrintWriter/Writer output without OWASP encoding"), + ] + + for pattern, description in output_patterns: + # Use a single regex that both detects the pattern and captures the argument + combined_pattern = pattern + r'([^)]+)\)' + for match in re.finditer(combined_pattern, content): + # Extract the full matched text to check for exclusions + full_match = match.group(0) + + # Skip known-safe non-HTTP patterns + # System I/O, logging, and file I/O don't pose XSS risks + safe_patterns = [ + 'System.out', # Console output + 'System.err', # Error output + 'logger.', # Logger instances + 'log.', # Log instances + 'LOG.', # Uppercase log constants + 'fileWriter.', # File I/O + 'bufferedWriter.', # Buffered file I/O + 'writer.', # Generic file writers (lowercase convention) + 'Writer.', # File writer classes + ] + if any(safe in full_match for safe in safe_patterns): + continue + + # Extract the argument being written/printed + output_content = match.group(1) if match.lastindex else "" + stripped_output = output_content.strip() + + # Skip if it's a pure literal string with no concatenation + if ( + stripped_output.startswith('"') + and stripped_output.endswith('"') + and '+' not in stripped_output + ): + continue + + issues.append( + f"WARNING: {description}\n" + f" If outputting user data, wrap with Encode.forHtml() or appropriate encoder.\n" + f" Example: response.getWriter().write(Encode.forHtml(userInput))" + ) + # Only need one warning per pattern; break after first unsafe match + break + return issues + + +def validate_content(file_path: str, content: str) -> tuple[bool, list[str]]: + """ + Validate file content for OWASP encoding compliance. + + Returns: + (is_safe, issues): Tuple of safety status and list of issues found + """ + if not file_path or not content: + return True, [] + + issues = [] + + # Check based on file type + if file_path.endswith('.jsp'): + issues.extend(check_jsp_unsafe_patterns(content)) + elif file_path.endswith('.java'): + issues.extend(check_java_unsafe_patterns(content)) + + # Critical issues start with "CRITICAL:" + has_critical = any(issue.startswith("CRITICAL:") for issue in issues) + + return not has_critical, issues + + +def main(): + """Main entry point for the hook.""" + try: + # Read JSON input from stdin + input_data = json.load(sys.stdin) + + # Extract tool input + tool_input = input_data.get("tool_input", {}) + tool_name = input_data.get("tool_name", "") + + # Only process Edit and Write tools + if tool_name not in ("Edit", "Write"): + sys.exit(0) + + # Get file path and content + file_path, content = get_file_content_from_input(tool_input) + + # Only check JSP and Java files + if not (file_path.endswith('.jsp') or file_path.endswith('.java')): + sys.exit(0) + + # Validate content + is_safe, issues = validate_content(file_path, content) + + if issues: + # Output feedback to stderr + print("\n=== OWASP Encoding Validator ===", file=sys.stderr) + print(f"File: {file_path}\n", file=sys.stderr) + for issue in issues: + print(f"{issue}\n", file=sys.stderr) + + if not is_safe: + print("BLOCKED: Critical XSS vulnerability detected.", file=sys.stderr) + print("Please use OWASP encoding for all user input.", file=sys.stderr) + print("\nOWASP Encoder methods:", file=sys.stderr) + print(" - Encode.forHtml() - HTML body content", file=sys.stderr) + print(" - Encode.forHtmlAttribute() - HTML attributes", file=sys.stderr) + print(" - Encode.forJavaScript() - JavaScript contexts", file=sys.stderr) + print(" - - JSP safe output", file=sys.stderr) + sys.exit(2) + else: + print("WARNING: Potential issues detected but not blocking.", file=sys.stderr) + print("Please review the warnings above.", file=sys.stderr) + + sys.exit(0) + + except json.JSONDecodeError as e: + print(f"Error parsing JSON input: {e}", file=sys.stderr) + sys.exit(0) # Don't block on parse errors + except Exception as e: + print(f"Error in OWASP validation hook: {e}", file=sys.stderr) + sys.exit(0) # Don't block on unexpected errors + + +if __name__ == "__main__": + main() diff --git a/.claude/hooks/validate-sql-safety.py b/.claude/hooks/validate-sql-safety.py new file mode 100755 index 00000000000..89016286fa9 --- /dev/null +++ b/.claude/hooks/validate-sql-safety.py @@ -0,0 +1,224 @@ +#!/usr/bin/env python3 +""" +Parameterized SQL Query Enforcer Hook for Claude Code + +This hook validates that Java files use parameterized queries +to prevent SQL injection vulnerabilities. + +Exit codes: +- 0: Safe patterns detected or non-applicable file +- 2: Unsafe patterns detected (blocks the operation with feedback) +""" + +import json +import re +import sys + + +def get_file_content_from_input(tool_input: dict) -> tuple[str, str]: + """Extract file path and content from tool input.""" + file_path = tool_input.get("file_path", "") + + # For Write tool, content is in 'content' field + # For Edit tool, new content is in 'new_string' field + content = tool_input.get("content", "") or tool_input.get("new_string", "") + + return file_path, content + + +def check_sql_injection_patterns(content: str) -> list[str]: + """ + Check Java content for SQL injection vulnerabilities. + + Unsafe patterns: + - "SELECT * FROM users WHERE id = " + userId + - "SELECT * FROM " + tableName + " WHERE ..." + - String.format("SELECT * FROM users WHERE id = %s", id) + - "INSERT INTO table VALUES ('" + value + "')" + - executeQuery("SELECT ... " + variable) + - createQuery("SELECT ... " + variable) + + Safe patterns: + - query.setParameter("id", userId) + - PreparedStatement with ? placeholders + - createQuery("SELECT u FROM User u WHERE u.id = :id").setParameter("id", id) + - Named parameters (:paramName) + - Positional parameters (?) + """ + issues = [] + + # SQL keywords to look for + sql_keywords = r'(?:SELECT|INSERT|UPDATE|DELETE|FROM|WHERE|INTO|VALUES|SET|JOIN|ORDER\s+BY|GROUP\s+BY)' + + # Pattern 1: String concatenation with SQL keywords + # Matches: "SELECT ... " + variable or variable + " SELECT ..." + concat_pattern = rf'["\'][^"\']*{sql_keywords}[^"\']*["\']\s*\+\s*\w+' + concat_pattern2 = rf'\w+\s*\+\s*["\'][^"\']*{sql_keywords}' + concat_pattern3 = rf'["\'][^"\']*{sql_keywords}[^"\']*["\']\s*\+\s*["\'][^"\']*["\']\s*\+\s*\w+' + + # Pattern 2: String.format with SQL + format_pattern = rf'String\s*\.\s*format\s*\(\s*["\'][^"\']*{sql_keywords}' + + # Pattern 3: StringBuilder/StringBuffer append with SQL + builder_pattern = rf'(?:StringBuilder|StringBuffer)\s*\(\s*["\'][^"\']*{sql_keywords}' + append_pattern = rf'\.append\s*\(\s*["\'][^"\']*{sql_keywords}' + + # Pattern 4: executeQuery/executeUpdate with concatenation + execute_concat = rf'(?:executeQuery|executeUpdate|execute)\s*\(\s*["\'][^"\']*{sql_keywords}[^"\']*["\']\s*\+' + execute_concat2 = r'(?:executeQuery|executeUpdate|execute)\s*\(\s*\w+\s*\+\s*["\']' + + # Pattern 5: createQuery/createNativeQuery with concatenation + create_query_concat = rf'(?:createQuery|createNativeQuery|createSQLQuery)\s*\(\s*["\'][^"\']*{sql_keywords}[^"\']*["\']\s*\+' + create_query_concat2 = r'(?:createQuery|createNativeQuery|createSQLQuery)\s*\(\s*\w+\s*\+\s*["\']' + + # Pattern 6: Direct variable in SQL string construction + # "SELECT * FROM " + tableName + table_concat = r'["\']SELECT\s+\*?\s+FROM\s*["\']\s*\+\s*\w+' + where_concat = r'["\']WHERE\s+\w+\s*=\s*["\']\s*\+\s*\w+' + + patterns_to_check = [ + (concat_pattern, "String concatenation in SQL query"), + (concat_pattern2, "String concatenation in SQL query"), + (concat_pattern3, "Multiple string concatenation in SQL query"), + (format_pattern, "String.format() with SQL query"), + (builder_pattern, "StringBuilder with SQL query"), + (append_pattern, "StringBuilder.append() with SQL fragment"), + (execute_concat, "executeQuery() with string concatenation"), + (execute_concat2, "executeQuery() with string concatenation"), + (create_query_concat, "createQuery() with string concatenation"), + (create_query_concat2, "createQuery() with string concatenation"), + (table_concat, "Table name concatenation in SQL"), + (where_concat, "WHERE clause concatenation in SQL"), + ] + + found_patterns = set() # Avoid duplicate messages + + for pattern, description in patterns_to_check: + matches = re.finditer(pattern, content, re.IGNORECASE) + for match in matches: + # Get some context around the match + start = max(0, match.start() - 20) + end = min(len(content), match.end() + 20) + context = content[start:end].replace('\n', ' ').strip() + + # Create a unique key to avoid duplicates + issue_key = f"{description}:{match.start()}" + if issue_key not in found_patterns: + found_patterns.add(issue_key) + issues.append( + f"CRITICAL: {description}\n" + f" Found: ...{context}...\n" + f" This is vulnerable to SQL injection." + ) + + # Additional check: Look for dangerous patterns in query construction + # Check for queries that don't use parameterized approach + raw_query_patterns = [ + # "SELECT ... WHERE id = '" + id + "'" + (rf'["\'][^"\']*{sql_keywords}[^"\']*=\s*(["\'])\s*\+\s*\w+\s*\+\s*\1', + "String concatenation with quotes in SQL"), + # query = "SELECT ... " + variable; + (rf'\w+\s*=\s*["\'][^"\']*{sql_keywords}[^"\']*["\']\s*\+', + "SQL query built with string concatenation"), + ] + + for pattern, description in raw_query_patterns: + matches = re.finditer(pattern, content, re.IGNORECASE) + for match in matches: + start = max(0, match.start() - 10) + end = min(len(content), match.end() + 10) + context = content[start:end].replace('\n', ' ').strip() + + issue_key = f"{description}:{match.start()}" + if issue_key not in found_patterns: + found_patterns.add(issue_key) + issues.append( + f"CRITICAL: {description}\n" + f" Found: ...{context}...\n" + f" This is vulnerable to SQL injection." + ) + + return issues + + +def validate_content(file_path: str, content: str) -> tuple[bool, list[str]]: + """ + Validate file content for SQL injection vulnerabilities. + + Returns: + (is_safe, issues): Tuple of safety status and list of issues found + """ + if not file_path or not content: + return True, [] + + issues = [] + + # Only check Java files + if file_path.endswith('.java'): + issues.extend(check_sql_injection_patterns(content)) + + # All SQL injection issues are critical + has_critical = len(issues) > 0 + + return not has_critical, issues + + +def main(): + """Main entry point for the hook.""" + try: + # Read JSON input from stdin + input_data = json.load(sys.stdin) + + # Extract tool input + tool_input = input_data.get("tool_input", {}) + tool_name = input_data.get("tool_name", "") + + # Only process Edit and Write tools + if tool_name not in ("Edit", "Write"): + sys.exit(0) + + # Get file path and content + file_path, content = get_file_content_from_input(tool_input) + + # Only check Java files + if not file_path.endswith('.java'): + sys.exit(0) + + # Validate content + is_safe, issues = validate_content(file_path, content) + + if issues: + # Output feedback to stderr + print("\n=== Parameterized SQL Query Enforcer ===", file=sys.stderr) + print(f"File: {file_path}\n", file=sys.stderr) + for issue in issues: + print(f"{issue}\n", file=sys.stderr) + + if not is_safe: + print("BLOCKED: SQL injection vulnerability detected.", file=sys.stderr) + print("Please use parameterized queries.\n", file=sys.stderr) + print("Safe alternatives:", file=sys.stderr) + print(" JPA/Hibernate:", file=sys.stderr) + print(' createQuery("SELECT u FROM User u WHERE u.id = :id")', file=sys.stderr) + print(' .setParameter("id", userId)', file=sys.stderr) + print("\n PreparedStatement:", file=sys.stderr) + print(' PreparedStatement ps = conn.prepareStatement(', file=sys.stderr) + print(' "SELECT * FROM users WHERE id = ?");', file=sys.stderr) + print(' ps.setInt(1, userId);', file=sys.stderr) + print("\n Hibernate Criteria:", file=sys.stderr) + print(' session.createCriteria(User.class)', file=sys.stderr) + print(' .add(Restrictions.eq("id", userId));', file=sys.stderr) + sys.exit(2) + + sys.exit(0) + + except json.JSONDecodeError as e: + print(f"Error parsing JSON input: {e}", file=sys.stderr) + sys.exit(0) # Don't block on parse errors + except Exception as e: + print(f"Error in SQL safety hook: {e}", file=sys.stderr) + sys.exit(0) # Don't block on unexpected errors + + +if __name__ == "__main__": + main() diff --git a/.claude/settings.json b/.claude/settings.json index 5b07b826de0..8c9d8327925 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -13,6 +13,38 @@ } ] } + ], + "PreToolUse": [ + { + "matcher": "Read|Edit|Write", + "hooks": [ + { + "type": "command", + "command": "python3 $CLAUDE_PROJECT_DIR/.claude/hooks/inject-test-context.py", + "timeout": 5 + } + ] + }, + { + "matcher": "Read|Edit|Write", + "hooks": [ + { + "type": "command", + "command": "python3 $CLAUDE_PROJECT_DIR/.claude/hooks/validate-sql-safety.py", + "timeout": 5 + } + ] + }, + { + "matcher": "Read|Edit|Write", + "hooks": [ + { + "type": "command", + "command": "python3 $CLAUDE_PROJECT_DIR/.claude/hooks/validate-owasp-encoding.py", + "timeout": 5 + } + ] + } ] }, "enabledPlugins": { @@ -91,6 +123,7 @@ "Bash(gh run view *)", "Bash(gh run list *)", "Bash(gh run watch *)", + "Bash(gh issue create *)", "Bash(git status *)", "Bash(git branch *)", "Bash(git checkout *)", @@ -214,7 +247,6 @@ "ask": [ "Bash(gh pr close *)", "Bash(gh issue close *)", - "Bash(gh issue create *)", "Bash(gh issue edit *)", "Bash(gh label *)", "Bash(gh run rerun *)", diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index c608a086dcb..a9953b26130 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -45,6 +45,7 @@ jobs: uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} # This is an optional setting that allows Claude to read CI results on PRs additional_permissions: | @@ -53,7 +54,6 @@ jobs: # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. # prompt: 'Update the pull request description to include a summary of changes.' - # Optional: Add claude_args to customize behavior and configuration - # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md - # or https://code.claude.com/docs/en/cli-reference for available options - # claude_args: '--allowed-tools Bash(gh pr:*)' + # Allow gh CLI commands for PR/issue management (uses :* prefix matching syntax) + # See https://code.claude.com/docs/en/settings#permission-rule-syntax + claude_args: '--allowedTools "Bash(gh pr create:*)" "Bash(gh pr view:*)" "Bash(gh pr list:*)" "Bash(gh pr diff:*)" "Bash(gh pr checks:*)" "Bash(gh pr comment:*)" "Bash(gh issue view:*)" "Bash(gh issue list:*)" "Bash(gh issue comment:*)" "Bash(gh issue create:*)" "Bash(gh run view:*)" "Bash(gh run list:*)" "Bash(gh run watch:*)" "Bash(gh repo view:*)" "Bash(git status:*)" "Bash(git branch:*)" "Bash(git checkout:*)" "Bash(git add:*)" "Bash(git commit:*)" "Bash(git push:*)" "Bash(git pull:*)" "Bash(git fetch:*)" "Bash(git log:*)" "Bash(git diff:*)" "Bash(git show:*)"' diff --git a/.github/workflows/container-images.yml b/.github/workflows/container-images.yml index 2232d2028e6..c0a6d6b48d6 100644 --- a/.github/workflows/container-images.yml +++ b/.github/workflows/container-images.yml @@ -40,11 +40,15 @@ on: - main - develop - experimental + - staging/* + - hotfix/* pull_request: branches: - main - develop - experimental + - staging/* + - hotfix/* workflow_dispatch: inputs: force_rebuild: diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 5b8e26ebf2d..31c755bc262 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -10,7 +10,7 @@ name: 'Dependency review' on: pull_request: - branches: [ "develop", "experimental", "main" ] + branches: [ "develop", "experimental", "main", "staging/*", "hotfix/*", "community/*/develop", "community/*/staging/*" ] # If using a dependency submission action in this workflow this permission will need to be set to: # diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml index a70b6ddbeec..58ca38aa736 100644 --- a/.github/workflows/dependency-submission.yml +++ b/.github/workflows/dependency-submission.yml @@ -32,6 +32,10 @@ on: - main - develop - experimental + - staging/* + - hotfix/* + - community/*/develop + - community/*/staging/* paths: - 'pom.xml' - 'dependencies-lock.json' diff --git a/.github/workflows/issue-lifecycle-manager.yml b/.github/workflows/issue-lifecycle-manager.yml deleted file mode 100644 index 0b7e78ee863..00000000000 --- a/.github/workflows/issue-lifecycle-manager.yml +++ /dev/null @@ -1,230 +0,0 @@ -name: Issue Lifecycle Manager - -on: - pull_request: - types: [closed] - issues: - types: [closed, reopened] - issue_comment: - types: [created] - workflow_dispatch: # Manual trigger to create labels - push: - branches: [main, develop, master] # Create labels on push to main branches - -permissions: - contents: read - issues: write - pull-requests: read -jobs: - handle-pr-merge: - if: github.event_name == 'pull_request' && github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Handle PR merge and notify reporters - uses: actions/github-script@v7 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const pr = context.payload.pull_request; - const owner = context.repo.owner; - const repo = context.repo.repo; - - // Get PR body and title - const prBody = pr.body || ''; - const prTitle = pr.title || ''; - const prText = `${prTitle} ${prBody}`; - - // Find issue references - const issuePattern = /(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+#(\d+)/gi; - const matches = [...prText.matchAll(issuePattern)]; - - for (const match of matches) { - const issueNumber = match[1]; - - try { - // Get issue details - const issue = await github.rest.issues.get({ - owner, - repo, - issue_number: issueNumber - }); - - // Don't auto-close issues marked as blockers - const labels = issue.data.labels.map(l => l.name); - const isBlocker = labels.includes('blocker'); - - const issueAuthor = issue.data.user.login; - const prMergedBy = pr.merged_by.login; - - // Create notification comment - const comment = `## 🔔 Fix Has Been Merged - -@${issueAuthor} - A fix for this issue has been merged! - -**Pull Request:** #${pr.number} - ${pr.title} -**Merged by:** @${prMergedBy} -**Branch:** \`${pr.base.ref}\` - -### Next Steps: -1. Once deployed, please verify the fix resolves your issue -2. If the issue is **resolved**, please: - - ✅ Comment "Verified fixed" or close this issue -3. If the issue **persists**, please: - - ❌ Comment with details about what's still not working - - Include any error messages or screenshots - -${isBlocker ? '⚠️ **Note:** This is marked as a blocker. Please verify urgently once deployed.' : ''} - ---- -*Automated notification • Reply "stop notifications" to opt out of future updates*`; - - await github.rest.issues.createComment({ - owner, - repo, - issue_number: issueNumber, - body: comment - }); - - // Update labels - const newLabels = ['status: pending-verification']; - if (!isBlocker) { - // Remove needs-triage if present - if (labels.includes('status: needs-triage')) { - await github.rest.issues.removeLabel({ - owner, - repo, - issue_number: issueNumber, - name: 'status: needs-triage' - }); - } - - // Add new status label if not already present - for (const label of newLabels) { - if (!labels.includes(label)) { - await github.rest.issues.addLabels({ - owner, - repo, - issue_number: issueNumber, - labels: [label] - }); - } - } - } - - } catch (error) { - console.error(`Error processing issue #${issueNumber}: ${error.message}`); - } - } - - handle-verification-comment: - if: github.event_name == 'issue_comment' && github.event.issue.pull_request == null - runs-on: ubuntu-latest - steps: - - name: Check for verification keywords - uses: actions/github-script@v7 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const comment = context.payload.comment; - const issue = context.payload.issue; - const owner = context.repo.owner; - const repo = context.repo.repo; - - // Check if commenter is the issue author - const isAuthor = comment.user.login === issue.user.login; - - // Check for verification keywords - const commentBody = comment.body.toLowerCase(); - const verified = /\b(verified|fixed|resolved|works)\b/.test(commentBody); - const notFixed = /\b(not fixed|still broken|persists|not working)\b/.test(commentBody); - - if (isAuthor) { - if (verified && issue.state === 'open') { - // Add verified label and close - await github.rest.issues.update({ - owner, - repo, - issue_number: issue.number, - state: 'closed', - state_reason: 'completed' - }); - - await github.rest.issues.addLabels({ - owner, - repo, - issue_number: issue.number, - labels: ['status: verified-fixed'] - }); - - await github.rest.issues.createComment({ - owner, - repo, - issue_number: issue.number, - body: '✅ Issue marked as verified and closed. Thank you for confirming!' - }); - - } else if (notFixed) { - // Add needs-attention label - await github.rest.issues.addLabels({ - owner, - repo, - issue_number: issue.number, - labels: ['status: fix-failed'] - }); - - // Mention the PR author who attempted the fix - await github.rest.issues.createComment({ - owner, - repo, - issue_number: issue.number, - body: '⚠️ The issue reporter indicates this is not fixed. Team has been notified for further investigation.' - }); - } - } - - create-status-labels: - if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' - runs-on: ubuntu-latest - steps: - - name: Create status labels if they don't exist - uses: actions/github-script@v7 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const owner = context.repo.owner; - const repo = context.repo.repo; - - const labelsToCreate = [ - { - name: 'status: pending-verification', - color: 'FFEB3B', - description: 'Fix merged, waiting for issue reporter to verify' - }, - { - name: 'status: verified-fixed', - color: '0E8A16', - description: 'Issue reporter confirmed the fix works' - }, - { - name: 'status: fix-failed', - color: 'B60205', - description: 'Issue reporter confirmed the fix does not work' - } - ]; - - for (const label of labelsToCreate) { - try { - await github.rest.issues.createLabel({ - owner, - repo, - ...label - }); - console.log(`Created label: ${label.name}`); - } catch (error) { - if (error.status === 422) { - console.log(`Label already exists: ${label.name}`); - } else { - console.error(`Error creating label ${label.name}: ${error.message}`); - } - } - } \ No newline at end of file diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml new file mode 100644 index 00000000000..4a5917438a5 --- /dev/null +++ b/.github/workflows/issue-triage.yml @@ -0,0 +1,184 @@ +# .github/workflows/issue-triage.yml +name: Auto-triage Issues + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + add-to-project: + runs-on: ubuntu-latest + steps: + - name: Add to Project and Set Fields + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.PROJECT_TOKEN }} + script: | + const projectId = 'PVT_kwDOCaYIIc4AoYdb'; + const statusFieldId = 'PVTSSF_lADOCaYIIc4AoYdbzgf9plc'; + const kindFieldId = 'PVTSSF_lADOCaYIIc4AoYdbzg8c-5E'; + const needsTriageId = '3ae30e07'; + const taskId = 'af86fb80'; + + async function run() { + try { + const issueNodeId = context.payload.issue.node_id; + const issueNumber = context.payload.issue.number; + + // Check if issue already exists in the project + console.log(`Checking if issue #${issueNumber} already exists in project...`); + const existingItems = await github.graphql(` + query($issueId: ID!) { + node(id: $issueId) { + ... on Issue { + projectItems(first: 20) { + nodes { + id + project { + id + } + fieldValues(first: 20) { + nodes { + ... on ProjectV2ItemFieldSingleSelectValue { + field { + ... on ProjectV2SingleSelectField { + id + name + } + } + optionId + name + } + } + } + } + } + } + } + } + `, { + issueId: issueNodeId + }); + + // Find if issue is already in this specific project + let itemId = null; + let currentStatusOptionId = null; + let currentKindOptionId = null; + + const projectItems = existingItems?.node?.projectItems?.nodes || []; + for (const item of projectItems) { + if (item.project && item.project.id === projectId) { + itemId = item.id; + console.log(`Issue #${issueNumber} already exists in project, item ID: ${itemId}`); + + // Check current field values + const fieldValues = item.fieldValues?.nodes || []; + for (const fieldValue of fieldValues) { + if (fieldValue.field) { + if (fieldValue.field.id === statusFieldId) { + currentStatusOptionId = fieldValue.optionId; + console.log(`Current Status: ${fieldValue.name} (${currentStatusOptionId})`); + } else if (fieldValue.field.id === kindFieldId) { + currentKindOptionId = fieldValue.optionId; + console.log(`Current Kind: ${fieldValue.name} (${currentKindOptionId})`); + } + } + } + break; + } + } + + // Add issue to project if not already present + if (!itemId) { + console.log(`Adding issue #${issueNumber} to project...`); + try { + const addResult = await github.graphql(` + mutation($projectId: ID!, $contentId: ID!) { + addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) { + item { id } + } + } + `, { + projectId: projectId, + contentId: issueNodeId + }); + + itemId = addResult.addProjectV2ItemById.item.id; + console.log(`Added issue #${issueNumber} to project, item ID: ${itemId}`); + } catch (error) { + console.error(`Failed to add issue #${issueNumber} to project:`, error); + throw error; + } + } + + // Set Status to "Needs Triage" only if not already set + if (!currentStatusOptionId) { + console.log('Status field is not set, setting to "Needs Triage"...'); + try { + await github.graphql(` + mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) { + updateProjectV2ItemFieldValue(input: { + projectId: $projectId, + itemId: $itemId, + fieldId: $fieldId, + value: { singleSelectOptionId: $optionId } + }) { + projectV2Item { id } + } + } + `, { + projectId: projectId, + itemId: itemId, + fieldId: statusFieldId, + optionId: needsTriageId + }); + console.log('Set Status to "Needs Triage"'); + } catch (error) { + console.error(`Failed to set Status field for project item ${itemId}:`, error); + throw error; + } + } else { + console.log('Status field already set, skipping update'); + } + + // Set Kind to "Task" only if not already set + if (!currentKindOptionId) { + console.log('Kind field is not set, setting to "Task"...'); + try { + await github.graphql(` + mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) { + updateProjectV2ItemFieldValue(input: { + projectId: $projectId, + itemId: $itemId, + fieldId: $fieldId, + value: { singleSelectOptionId: $optionId } + }) { + projectV2Item { id } + } + } + `, { + projectId: projectId, + itemId: itemId, + fieldId: kindFieldId, + optionId: taskId + }); + console.log('Set Kind to "Task"'); + } catch (error) { + console.error(`Failed to set Kind field for project item ${itemId}:`, error); + throw error; + } + } else { + console.log('Kind field already set, skipping update'); + } + + console.log(`Issue #${issueNumber} triage completed successfully`); + } catch (error) { + console.error('Issue triage workflow failed:', error); + throw error; + } + } + + await run(); diff --git a/.github/workflows/maven-project.yml b/.github/workflows/maven-project.yml index 0f8872c7819..2102a084c50 100644 --- a/.github/workflows/maven-project.yml +++ b/.github/workflows/maven-project.yml @@ -47,6 +47,11 @@ on: - main - develop - experimental + - staging/* + - hotfix/* + - community/*/develop + - community/*/staging/* + env: REGISTRY: ghcr.io diff --git a/.github/workflows/notify-issue-reporter.yml b/.github/workflows/notify-issue-reporter.yml deleted file mode 100644 index a38a0db5cd5..00000000000 --- a/.github/workflows/notify-issue-reporter.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: Notify Issue Reporter on PR Merge -permissions: - contents: read - issues: write - -on: - pull_request: - types: [closed] - -jobs: - notify-reporter: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - - steps: - - name: Check for linked issues - uses: actions/github-script@v7 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const pr = context.payload.pull_request; - const owner = context.repo.owner; - const repo = context.repo.repo; - - // Get the PR body and title - const prBody = pr.body || ''; - const prTitle = pr.title || ''; - const prText = `${prTitle} ${prBody}`; - - // Find issue references (e.g., fixes #123, closes #456, resolves #789) - const issuePattern = /(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+#(\d+)/gi; - const matches = [...prText.matchAll(issuePattern)]; - - if (matches.length === 0) { - console.log('No linked issues found in PR'); - return; - } - - for (const match of matches) { - const issueNumber = match[1]; - console.log(`Found linked issue: #${issueNumber}`); - - try { - // Get issue details - const issue = await github.rest.issues.get({ - owner, - repo, - issue_number: issueNumber - }); - - const issueAuthor = issue.data.user.login; - const prAuthor = pr.user.login; - const prNumber = pr.number; - const prUrl = pr.html_url; - - // Create a comment mentioning the issue reporter - const comment = `## 🔔 Fix Deployed Notification - -Hey @${issueAuthor}! The pull request #${prNumber} that addresses this issue has been merged. - -**What's next?** -- The fix has been merged into the \`${pr.base.ref}\` branch -- Please verify if the issue is resolved once the changes are deployed to your environment -- If the issue persists, please comment here with details - -**PR Details:** -- PR: #${prNumber} - ${pr.title} -- Merged by: @${pr.merged_by.login} -- Author: @${prAuthor} - -Thank you for reporting this issue! Your feedback helps improve OpenO EMR. - ---- -*This is an automated message. If you have questions, please comment below.*`; - - await github.rest.issues.createComment({ - owner, - repo, - issue_number: issueNumber, - body: comment - }); - - console.log(`Notified @${issueAuthor} on issue #${issueNumber}`); - - // Add a label to indicate fix is pending verification - try { - await github.rest.issues.addLabels({ - owner, - repo, - issue_number: issueNumber, - labels: ['status: pending-verification'] - }); - console.log(`Added 'status: pending-verification' label to issue #${issueNumber}`); - } catch (labelError) { - console.log(`Could not add label (may not exist): ${labelError.message}`); - } - - } catch (error) { - console.error(`Error processing issue #${issueNumber}: ${error.message}`); - } - } \ No newline at end of file diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 00000000000..8e4a5683b9e --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,209 @@ +# GitHub Workflow: SonarCloud Analysis +# +# Description: +# This workflow runs SonarCloud static code analysis on the Open-O codebase. +# It analyzes code quality, security vulnerabilities, and maintainability issues. +# +# Container Images: +# This workflow uses the same dev container as maven-project.yml to ensure +# all local_repo dependencies are available for the build. +# +# Usage: +# - Triggered on pushes to the develop branch +# - Triggered on pull requests targeting the develop branch +# +# Requirements: +# - SONAR_TOKEN secret must be configured in repository settings +# - Project must be set up on SonarCloud (https://sonarcloud.io) +# - sonar.organization must be set in pom.xml +# +# License: +# This GitHub Workflow file is part of the Open-O project and is subject +# to the licensing terms outlined in the repository's LICENSE file. +# +# Last Updated: +# January 2026 + +name: SonarCloud Analysis + +on: + push: + branches: + - develop + pull_request: + types: [opened, synchronize, reopened] + branches: + - develop + +env: + REGISTRY: ghcr.io + IMAGE_PREFIX: ${{ github.repository_owner }} + +permissions: + contents: read + pull-requests: write + packages: read + +jobs: + build: + name: Build and analyze + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Try to pull pre-built image from ghcr.io + id: pull-image + continue-on-error: true + env: + IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/openo-tomcat-dev:latest + run: | + echo "Attempting to pull pre-built image from $IMAGE..." + if docker pull "$IMAGE" 2>pull-image-error.log; then + docker tag "$IMAGE" openo-tomcat-dev + echo "pulled=true" >> "$GITHUB_OUTPUT" + echo "reason=success" >> "$GITHUB_OUTPUT" + echo "Successfully pulled pre-built image!" + else + echo "pulled=false" >> "$GITHUB_OUTPUT" + if grep -qiE 'manifest unknown|not found' pull-image-error.log; then + echo "reason=not-found" >> "$GITHUB_OUTPUT" + echo "Pre-built image not available (not found in registry), will build locally" + else + echo "reason=error" >> "$GITHUB_OUTPUT" + echo "Image pull failed due to an unexpected error:" + cat pull-image-error.log + fi + fi + rm -f pull-image-error.log + + - name: Fail on unexpected image pull error + if: steps.pull-image.outputs.reason == 'error' + run: | + echo "::error::Failed to pull pre-built image from ${{ env.REGISTRY }} for a reason other than 'image not found'. Check network connectivity, registry permissions, or image name." + exit 1 + + - name: Cache Docker layers + if: steps.pull-image.outputs.pulled != 'true' && steps.pull-image.outputs.reason == 'not-found' + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ hashFiles('.devcontainer/development/**') }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: .m2-cache + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', 'dependencies-lock.json') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Cache SonarCloud packages + uses: actions/cache@v4 + with: + path: .sonar-cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + + - name: Prepare cache directories + run: | + mkdir -p .m2-cache + mkdir -p .sonar-cache + + - name: Build dev container (fallback) + if: steps.pull-image.outputs.pulled != 'true' + run: | + echo "Building container locally..." + docker buildx build \ + --cache-from=type=local,src=/tmp/.buildx-cache \ + --cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \ + --load \ + -t openo-tomcat-dev \ + .devcontainer/development + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + - name: Start container + run: | + docker run -d --name openo-tomcat-dev \ + -v ${{ github.workspace }}:/workspace \ + -v ${{ github.workspace }}/.m2-cache:/root/.m2 \ + -v ${{ github.workspace }}/.sonar-cache:/root/.sonar/cache \ + -w /workspace \ + openo-tomcat-dev tail -f /dev/null + + - name: Configure git safe directory + run: | + docker exec openo-tomcat-dev bash -c " + git config --global --add safe.directory /workspace + " + + - name: Build and analyze (Push to develop) + if: github.event_name == 'push' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + docker exec \ + -e GITHUB_TOKEN="$GITHUB_TOKEN" \ + -e SONAR_TOKEN="$SONAR_TOKEN" \ + openo-tomcat-dev bash -c " + echo '=========================================' + echo 'Running SonarCloud Analysis (Branch)' + echo '=========================================' + mvn -B verify sonar:sonar \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.projectKey=openo-beta_Open-O \ + -DskipTests \ + -DskipModernTests=true \ + -DskipLegacyTests=true \ + -T 1C + " + + - name: Build and analyze (Pull Request) + if: github.event_name == 'pull_request' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_BRANCH: ${{ github.head_ref }} + PR_BASE: ${{ github.base_ref }} + run: | + docker exec \ + -e GITHUB_TOKEN="$GITHUB_TOKEN" \ + -e SONAR_TOKEN="$SONAR_TOKEN" \ + -e PR_NUMBER="$PR_NUMBER" \ + -e PR_BRANCH="$PR_BRANCH" \ + -e PR_BASE="$PR_BASE" \ + openo-tomcat-dev bash -c " + echo '=========================================' + echo 'Running SonarCloud Analysis (Pull Request)' + echo '=========================================' + echo \"PR Number: \$PR_NUMBER\" + echo \"PR Branch: \$PR_BRANCH\" + echo \"PR Base: \$PR_BASE\" + echo '=========================================' + mvn -B verify sonar:sonar \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.projectKey=openo-beta_Open-O \ + \"-Dsonar.pullrequest.key=\$PR_NUMBER\" \ + \"-Dsonar.pullrequest.branch=\$PR_BRANCH\" \ + \"-Dsonar.pullrequest.base=\$PR_BASE\" \ + -DskipTests \ + -DskipModernTests=true \ + -DskipLegacyTests=true \ + -T 1C + " diff --git a/.github/workflows/summary.yml b/.github/workflows/summary.yml deleted file mode 100644 index e4a14754449..00000000000 --- a/.github/workflows/summary.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Summarize new issues - -on: - issues: - types: [opened] - -jobs: - summary: - runs-on: ubuntu-latest - permissions: - issues: write - models: read - contents: read - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Run AI inference - id: inference - uses: actions/ai-inference@v1 - with: - prompt: | - Summarize the following GitHub issue in one paragraph: - Title: ${{ github.event.issue.title }} - Body: ${{ github.event.issue.body }} - - - name: Comment with AI summary - run: | - gh issue comment $ISSUE_NUMBER --body "${{ steps.inference.outputs.response }}" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE_NUMBER: ${{ github.event.issue.number }} - RESPONSE: ${{ steps.inference.outputs.response }} diff --git a/.gitignore b/.gitignore index b9673900d1f..93ef7c34e65 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /target /eclipse-target /ui-test-runs +/test-output /.playwright-mcp /override.properties /override_log4j.xml diff --git a/CLAUDE.md b/CLAUDE.md index 3cd0e162797..2e9dc04f139 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -153,6 +153,9 @@ public class Example2Action extends ActionSupport { - **Spring Integration**: Full Spring context with transaction support - **Multi-File Architecture**: Component-first naming (`TicklerDao*Test`) for scalability - **Documentation**: Complete guide at `docs/test/modern-test-framework-complete.md` +- **Context Guide**: `docs/test/claude-test-context.md` (auto-injected by hooks when working on tests) +- **Unit Test Support**: `OpenOUnitTestBase` for mocked tests without database +- **Manager Testing**: @Nested classes for organizing 100+ tests per manager (see `DemographicManagerUnitTest`) ### Test Organization Standards @@ -170,17 +173,12 @@ mvn test -Dgroups="create,update" # Specific operations ### BDD Test Naming Convention -Modern tests use BDD (Behavior-Driven Development) naming for clarity: +Modern tests use BDD (Behavior-Driven Development) naming for clarity. Choose ONE style and use it consistently: -**Patterns**: -1. `should_when` - Testing behavior/requirements (camelCase, ONE underscore) -2. `__` - Testing specific methods -3. `should` - Simple assertions - -**Examples**: +**Option 1: Pure camelCase (RECOMMENDED for Java)** ```java -void shouldReturnTickler_whenValidIdProvided() -void findActiveByDemographicNo_multipleStatuses_returnsOnlyActive() +void shouldReturnTicklerWhenValidIdProvided() +void shouldThrowExceptionWhenTicklerNotFound() void shouldLoadSpringContext() ``` @@ -189,7 +187,6 @@ void shouldLoadSpringContext() ### Test Context Configuration The codebase has legacy patterns (SpringUtils static access, mixed Hibernate/JPA, circular dependencies) that require specific test setup. See **[Test Writing Guide](docs/test/test-writing-guide.md)** for detailed configuration patterns. - **Key points**: Extend `OpenOTestBase` (handles SpringUtils), define beans manually in test context, explicitly list entities in persistence.xml. **Writing Tests - CRITICAL**: @@ -197,8 +194,12 @@ When asked to write tests, you MUST: 1. **First examine the actual interface/class** being tested 2. **Only test methods that actually exist** in the codebase 3. **Never invent or assume method names** - verify they exist -4. **Extend OpenOTestBase** for Spring context handling -5. **Use @PersistenceContext(unitName = "testPersistenceUnit")** for EntityManager +4. **Choose the right base class**: + - `OpenOTestBase` - Integration tests with Spring context and database + - `OpenOUnitTestBase` - Unit tests with mocked SpringUtils (no database) + - Domain-specific bases like `DemographicUnitTestBase` - Unit tests with test data builders +5. **Use @PersistenceContext(unitName = "testPersistenceUnit")** for EntityManager (integration tests only) +6. **For Manager unit tests**: Register SpringUtils mocks BEFORE creating static mocks (LogAction, etc.) ## Code Quality Standards @@ -258,7 +259,7 @@ private SomeManager someManager = SpringUtils.getBean(SomeManager.class); ### Web Technologies - **Struts 2.5.33**: Modern actions (2Action pattern) coexisting with legacy Struts 1.x -- **Apache CXF 3.5.10**: Web services framework for healthcare integrations +- **Apache CXF 3.6.9**: Web services framework for healthcare integrations - **JSP/JSTL**: View layer with extensive medical form templates - **Bootstrap 5.3.0**: Modern UI framework loaded from CDN for responsive design - **JavaScript/CSS/jQuery**: Frontend with healthcare-specific UI components @@ -827,8 +828,11 @@ database/mysql/SnomedCore/snomedinit.sql # Medical terminology integrati ```bash # Modern Test Framework (JUnit 5) - ACTIVE AND RECOMMENDED src/test-modern/java/ca/openosp/openo/ # Modern JUnit 5 tests +src/test-modern/java/ca/openosp/openo/managers/ # Manager unit tests (DemographicManagerUnitTest) +src/test-modern/java/ca/openosp/openo/test/unit/ # Unit test base classes (OpenOUnitTestBase) src/test-modern/resources/ # Modern test configurations -docs/test/modern-test-framework-complete.md # Complete test framework documentation +docs/test/modern-test-framework-complete.md # Complete test framework documentation +docs/test/test-writing-guide.md # Test writing patterns and static mocking # Legacy Test Examples (JUnit 4) - for reference only src/test/java/ca/openosp/openo/ # Legacy test structure @@ -840,10 +844,44 @@ src/test/resources/over_ride_config.properties # Test configuration template 1. **Examine the actual code first** - Read the DAO/Manager interfaces to see what methods actually exist 2. **Test real methods only** - Never make up methods that don't exist in the codebase 3. **Use actual method signatures** - Match the exact parameters and return types -4. **Extend OpenOTestBase** - Handles SpringUtils anti-pattern and Spring context +4. **Choose the right base class**: + - Integration tests: Extend `OpenOTestBase` (Spring context + database) + - Unit tests: Extend `OpenOUnitTestBase` (mocked SpringUtils, no database) + - Domain unit tests: Extend domain-specific bases like `DemographicUnitTestBase` 5. **Follow BDD naming strictly**: `should_when` (camelCase, ONE underscore) 6. **Check DAO interfaces** - Look at `*Dao.java` files to see available methods before writing tests +7. **For Manager unit tests with static classes** (LogAction, etc.): + - Register SpringUtils mocks FIRST, THEN create static mocks + - Close static mocks in @AfterEach to prevent test pollution + - Use @Nested classes with JavaDoc to organize large test suites + +Example of proper test development workflow: +```java +// 1. First, check the actual DAO interface: +// src/main/java/ca/openosp/openo/commn/dao/TicklerDao.java +public interface TicklerDao extends AbstractDao { + public Tickler find(Integer id); // <-- Real method to test + public List findActiveByDemographicNo(Integer demoNo); // <-- Real method + // ... other actual methods +} + +// 2. Then write BDD-style tests for these ACTUAL methods: +@Test +@DisplayName("should return tickler when valid ID is provided") +void shouldReturnTickler_whenValidIdProvided() { + // Given + Tickler saved = createAndSaveTickler(); + + // When + Tickler found = ticklerDao.find(saved.getId()); // Testing real method + // Then + assertThat(found).isNotNull(); + assertThat(found).isEqualTo(saved); +} + +// 3. Add negative test cases for edge cases and error conditions +======= For detailed examples and test development workflow, see **[Test Writing Guide](docs/test/test-writing-guide.md)**. **Test Execution Commands:** @@ -858,22 +896,23 @@ mvn test -Dtest=TicklerDao*IntegrationTest # All TicklerDao integration tests mvn test -Dtest=TicklerDaoFindIntegrationTest # Just find operations mvn test -Dtest=TicklerDaoWriteIntegrationTest # Just write operations +# Run Manager unit tests +mvn test -Dtest=DemographicManagerUnitTest # All 117 Demographic manager tests +mvn test -Dtest=*ManagerUnitTest # All manager unit tests + # Run by test type (using tags) -mvn test -Dgroups="unit" # Fast unit tests only +mvn test -Dgroups="unit" # Fast unit tests only (129 tests) mvn test -Dgroups="integration" # Integration tests only +mvn test -Dgroups="manager" # All manager layer tests # Run tests by tags mvn test -Dgroups="tickler,read" # All read operations for tickler +mvn test -Dgroups="demographic,security" # Demographic security tests mvn test -Dgroups="create,update" # All create and update operations -mvn test -Dgroups="aggregate" # All aggregation operations # Build with tests make install --run-tests # Includes modern tests automatically -``` - -**Parallel Execution for Multi-File Tests:** -```bash -mvn test -T 4C # 4 threads per CPU core for parallel execution +make install --run-unit-tests # Only unit tests (fast, no database) ``` ### Development Environment References diff --git a/dependencies-lock-modern.json b/dependencies-lock-modern.json index c5156338c2c..d0904bbf595 100644 --- a/dependencies-lock-modern.json +++ b/dependencies-lock-modern.json @@ -7,6 +7,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:MRwxFfn2ZR0XEcUtFzniWnDyVFbKy5os3edidJjDCxPXIRM8x1s5RirRiBKoJHLvGzudZPq1q7A3fBK/ggQ6dA==" + }, { + "groupId" : "asm", + "artifactId" : "asm", + "version" : "3.3.1", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:Fk96WeLnoxM1/LPhcKF4BMqudKGSv1yNdr+QgZ628YPpzeFbSeHYtXE7FfxmOHGAi/XjojvhYo+2B09trwZQrA==" }, { "groupId" : "ca.ssha.www", "artifactId" : "olis-service", @@ -18,51 +26,51 @@ }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-base", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:2oz1V5Kn8WNKXvm8A2eY6F/B+cz9/XfNejYKoaPIF1a298R7OqpMaXBudIA52jxWveES7E7BLAoBAiP/fwC4hw==" + "integrity" : "sha512:+yroXyyOv20n0FZL7MzFG/yixcn/dBko09lAivI+uJaEMNJUtTGusVZI0krwXJm8ZgyqE6eGWrvPQfnhh8EmJA==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-caching-api", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ItuEAtdoCmu6iKtO9KxNCT2pwq8u3IIzoAkSmmpaIoJoXfPHUzIp3hagNf1Nh/QR/2/29CYbsPXH+GhgDHwoMg==" + "integrity" : "sha512:P7sy4EBGDXhLcZPUsS3xCkperUfAmQV/AJpOV9VLTudj9qt42wVGzUSTSX1GqrCBtyTz+7iF4wmpCi6dXnTuhQ==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-structures-dstu2", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1bxFD3Qa1axzg8dd0jWud0F8kxQbtdcodEMNKHx/SnJLI9GU/H5Qv/5c/deTQaaO3YY8wcip3IGVL4uaVUd0Qw==" + "integrity" : "sha512:dvDZ+0AGbT8G/IyHLgIK4WdosfJB2XBHNTAkPfijL260i1Y+uhr0WJKikH+Zx8HlCdwZ0NZ6M7VM6kcBE27aeA==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-structures-dstu3", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:5yZoCN6xvQGnLu1j6aky7jF9Exrjc2HgQo4+oMuF5+cE3+Lcx1N+jsUc2YQ0mMbog23Sq2iXpLmLG9GTE3pDjA==" + "integrity" : "sha512:TwbsA/lm8DAkBibmgATRxK3WBM/iGZsuO0SV7QI65QGXEDMWM8v4IvkjPfAybFU8NswYIYLI3DT57SGEWBBPKw==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "org.hl7.fhir.dstu3", - "version" : "5.6.881", + "version" : "6.4.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:HFvhYUucEcYMFddx5KvZEcQPkDrQkJLR+MpZ9za8oDeJ6boQYpgip2CebgS9WJZEdG2ZaqVpoa6ErtMDI10C4w==" + "integrity" : "sha512:jsXA+nxwtcREDusL853GitoYNywUJULdej+gWT0Wc7zo01zAPhblaiRS3UeBcFJ/5vWV0tD3LQhG7OTPnTIx+A==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "org.hl7.fhir.utilities", - "version" : "5.6.881", + "version" : "6.4.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:IONZ+tgMGxP9M1ZODhlPremqpT6nnVZRzswNMbxLzEVlvRAJq0koGPixM2I29ZX0SkF2CATU2m79vgRXt5+JSw==" + "integrity" : "sha512:0HVxuI390ovXEuMjSTpKyjTIgcUyDpxXb9/4kioGcIBQJTq80sz7Q1/HzOEEW8KOQpmhUEZc8ac3PS1NRQXiSw==" }, { "groupId" : "ca.uhn.hapi", "artifactId" : "hapi-base", @@ -168,93 +176,101 @@ "optional" : false, "integrity" : "sha512:kGAn8E5VII/duD6uY/Elj64QAQfijpy9Z2qNS99znBh9P5v6nLNyEc5KC3LzZQHeMAzYgG4fSwO8O9mDA7laOw==" }, { - "groupId" : "com.atlassian.commonmark", - "artifactId" : "commonmark", - "version" : "0.10.0", + "groupId" : "cglib", + "artifactId" : "cglib-nodep", + "version" : "3.3.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:+qHSEh6HrmnheeOq4heszQg04Npxa5GgKf1SbhkmEucWdfJ0C+30jiPvHtxF9nKivhs+eLv7GtWclt09L+7tug==" + }, { + "groupId" : "cglib", + "artifactId" : "cglib", + "version" : "2.2.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:e/GJjmMm624By3ec2psMA06QG1WdQa9ST3HjtCWD2HwDvxVDJiTPtOsWdwBn5JWPIiI08okSM3w3q/AAMdAzqg==" + "integrity" : "sha512:IvR7uftlGA6jAcsHjPWKqPGa8RCx7zt5DJkyItTs8cPa8j5LHIBOhyld4q0WDlvwjRxNm1Yw3DH9Kj5JDbUipQ==" }, { "groupId" : "com.beust", "artifactId" : "jcommander", - "version" : "1.78", - "scope" : "test", + "version" : "1.82", + "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:XuLvTBKIikjXyDAYnQbuimU8dmSlPJtvqTXU54ZrBFQRH4CS1+zghuyAxh7asoVhh6HiR4c+XI5HJO+wLDdQSw==" + "integrity" : "sha512:csm+tdKC7N6629WVxPBXEFmTKOSEMtwZaiYdiXPsdn1SA45b0m58C3i4W0RVaH1Z+dCjZyIehI45xy8vWDuvJg==" }, { "groupId" : "com.fasterxml.jackson.core", "artifactId" : "jackson-annotations", - "version" : "2.19.2", + "version" : "2.21", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:gJ0jlw/kr2FXz9/Xo/m5yj+A55D6rbMxPbBhVcpPth40djqWGUzpDVqiUmTdoRJkKKwHg3yZV17t9Cc8J+RJ8w==" + "integrity" : "sha512:2DKpmGeswtWvslltp2DFDmprVMG7yObEGG8mehbh1Vx6kW74sDStayd8QeM0K5Hc3C49zqi9zP6J58FHiUWRvg==" }, { "groupId" : "com.fasterxml.jackson.core", "artifactId" : "jackson-core", - "version" : "2.19.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1tZOwJgZu5AdWfNL+cQi5jL8jQlP+X/FPWlay7C4F2jxPkRAYRdunnmsGTTkQ86dHV3OUQSmYrZO/6la5XQwMg==" + "integrity" : "sha512:9LFToKfJdGIN7D/P5KSGnCYyq5f3PCZiBBr30OsMQq1GK/7ozcq1VChCF1uWGX3x2RCohBBnZU9udjs3DBjM+g==" }, { "groupId" : "com.fasterxml.jackson.core", "artifactId" : "jackson-databind", - "version" : "2.19.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:BTP+qaNaLnuSZ6YqOSUtOsXPirD/MAVyQoMaHhfCMiW5NffC7WTedYXqg+VsMuJrtgeNmDRlTgR/HKew7gDdcg==" + "integrity" : "sha512:g3qU4gR00K02MGY8ARLpgpFOXPo7vzl7jDHQC2jX/I5FFEWLdd05z3Tt2n4zM5UE+oRYZEdnhulIEr02paQo7g==" }, { "groupId" : "com.fasterxml.jackson.dataformat", "artifactId" : "jackson-dataformat-xml", - "version" : "2.14.1", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:9aim9EXBV+ubRhVWagHL9fkDMB5LSW3LyEE4Fh3GBiJNcySzCgyFHL+m8rmsflPQc3ZzXTGSoPmLjEGceaRgBg==" + "integrity" : "sha512:ssyfsNOBY2jWYB/EvbwMu5oCdXxGN6CqU91PGHK/NxmVbWvdRq1OXoIrUhn/OVeIKjb8Vbz5E0Cix4G11NlxzA==" }, { "groupId" : "com.fasterxml.jackson.datatype", "artifactId" : "jackson-datatype-jsr310", - "version" : "2.14.1", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:6qSvSdIuD+VJDjki/0vDiMt6tyNe2jtzzL+7OpmYmYmJtoaXfRSgan9Q4Tcu/DQuE5EIBV21UpVtFgFmhV1Pew==" + "integrity" : "sha512:BxE+iZ0BQd8EtvEYOv9zzFikEaGRM7OTUrwiGuWNKCUe8RTkjgOck4dgswxeIXpb1EPqyG/WB0RfVzyykKAYiw==" }, { "groupId" : "com.fasterxml.jackson.jaxrs", "artifactId" : "jackson-jaxrs-base", - "version" : "2.15.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Y1z10fObhQt01uJ3mWTNSGSj+P+3PnCGMpSI9nLeo3iDiuYiigeVRMt4OIyq+yYhIXnX5eQzITL/rFiScw07Ug==" + "integrity" : "sha512:MErw210PV4v5zLHBDIM/vRIgU53ESeQeib3bINuFvXINpqiL/nsg91eMzr1u6yFIQYY4evONN6wvl3SGvHgLsA==" }, { "groupId" : "com.fasterxml.jackson.jaxrs", "artifactId" : "jackson-jaxrs-json-provider", - "version" : "2.15.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Hr/94SGXnABae8hu0ElRcjYB43g7WLA7uXEZpvT01CrLXoVP7eIA27f37eq7+mbUaOUWwm3XNEt9C8Xe8A+V8g==" + "integrity" : "sha512:E0NbYGkpiwj4ue/8gDzDSDpPaU1Dyich3YTYPlIZZ4UjTfsufvUwJcsvUL5LDSUs1BtMMOa7aq9RjKAzeaEVIw==" }, { "groupId" : "com.fasterxml.jackson.module", "artifactId" : "jackson-module-jaxb-annotations", - "version" : "2.15.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:JStWAs5mgxg6w+3rKe4TMmUYAbs2I4DJB3ENPvbTb1NYIGnlieeHPFeecty1kO8/Xlo68yopE3YLjccWnopQrA==" + "integrity" : "sha512:1GXo4NdQx63jzEqS2LS/nO74zSeHfCFDtqkGaZDU3gZUrt5x3B5Tnh1TVn4rUed42HOgf63QQ8FHUnoItiSLzw==" }, { "groupId" : "com.fasterxml.woodstox", "artifactId" : "woodstox-core", - "version" : "6.4.0", + "version" : "7.1.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:faTNUfcILlmzy3iYjNp4vxYuKwJFfK8XJCy5zqm4ACraFdTf53TKA1Ws3qlciLZ8TQaiemFlPLhMmkbSeycmxg==" + "integrity" : "sha512:KBBdZAl2aWYSPU4hLbpVXEd2v+tTgJPTc57xE95cbW6SRTqrwWkVv7dhJKXcyCtX880TtC6i5AOKRJUoXGQtOg==" }, { "groupId" : "com.fasterxml", "artifactId" : "classmate", @@ -272,133 +288,21 @@ "optional" : false, "integrity" : "sha512:x390I/2WtbYVkjZTbk5LUJAyzqlDaBhrhsmfTscs9A7PsmghzHEkB3NjkCziuRZE4y5T+n3j/OmIW0ALBCTs0A==" }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-api", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:peR3qbanhvSzWOOPTB7t4ezXbs0fvRSmgUM8MuVaxqX7EWYtPnodneq83b3wrekf0pGkP2b5V1sbjIQ0YD0UHg==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-core", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:u8QpaOlueaYoCtK1Ne/YKPfxEfFSanT7PhMbOBeYX4TyQGdP3pOWw5lX2bODMudt/W9fqCrbq8BlSF8DAnI3eA==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-httpclient5", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:gPJFa7ey8stLu+FTqytcRlCXb+L/4YLZ4DhVpQ1UivpmpqCqz/XAL8Y0ZC2u96wnbfyzVXZOGLv2GFEGckOhuQ==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-jersey", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:wiSt8bnvY2Zfe5Hs7k7wKXrB8fwFECaqytfVTIUrsz6L0ZGRNfgDxSPnzQmymLb10QaYCjiMl7p4ABMa11PvLQ==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-netty", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:zXokfJ44d/armf1yVbhznIIFzTM39v5ygGkCnBVJ1NTlVch7qhGFKQ0v4KFOwDyVApXi7w6UX2D/ELsKgMmu7g==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-okhttp", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:3B3MiEe8fecbq4Hzk7ikOWlpUmSHIuhaNPCiy2x+aG+OYLUBLRgVHhEjwpe1YJQf1nyfWQN6XPm9NnyhGROL1Q==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-tck", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:QYm7Cwyn72frC13bqevUIhey5JwITYucOJYII+uUbaXWdZ4BsVlIDrBp2JAblK/r22lM3Bmsjfbca36PygngBg==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-zerodep", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:ZZxtdwBieksCdzgDibCvYQnZl1IYcPPQYUaXmJz9Vh5LX+Tlh5T4MmPHs4lKOGL8KanI7P7KoQ5fMHYX1CCj3g==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:oKflCFLndOlu+tghIdqrjY7dF2/LFmFj7jkRTkPVNw7XIXVVkA4fnwRyR+8mjSYGzfVY11TWClFKBpW60aiyNA==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:1AcoIzMgAOx9ZnABBgRpVp3pDiRtUi0dKZVma3Q/22Agg0kvjgqw7Vaxz/bfkjFdfnNcADzOiM6QBi/tVIzGGA==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-api", - "version" : "3.3.3", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:p/hg45FBOSnUa+DSp/M6Tviixm/RMezEHiswBiaOVwAb8UmCIlkp/loGN3Z0VLp4inKi+2g+nEl6A+yN05eOKQ==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-transport-httpclient5", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:JsjL731H992hg/HEhSWXYppl9dCE2qMZExWA8E6tc8ML5GRQOBxQY4yw4kY0/lZbuXtquwQlBweTWdEGEsg4Cg==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-transport-zerodep", - "version" : "3.3.3", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:MVGkmS3KanGkv+3I4PP9v8Iiu2DYnei/wTDJpo3fdy+m+gFyBLm+5bo2mN1XN6kQuBfMDRso0CSFNZGNZopA9Q==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-transport", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:2HrYpdZlkrjWS/ks6FFH4b4sYD97DWkpgeKDHQgTtzmE5p4cGMk1BvIW+PEDkNFZY2zV7wYYnB60vApSAby2kQ==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java", - "version" : "3.5.0", - "scope" : "test", + "groupId" : "com.github.hazendaz", + "artifactId" : "displaytag", + "version" : "2.9.0", + "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:YOFlogT8PaiMZF+l4g1nQVw5RRxXegegKUB3xbCYBWcrFvn6hqq8h+hrN38cI9xSsIwHkxljLjVYGomrpFEv/w==" + "integrity" : "sha512:BERkZzVHVcWUGG2qGbqxTfxLQbhb2DbH0kM76zqu0kuQk32c5ylWfqogj3z5Rx3y3W7dz71M9m/feVGo9kBkAQ==" }, { - "groupId" : "com.github.jtidy", - "artifactId" : "jtidy", - "version" : "1.0.5", - "scope" : "compile", + "groupId" : "com.github.jai-imageio", + "artifactId" : "jai-imageio-core", + "version" : "1.4.0", + "scope" : "runtime", "type" : "jar", "optional" : false, - "integrity" : "sha512:UbdO2vyS5w9gNRSN/+ek6fQcdUpQEeSoTYKEzFOJ/HDNu7I1hENRAoyS7qAJ3OtgO5VQGkDO0ELbqFyQx9FwMw==" + "integrity" : "sha512:X7AWF3F/3G21FP5torJTw9klMmGQqLoQGUHym/9uPBR+YhbFAcpmtNQFHSE7HAX62zcHVjeCv8xWdDVzOHhsAQ==" }, { "groupId" : "com.github.librepdf.openpdf", "artifactId" : "openpdf-core-modern", @@ -479,6 +383,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:EdDb32zXrgLV5/ynswZ5zW1uDxugc/K2Ht4ir/0RjEcWPk+mbn/70VPwDlPwBsDqWv87Tna1fNePpTIAE/dw/g==" + }, { + "groupId" : "com.github.mwiede", + "artifactId" : "jsch", + "version" : "0.2.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:xpH5Az2cdhqdsVI4+1j41Pg2EQRMVW4GusqL4Cba7ec5ZLnAewAB9TpVtIVzYKxGH1SmVT7lr1qM32gSjC9mlA==" }, { "groupId" : "com.github.openosp", "artifactId" : "ultrabuk-htmltopdf-java", @@ -511,6 +423,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:L+w8UAxL7RQ6SOhOmNWTjcR3SDDpyHbK8M/Di9nq7RiQcnjropJGd1T9EyyfuzCTAJ89yR91/xprznH09dQ7FA==" + }, { + "groupId" : "com.google.auto.service", + "artifactId" : "auto-service-annotations", + "version" : "1.1.1", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:nUnPlCadtiMA1f14JWEweH2f0ITxRZ1ju7Ns8al/DSvmElX/zE3JCEzDeY3W9XfQ/2tx/a6PyrolS/6YRe29fg==" }, { "groupId" : "com.google.code.findbugs", "artifactId" : "jsr305", @@ -575,6 +495,22 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:7ZquT6pWwE3Ahq8HB42zc09nXrQYi7K+mMlMxZqOTne3QZXEfXDHtpe8O5OOEG/cE3/9pTWLMCl5Xyjn2SFtaA==" + }, { + "groupId" : "com.google.zxing", + "artifactId" : "core", + "version" : "3.5.3", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:C18E8cF8JoanCb+9IXo7zYyeFDE5MFmGsGKmz8QFDQ3kPeu8igzqFd/A+MAJtisMmSByKMF1MO8FpGXPnWi5WQ==" + }, { + "groupId" : "com.google.zxing", + "artifactId" : "javase", + "version" : "3.5.3", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:fsxQfCGrCl4kVYrhPG6pVrKDe8S37A3twA5g21+AvXuwtjIGhbG7n8pxdFuywhF/2FXLOqEpLCiEwD/cPHhRkg==" }, { "groupId" : "com.h2database", "artifactId" : "h2", @@ -594,59 +530,19 @@ }, { "groupId" : "com.itextpdf.tool", "artifactId" : "xmlworker", - "version" : "5.5.13.4", + "version" : "5.5.13.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Tj69vcCRv0r0mr78sY5gHPfpojQ2WCg7J6+/K1Jhbta/vUhRwmitDPUFrda8DQShTb3uGRkCbF0Rkw03+0zU2A==" + "integrity" : "sha512:qT6Z6M8/iR6PQgI1/y8xfPoGe6iQElOtmuL0OTTRy1KfedxSz6mNqE5KLmB8LdvEb89b3H+GiVl7G30smd7EOA==" }, { "groupId" : "com.itextpdf", "artifactId" : "itextpdf", - "version" : "5.5.13.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:HCHFwerQk+96YOD6L8Xbe65mrOsBWdffo4Ynwu7htpmUtv3IjNT5ZXOT87noUhYzO7ZVbkQjYAFOB388gGWWmw==" - }, { - "groupId" : "com.jcraft", - "artifactId" : "jsch", - "version" : "0.1.54", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:l+xt5k9IcO48hPiDvTZkViv9YAyp8zZJZufb7n5OhSBkfAP5+B1oCOMwBSyhMz439JfWJSzSb+chqQ9XPL4gNg==" - }, { - "groupId" : "com.kohlschutter.junixsocket", - "artifactId" : "junixsocket-common", - "version" : "2.10.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:VXhwRNHNOt4RNk0cDqEGYOFSFWHNz3sSZhaOvibWM0A2SpZ5BYEAr6CW7wk3j11kfvu+v8t4AE98WjjXx3qreA==" - }, { - "groupId" : "com.kohlschutter.junixsocket", - "artifactId" : "junixsocket-native-common", - "version" : "2.10.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:sXIDC0TFQB6WcoCJMct5WDDV0d1azfWtRBgt73w6s5EA5W5YMljGsXf0Y93XG5wXSGaMSgZOwuQMsZq9WFO/Dg==" - }, { - "groupId" : "com.medseek.clinical.service", - "artifactId" : "SSOClinicalConnect", - "version" : "20171101", + "version" : "5.5.13.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Qy0PyfO7id0Jsx6jlMDPsKtlcdy72unF0eM6zOp9KQ3hoWylFsQ7Qfb8/X8nlUv4xdHKqfXyPgJroS1rpJZtCg==" - }, { - "groupId" : "com.medseek", - "artifactId" : "PatientService", - "version" : "20161213", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:HLfbp3yV8KzFFEqazKmkfg7/oz/N7MRg2/PRuhXrgB6yJ8VZUzczVaI09CbuizXqdJEQH4rQMyYoQ0wS1WcEWA==" + "integrity" : "sha512:k8jO0QMHnJwgWpF6c1nn5ga8E6GsaZo2jDPwZWK6nTVoWa7i/OE3DT5vMwkx0vROptpnFABOnJ1Mm7R5JRD8Ag==" }, { "groupId" : "com.microsoft.playwright", "artifactId" : "driver-bundle", @@ -759,22 +655,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:uh0OM4Iv8QHKJg3hH1om3U10ie0Ke+ZVRlG8qS7ne/UkPERLpHJMP1Y62IYIHYidXq1s3PjTQaHrOwodV3B0cA==" - }, { - "groupId" : "com.squareup.okhttp3", - "artifactId" : "mockwebserver", - "version" : "3.14.9", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:MoJ9MAmEhIf26SxscGXv0N3C4eSUXmHPueNlfwf/NwR+EYkIPSWAs35XGxR/1W9gtRAPJTFmWvlRupzgFfDOlg==" - }, { - "groupId" : "com.squareup.okhttp3", - "artifactId" : "okhttp", - "version" : "3.11.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:99iBggx9a5ygv23I2BKOF2kVYtw5IC03Y1Oxc1SqgDEbbOD/WETlekrBNOC7OgOTEe3xysM0/TrnjqXzMRbTiA==" }, { "groupId" : "com.sun.activation", "artifactId" : "jakarta.activation", @@ -826,11 +706,11 @@ }, { "groupId" : "com.sun.xml.bind", "artifactId" : "jaxb-impl", - "version" : "2.3.3", + "version" : "2.3.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:gkCQxFbuEgVxmb/Zj9rlNaMIBbFsgleUHsj+bsq7p7WHmhgz7QBNtAHH3ZKOXxAhb1BBVYSqSPw3smMkBf5jJQ==" + "integrity" : "sha512:aVAkjiBa0+sjLpmjDTZS6/6fTdYP5MDcn5YuknVu0azKodvABehnBnvH5HxDXRQ0aAZa8m3p55GmoX/tx8MwYQ==" }, { "groupId" : "com.sun.xml.bind", "artifactId" : "jaxb-jxc", @@ -858,11 +738,11 @@ }, { "groupId" : "com.sun.xml.fastinfoset", "artifactId" : "FastInfoset", - "version" : "1.2.18", + "version" : "2.1.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:0bAbTBwhTHmSnJGUIbXqfz5FNVG3GypJm7SGehXw2HHM5rlL7tE4azSkJmb/IV7AWPuGRbxTC1OgtraRsfNKsw==" + "integrity" : "sha512:lk7166D2p75eSpEF5nSGhGGNWkqtB4GPaBt/Hp50g2ETF34CGU8EL1zNMrRbGt2OBIpMdhusurSSPeUrmg/YJQ==" }, { "groupId" : "com.sun.xml.messaging.saaj", "artifactId" : "saaj-impl", @@ -955,11 +835,11 @@ }, { "groupId" : "com.zaxxer", "artifactId" : "SparseBitSet", - "version" : "1.2", + "version" : "1.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4End2aJeao5rQwfa3+yR2PbpJ51u8ipQ0/KfcTgjEdIhCXDtWkvRw2WbhAIiQAKKCqyjxxuqgMuFnET6+wcVHw==" + "integrity" : "sha512:xWCfL91yqy50YaA8hQBKR5QbiDkm+EZlMCv/81q6X6SNTOR6wkMUo7wt18cOH42CRWflAm/RdIWwbESZmUKvXw==" }, { "groupId" : "commons-beanutils", "artifactId" : "commons-beanutils", @@ -1000,22 +880,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:zH/dfXvRhRtI0QiDdm+snXKwQHcUs8ZTNpEw4yJL3Rmky5QfuBPd4ejH0puwelsaRNYRJA6tFxflGhWjHJYw+A==" - }, { - "groupId" : "commons-dbcp", - "artifactId" : "commons-dbcp", - "version" : "1.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:wFErJVxKckJjS4IMeMOXKW/JOI3s603sGZd1NBWY8Mh7IRZEJal9/erfrZ88gOHU2rc10ysTYjd4IKQgS05aeA==" }, { "groupId" : "commons-digester", "artifactId" : "commons-digester", - "version" : "1.8", + "version" : "2.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:E4qq3eaxNO6zlXT96A+O7R3uSnBJ/M3YxGLAoN+rVBm6/SWed7mdhQlLTnyGRnPwcknDnDsYr/h+85s2Y/U3og==" + "integrity" : "sha512:osgiaQeGtB4KAlBseq9+ikuCUepx1peO4D6CsRyiQuSThtbahNvHGC1ab7FngirtIA2i2X4vJk1jzPjxuWgayA==" }, { "groupId" : "commons-fileupload", "artifactId" : "commons-fileupload", @@ -1032,14 +904,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:eGd4UpQ12KFKts4hds3yue5lhacYk7eF8mJXEiFm3O/HxK8/YS7aOXSwbBbQb8NXF4vyi5t0AQ6bwEwzIhrcLw==" - }, { - "groupId" : "commons-lang", - "artifactId" : "commons-lang", - "version" : "2.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:rjW3YdFvQyfNtv2hZ4kWb8ZwIO/XH9LMM5W5dET0Od/Mfu6Uij79OwJEBBbK64c0F9ldtqKxb07xmN6dGvvARQ==" }, { "groupId" : "commons-logging", "artifactId" : "commons-logging", @@ -1056,14 +920,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:f9hVMOAiBKjK9GJ/JpNiA7H7rMu50LCcPGT1i2O3OOmqrimqC4ReCe+5pw2d0VQuu8eQJbPrCcH7YupPepydgQ==" - }, { - "groupId" : "commons-pool", - "artifactId" : "commons-pool", - "version" : "1.5.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:u1pm19qPOJZg+zacGm53KW85I5zKHWnKG3yA6OgcOKnSXevvtwKi6qyYfoOIWJjKDJXGOH2EQOVIZT1r2uaGpg==" }, { "groupId" : "commons-validator", "artifactId" : "commons-validator", @@ -1072,14 +928,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:TwFPvvJ26/FjK4lf62j/EougiuxjxO31bxHm03M4W3DWzrtxzJWaGBclVXMCBl1azuLu6orRzlaDGuwbO2YKhQ==" - }, { - "groupId" : "displaytag", - "artifactId" : "displaytag", - "version" : "1.2", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:zejfe+mZG9NlrupVMNs/qWNs86GzwuTzE+6O2g78Glg3V2Jj/VQmiDgbNUHGdfo8xXEqVllBQpMxAXAKDIHvyw==" }, { "groupId" : "drools", "artifactId" : "drools-all", @@ -1096,128 +944,46 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:TSXsVUMPPIBP0lpkm4GwlaH3QqmLmWsjEM14Vn7zBZZDzE04U24FyezojodAnXbFcEctPBfGrM4bvSInnVlyDw==" - }, { - "groupId" : "io.github.bonigarcia", - "artifactId" : "webdrivermanager", - "version" : "6.1.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:9IFmcBdnemg/eGG349+t9NXXP5C+ZDAqKLL3FgQFBKVjnj0aM4VImU5yGtcODl4bOt7fydczzsPwhsFWQ4hQ3A==" }, { "groupId" : "io.netty", "artifactId" : "netty-buffer", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:HMXqJdDNXBGUwl6/rTTB3rSuwlBCUTAUy38OslLqjHbkh8wkEzb/5m7ZRPvOEdvm+UAw9UVraSHc+WOiWjjsJw==" + "integrity" : "sha512:TZ++bNn6SnhTDlaAt/7D+agp/899U6zW12iLPtHokZGvdmKC6gNAKXpCd+hTcZuV2JjNE4JEjdF8iQtBSxD6NQ==" }, { "groupId" : "io.netty", "artifactId" : "netty-codec-http2", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:iYjWadmaKZolqHrV3a4THVfKjltSEF7uqWbOHDUmt7Iwv4EyPVFYQk4cifI8yNHZNcmH7D8yStcHHheOML2PbA==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-codec-http", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:AxlOlh2IHmolHOWPXYsSIXFNNgQzDbe/EtCPVaqX72s+NUS9MaMiqOSYxB3rHjuglVT1lCRc1xyHv/r+QTH3EQ==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-codec-socks", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:qELVAKundBks0LAq/PnjsEL4+g1CxoI/jgR4zbklvmZI+l0viOG7ELwPndMXO6TeqkylWcTQuTevmV7BNM7uPw==" + "integrity" : "sha512:vxWCF/NlHB5j+5GOY6lCHjHeP8gdAOcUkU0BUx0P9vJNaLZNIKnMKo5XbWdEh9l2yFga77vf/cLk8Ah7gSQjoA==" }, { "groupId" : "io.netty", "artifactId" : "netty-codec", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:smCgGx3YNElSDg2/g84jKHJa9HaRJTSjvPK3DWaoJaLqL6FRA/STz1SeH/m7meiPZoXsDSyUxTzC92Tmt5uMjg==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-handler-proxy", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:tGOJ0RTZyNPiH3cdIK4b5vvHKgIvTVgQUfIhTlpzSuT+VmrgHpLhli6dD9C7yXJLRbi2tILc9nD6HgRkVvyYbg==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-handler", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:lCjdVI/tv6RWKLzp5BbJIQSWSEl6BvO/pvYvImIou5eHqAxXE11vVwdFIF3kr/4ZkHaIGSx1WjNomzKQTROeQg==" + "integrity" : "sha512:2Y3teF1BFRL7Aq08NaTzA1EGjTxAeIM2G/VE0snNNbid5avgA5BDHw9dgHVlwySA3K7Why91axuATNOya3BMiw==" }, { "groupId" : "io.netty", "artifactId" : "netty-resolver", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:eMUz585JYi86VLu/Ytu8CAJq9xXb/k6QkkcO6C2H2Qk+rQaWnJP0tQjeXIrll6jzK3ucWKNO+FueLDBhn7ceeQ==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-classes-epoll", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:bFepuNF8XbgGAzUA/alfjfRiqYQQ9l7STc9xmZHNFDiBB/fgnjD9RsyJcVBNXxwcWW4/WL2AHxcy16yNEY/lng==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-classes-kqueue", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:toVbGeh8DctG1Cr6EhPkTTpJLjQtYpS2BNd7lhNx8DMmwRFiSVrpL2mstSnWx86P+2RNGMT4ESgUz7L2A4S2wg==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-native-epoll", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:agvkZPCFgT8TQVZnF3YqQR4Ny4sodN5NU3IR3K1Hw0qa/OFYvisa69s4zQC0sOKv+kdxHo418Ko6hzMd1JwNAw==", - "classifier" : "linux-x86_64" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-native-kqueue", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:Lw6dFmkjO/em3m5Al5+4lQHoSQKrTWiX0TzeZRF0wzwOgn8gY66rRI3agreoFbjKGfXEyWJY8eeIokooZRZ0IQ==", - "classifier" : "osx-x86_64" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-native-unix-common", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:ewE+RJNB/Xwa+nxYKIdxdKuSb2Nh98W8ci3y50vAs7gxNus+YpShFZwaFldAiZs4uympfY/XPTjqYoPuMyry3A==" + "integrity" : "sha512:X+Kgn7DSj3hELxfrWpsZ/9nohX9InMUfynI/hOH6JmzzelB8tk1/QhDmD5Q4R4GtdgcyxfpwegYtSqUp0RaXAQ==" }, { "groupId" : "io.netty", "artifactId" : "netty-transport", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:bg+TSYsz28O+a/6SWtXw8Ap5cn5SAUQpmK6M0TEdFIArqo5ahPuq2Pm34BErtqT1R83hBF1Uw9mZCHdYHkwsvQ==" + "integrity" : "sha512:3ulAVVAU1Ng/XJrXMIUomsIeAzf9x+svAjqmt4v+7iS2uhdUREU1+4JrIoe+AKY8fBI2Ay74MBl6l3lJs2hZpA==" }, { "groupId" : "io.projectreactor", "artifactId" : "reactor-core", @@ -1250,6 +1016,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:0az/FGwPnqkjqTJa1MIrogUuxHQ0Grg5Krq36KvTygENskAP+bWEn8Tx+lwKGIMOsQTaB6E70mtPCkPRZ5NYeA==" + }, { + "groupId" : "jakarta.json.bind", + "artifactId" : "jakarta.json.bind-api", + "version" : "1.0.2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:p5HpnV0AGcWf98+Ho6UXw5QS0erJeOWf8Mc7yvfihE2rreStgQ9mvUMT04M9k77/Vagu0TCSKuP+pbUNmEiaMA==" }, { "groupId" : "jakarta.json", "artifactId" : "jakarta.json-api", @@ -1274,6 +1048,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:Hgcle2Ma4zMacdfNkTYVLN3rvnhrpQxom+xhip62Wb6OlS/gQF2zYzLLbBLGyHxtZI6BfAJ+qMbgxmDOgvb0JA==" + }, { + "groupId" : "jakarta.servlet.jsp.jstl", + "artifactId" : "jakarta.servlet.jsp.jstl-api", + "version" : "1.2.7", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:7xaiGQwv8/Y8vYJbqJdno+2fNvHae6dcUMPU5ZjU7hcRYmm/OZkgVSvJh+2132ycqnEZBICul7f5+ry+kGGPqA==" }, { "groupId" : "jakarta.servlet", "artifactId" : "jakarta.servlet-api", @@ -1282,6 +1064,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:HOSgWf2pocerdRr7E+wFRG11asQY3ZX4ztNpsE9pKKds9QAD+Jsbhtlryx34uPf/McUWtShxVe6pP2g/c9VKsQ==" + }, { + "groupId" : "jakarta.transaction", + "artifactId" : "jakarta.transaction-api", + "version" : "1.3.3", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:dkrei6gHaC3NHsc4LDUnXz2KsJoD1bRcSOcyUBGQ4nOCaQgKryiqjdZWwR7oS/t9rmlT3Sdo8qzs06jPDKSWHg==" }, { "groupId" : "jakarta.ws.rs", "artifactId" : "jakarta.ws.rs-api", @@ -1338,6 +1128,22 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:Z5z0TDudY1tD7RIqVV1XApLD8JN8M4ccQEOKGlPiBYyAV4aU7JRm6snigOGb+3qVsmFZTMTBFhyF3JffYjXlUw==" + }, { + "groupId" : "javax.cache", + "artifactId" : "cache-api", + "version" : "1.1.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:NYJKA86QsZiq+xjnlDWU7YM7JXvwLl75aQ14IiTmg4IyKYQwYnRVu163qRvNQhRLNCc8+Ec3GdfX9kY4FkyJ+Q==" + }, { + "groupId" : "javax.inject", + "artifactId" : "javax.inject", + "version" : "1", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:4Sa3zPPkL9GYSgvu8QBKcmmjN8IC5Z4E6OKvcUKA0vLY0rpeb1lIG43NNKrzXJZqaI0LSOx+lvECwnTcDTs4Hg==" }, { "groupId" : "javax.persistence", "artifactId" : "javax.persistence-api", @@ -1346,6 +1152,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:AT5ODv5ksc9nRNzkTtcWtNhROyrVtqATGvZjt5GOtlcFvQnU33Y/9KgQgp9Pa2wZjKdnDOQ5lAvleu0JFLUT+A==" + }, { + "groupId" : "javax.servlet.jsp.jstl", + "artifactId" : "jstl-api", + "version" : "1.2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:5PZoZ3fZ0HMj4bt4XpRKwtsJ8mpNXEbJhHKAEmzVUv4QR1jkR3U4xsiWNK6xx5S06zKjwhon9KFU3eHZ4yZC7w==" }, { "groupId" : "javax.servlet.jsp", "artifactId" : "javax.servlet.jsp-api", @@ -1354,6 +1168,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:msaevADQDl7bKDAv3VFcjmeMrRwsusutSHs9hMdIJ1Y/yjeDgwYc4DuNnuUPmc7ZQYzJ2NZOSe7zInAjLWYMig==" + }, { + "groupId" : "javax.servlet.jsp", + "artifactId" : "jsp-api", + "version" : "2.1", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:8yCRW/J7BfX5OmlXL/Da1uaPAwtvD8sYMvgPf/5W26ngV13Y5rBCWzcErHXqK0p2Vr2tZLjMhhC/3NW8GYncxQ==" }, { "groupId" : "javax.servlet", "artifactId" : "javax.servlet-api", @@ -1364,12 +1186,12 @@ "integrity" : "sha512:dj3smAH2R7GkXkkusqZ/amD8YIvvRzjrexqS2T8fbbArMvTGVT1FV8Mg38JcDqC5hUxZ55MmK2ykU8ccrwXvOA==" }, { "groupId" : "javax.servlet", - "artifactId" : "jstl", - "version" : "1.2", + "artifactId" : "servlet-api", + "version" : "2.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:+2/jOSJjG7ohtgbLXVPERXBx5pXsVjIgUYUoHn2z4tY9lSSLQ7nH+yy1BC0Uome4fSxdp0LJiRdMNSbczyOu7A==" + "integrity" : "sha512:NjulWQQ2q4IGe3ouFLSBrrKxLKQEjXoVGaLlSbLTwJ3fcYrGTcK+bC/CTFH9ycgWAmEylAMRM2lYjOJ9h3cdtg==" }, { "groupId" : "javax.transaction", "artifactId" : "javax.transaction-api", @@ -1378,14 +1200,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:NJfPdzUqoTF8cK0dKOjn2lEzfYRMgiejVwcgnHULpvXWRKT/29sQ5fveIEADqkP/gOni/zFkWEp6NNgpImayvA==" - }, { - "groupId" : "javax.transaction", - "artifactId" : "jta", - "version" : "1.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:+ppatR+X4s1jtcHLF3W2Ox7cAZeu28wOirMRbf4n1HNlhl0k7vrxm2SFVLYPGh7OE+MZLRV8MZNEqXrVUcYoxA==" }, { "groupId" : "javax.xml.bind", "artifactId" : "jaxb-api", @@ -1394,14 +1208,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:k6R7JFq4MNZkpIydFOhhmKOICc6U9yymaz1odGrh17kC9v7y0awaksAXAVSa6AoH22m9gi/9gxqV2Nv/rUNXkA==" - }, { - "groupId" : "javax.xml", - "artifactId" : "jaxm-api", - "version" : "UNKNOWN", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:k8O8gXF/hX3oclm8qkULbFIgw5SgnQBKoVm89dUt+qH37s5Dyw2K7CPTJaHz7KSYjrKuOoG0OUMtYwqvRRILXw==" }, { "groupId" : "jaxen", "artifactId" : "jaxen", @@ -1410,6 +1216,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:ytWC/BLQdB6eb9fgz4ClD+sE9e9CBD35b4pbeEdsd2ldi0ODbSJB92s1Z26nWZIe3SXq6ywE7JFusTiqKQHOXw==" + }, { + "groupId" : "jcharts", + "artifactId" : "jcharts", + "version" : "0.7.5", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:OVOQC+vjj0JCSZ0QbVlCX1S3PAR4wwUPDcCRfVw2zDX5TM/qlua/hemxKCvVcvVa/vG0hfgfXtlJPMTTgo9aCw==" }, { "groupId" : "joda-time", "artifactId" : "joda-time", @@ -1450,14 +1264,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:VcR19CgIPWVt2e1aCHK7802j7wPlZ9xd/6kAqDUw0WPC4FnNYwQIxz90B3Ag59/mLVeKD1gmPu7wHJwwfgRDCQ==" - }, { - "groupId" : "net.java.dev.jna", - "artifactId" : "jna-platform", - "version" : "5.13.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:3fzoBgmDs79zrpOff3fxMwUqrb5NPp0ZkvHYv5xyEGEb85MepyE3BZvRNBqNTRN5EOhDw6UvpQUm4hFDMZ8Hjg==" }, { "groupId" : "net.java.dev.jna", "artifactId" : "jna", @@ -1477,19 +1283,11 @@ }, { "groupId" : "net.sf.jasperreports", "artifactId" : "jasperreports", - "version" : "6.20.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:+3RfbL2A+a+FuZ/wy2aljXN/gEIuJ/3slNK8pt42ErRfwiOyOQk2V4HehwnYlGEmHThK1yKFxNfhs3sumd9/ag==" - }, { - "groupId" : "net.sf.jcharts", - "artifactId" : "krysalis-jCharts", - "version" : "0.7.5", + "version" : "6.21.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:OVOQC+vjj0JCSZ0QbVlCX1S3PAR4wwUPDcCRfVw2zDX5TM/qlua/hemxKCvVcvVa/vG0hfgfXtlJPMTTgo9aCw==" + "integrity" : "sha512:RQszu70ICfl4Zk9oQTBWZLBNj3AgtHDCQL22ju3bblwHZ+662wwEnGSrzMQRUIYvyNye9ROCT/3xtfm9Q+MQ6w==" }, { "groupId" : "net.shibboleth.utilities", "artifactId" : "java-support", @@ -1533,11 +1331,11 @@ }, { "groupId" : "org.apache.activemq", "artifactId" : "activemq-broker", - "version" : "5.16.7", + "version" : "5.17.7", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:XJQIbhRlcep6ispfp+o6RkCk7CPeixlO/toHfX5QCjU//GegmSKV/kJJJUG6bf2PapbIK1ALFD31hLU8dgbQ1Q==" + "integrity" : "sha512:cLCgXdZVIG7Jf0ixVBzvohLEY1/Y9PqiBpub/9XVGn1WyFxpgcI3aMfCUfzlM4DT6DdHDKeb67XWcF73D8J8QQ==" }, { "groupId" : "org.apache.ant", "artifactId" : "ant-launcher", @@ -1586,14 +1384,22 @@ "type" : "pom", "optional" : false, "integrity" : "sha512:pa8yef7BRfr0xG7skikdK4LmX4A6IHLyACGzahSr9CIcheGWWEgfoTPkXejpiE1m29Ae38Df2Ycnvlk1I+tDXQ==" + }, { + "groupId" : "org.apache.commons", + "artifactId" : "commons-beanutils2", + "version" : "2.0.0-M2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:RLxaVRfSGBCGL5cC01zG2MyuKgWLkq2jvIDPHUK/d27JG2Uc8nF344RJZEmBq4pw3xB9N0HdDcIy8cvkqI/tnQ==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-collections4", - "version" : "4.2", + "version" : "4.5.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4bo2n/5ODY+xxDL/shcar0Q1riqI9skev4566ih5HcMDVoXzSpOlsTcHRTdOpL87nKepm/c6ABeBHSnBOvqaHg==" + "integrity" : "sha512:7kPFE6ydy9fdI7XLtOpfZaLhDN+7QD0IC4fneLO0UGIxVSIpfEHspRSpqUYiitdlDwpXLVt47/uCYN2AhBMZiA==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-compress", @@ -1602,6 +1408,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:rL6qKQm4Cc1WHnFW3xg0DZarrLF5MlYi1zvda4LLmzh9b8saRNgZWq1OeG2imSieF1mKHTN7fH0cC8YQzBKHFA==" + }, { + "groupId" : "org.apache.commons", + "artifactId" : "commons-dbcp2", + "version" : "2.14.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:c7mb0d8bukC9ylZ+12JqbvGw14w2zbJhqPU7slAmXA1st0QxfHMVOdywimnA7fs5B49HPzFE+ts5nV55aNnFlA==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-digester3", @@ -1613,11 +1427,11 @@ }, { "groupId" : "org.apache.commons", "artifactId" : "commons-exec", - "version" : "1.3", + "version" : "1.4.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:FUP7PQZJGiXav9uImAiULtMaQD7jSdWf0ceoULdPyCbohHzPye79oRHxJv44KYCDyuWWjB9EfW2BAF6gZEnDvg==" + "integrity" : "sha512:mYLNe9QyLVEBrSM3xigMCktGV/rTx3CSI3SEqVbYB7lOJXP2zopcyQ9EUirsy8yCBNfwMDT8PDd4BMPPnnmxBw==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-lang3", @@ -1634,6 +1448,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:i8JDiztNmmvkpHpYQQstTQ5W4FeHqyS62rjLyQddYYV+jS8L/+2tM/GPijVlQdAPgKhZe13tuZW+hIDWk9AyJg==" + }, { + "groupId" : "org.apache.commons", + "artifactId" : "commons-pool2", + "version" : "2.13.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:n2531xBjmMJPLdTYfXIolF4l3S8JKgSo7AdsJ4vq26scJpDkJLTfBKAdxeXnd7RY/V2LwIzEgSvcm3myYMZAhw==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-text", @@ -1645,27 +1467,27 @@ }, { "groupId" : "org.apache.cxf.services.sts", "artifactId" : "cxf-services-sts-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:mTovJV4hNqyQTp7m5vahjeY6apV7UKsf5L///s8+ZMS3+WzXQouSMkIS0h98q/TgfsX93OusY9DrQ2u5Lv9Gug==" + "integrity" : "sha512:fwmKfUnAOY5Jwn+LSwN3XXqWNg+RFCViZi9/jKIvIBKqiFDSc6TwaZfIFtA9ckNtoCC+MB/WSw4y4ltFaBDE6w==" }, { "groupId" : "org.apache.cxf.services.wsn", "artifactId" : "cxf-services-wsn-api", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:a8jB3yRJy0Hb63ZOjiCIov+wRhRS3wTloPfZvT7VjQRTsz9xJzuNRpsP/UfZL6JLfMdzGYOy7tIcDzL4Jwbgrw==" + "integrity" : "sha512:rawMrHnNylrFUtk74ziY6x26edJjzJiOz/5t2j/dVWypbJsslxQmxAwiLK+PmuPuIO4L9nYYcmYGLjYZNkWn/A==" }, { "groupId" : "org.apache.cxf.services.wsn", "artifactId" : "cxf-services-wsn-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Dht9VkXdglUVRuJAshh+d39hevl68WrGWXU/9RAg22z8N8S3HsFVJg4ufoBzvy0UemJ4sY8NxsDoCFkTCXCGVg==" + "integrity" : "sha512:kdd18++dvWeFOB3thAR7Xk13KY9uEEBXlsy2NAQW7VjaV3BEKUAqFAvn8ooHqYAY/dN2r/wVYOBxTxKiAnfX5g==" }, { "groupId" : "org.apache.cxf.xjc-utils", "artifactId" : "cxf-xjc-runtime", @@ -1717,483 +1539,459 @@ }, { "groupId" : "org.apache.cxf", "artifactId" : "apache-cxf", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "pom", "optional" : false, - "integrity" : "sha512:Cs2+VGhgCyHQM5Hv463d0Y4YJfii1Q8SKuf7LHYtO6pRpKspyL6qW6Z7dgZLdgBd9zhAosV5yk3o2iA82IMctA==" + "integrity" : "sha512:bZIrD6xd8+4ryijZb0oBiPZCyInZxEXATdzTo16Sh/BqGrpYVeUR/NAqQEJiBK2yuiYqE5llY7jlFDmf1tnZ0Q==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:tSCh0GlVguuVaPdvxPW/Llc1vzN6iPlSse8vcGH8G1YyJG5tegtTZvtEKhnySmwh8gvUck/wD6V7uPMhSMpOsQ==" + "integrity" : "sha512:3wT4c2RJ3CkPchmld22qa+otOOXQLFPuMZ6WYC6qr0y0kmCRexncqYNYF4NhNFJkLrSbrlwK9eouZRqsP9s9mA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-coloc", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:jlhWIvume8+Q0+7Stc0SLZCSsrLwfMGYW4+ZOGyvyZ1hN3IvnrlWknoX9VSV2QRHtMLJVV4Nvb8B6h0Z/CT1fA==" + "integrity" : "sha512:PotQOqFo8m0rr+tSPxghH0lGwZKAWePWQqSm1eQSPhC+tO0F9O1rgRjkGckieyETW26dHJ7CkACmtIyjgwqp4w==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-corba", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:hHVi9OociyMr9HHyvCu+svYL6cVQLmvsPIGTnwATkIPAuUPrVqPsXgXnqTF7b8xFVj2mFn9BvHZkcYRd9aTHgw==" + "integrity" : "sha512:R8tMXQtTVSPWUfDi5ux+XZSu2wmjANIK+/dYdbu9x6mZAMdvLQIRoAmDypTYcSbNT0zx75qICLTNQFBg+NmXzA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-soap", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1/P5Lq4ummYukpNUxy7F9j3hWRwss3sKNfGKrSHDjHrr3E/xeK0Gp+pPPqeH7RnWnYmdoLCMt+CDfkCsryn20w==" + "integrity" : "sha512:bMwmAVNKP9PVVAJMnSvPAIoOKbLU1Pyb5Ny/VQncTuU0jCUHn8j1vq5n4jQvCOG8SriV6crtV3TM+XS+9E7MgA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-xml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:b0xoTalEAerQtNvgKZ6yYIjRSKlEMDSjUvzcZ2bHechfQLutF9rnlxT1jloh15v5DmVOh13bbFOuPEYD9BDixQ==" + "integrity" : "sha512:RGqW7wqyBeA5Yy79ACy6O9DiniHOl9qtkJgKIvSlXnq3txnrnMtt38fX+S2iD9Nc4Y98OCjVHR4Fdn2EtqFXMg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-databinding-aegis", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:0IVOKqQN2oUwAbCm8B9o7sNl3YVqkOJuZmq1oRw6FbBXN7PXVr+DzOJ6Qnc527DhfGwJKI+zOWfMFaXcaP3ciw==" + "integrity" : "sha512:FYbrnpjjL4W8rwm20cG7JJUdlO5etG/mxisuU3iRf2KGt5NtziUT48v1HCtqcwtAkMq0dmBhbaRcIVbgLkwc+w==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-databinding-jaxb", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:LV/EgGt4H39iO4rs2lWt8YVVnluLUTc6ZSbZD1nNDvO5TqrQc69mkXzpZDq0NV8O/m5B9XA45BvGptLIgwClYA==" + "integrity" : "sha512:+k0JKk9KX0cLyIoeJV+NArmjBDQP+Llg/S5N6R3bIrReotP0oyW/j9nBKaQDTEHwRmdXSLhd8lBDKgAXOZFThg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-clustering", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:J5341+psZgDj0yRmwKF9GXYeZMIRA06raIUN5PRNZMq3R1AuIedV+mm8zDwDI9MyVn+kde/mbQtPO9mhdpRRGA==" + "integrity" : "sha512:AXig9IajV/ODQ0Pg2/sHrWS12GiMp+l4H3K3aerp3e0Bpeh61JN3Op7epXEHYr2O23hYzilIwnOsyV0RNqpN3Q==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-logging", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:8vGbk8Wk+1b/cBtx9kZyPKxYvMIR7PKwsyMZXRPS5hHBavUUrXwLD9YeICzmq+7AyEcawM4NQdISzqSRhPdOLg==" + "integrity" : "sha512:ii/Nw9orjV3bPh1oFK6USWY1CzG8mq3USnidUFf1v0GXCDe+Ip3Nwq2FvM9gDZq2N7+p8W+xzuMbevgsaY3vgg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-metrics", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:kFlGCRjTstIWFQ1IoF17GgsZEJ+bct3jOGuQKcA+wmDhU7W4JW3LBcp7VIo0HL5N4ESnUaXmoCSMZn4jeX47zg==" + "integrity" : "sha512:kgcrzC/SY1cAKftlM99JbKybDHX619I25q1RzsrMRNoOLoLuUzSc3vXmt23sJVII/izwxxlNzs6Vnwv5gw7wZA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-throttling", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:07oat6gWJUQX4f0468z+W5KQIZ/Wcoi5g2VnkktyG94brKsVRdTG76kOnnyd/AdFerCcFCA/BIxs13oCPboEBQ==" + "integrity" : "sha512:q+UHBkSDYjMdhE6UW59yCrZH8/h/dKaH88MNAJXiKgH4pMG0rFB0YMf57NGQ2D/PnU5BKUqs8Ny21kVoXpn5Yw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-frontend-jaxrs", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:0TKATNmiYX4HrpyvySPHPKsg234rSUgOnaZ7kwRAA5rBnZi5W7ToAJjhX23egvmABn1SzyhWDRKjiv3xjclQCQ==" + "integrity" : "sha512:RQ6lkoOjIP/OLA+9LaBXEWiwZCfhQtM2fOexjiiRCjcfLQh+ZNi2l4vZ7EXrteITQLf3GxAwRiOs5NVdWTEyzA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-frontend-jaxws", - "version" : "3.5.11", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:ppHjzG0MGRAtR5Un6onFsdX0aTcEBFq+hMRPg7CfpNyfvGW/zZXrPTkpzBI/VgETm5dOLnlfW3P2B0PwiaAnFQ==" - }, { - "groupId" : "org.apache.cxf", - "artifactId" : "cxf-rt-frontend-js", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:UFGYhfJUZ4KncYS0YU4ZFU/cwBdVMjP7DtFMkaMbBfLPN54an1AP09dGJ+8q0D+gN4rYRYr6qm9F11LbCBVwSA==" + "integrity" : "sha512:v+iJpZwLxeF6Z++J3hkRTc/EQZx/tkV8TZB1P7gjk416tsmN+NzhNbzcPRD3WbW73jvsut6FnwLvxxMbh8Z9Kg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-frontend-simple", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Kpc3Y19zBBBK/OdSqbcAyTN9ZKo46wOKhFfgoO5ZPgFD3ewhkvAhhL9qin0n/pTHZ5UxZa/+pWQcLIWxEJ+LlQ==" + "integrity" : "sha512:SSfZvri3jhhRphbVwznDFQ8UjHLUB2fb6kpxd/h/XDB3ex7ZlhkNqfRK6ZO+usLrpbwZTeRLpjgeRRor5c1GeA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-javascript", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:MugD+6ZxgyHuy4Vwqp9tGYiGkzlVPI10SwlKqlDFsOIj3I5ZEWnd5/utiZHMHYuioqdvjYw9i66tFZ24S0qBvQ==" + "integrity" : "sha512:OrGNnJwK7+jMOk2c2UuNsDtIri+DrwLgwXJCsbyRIKvkjBBnrFfNmynbmnZ9xKngTXGCTj0B3V2CMQvdEWBOoQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-client", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:fH0FmigPwjl60ALVvW21s4sFAepXDXDUjhkiaXbvLVsE3n7NjEt1X8fUd1oGOv4wU3JZXnbXnEpIakr5OKCTPw==" + "integrity" : "sha512:gkz+Ix0irNf5Y7oU+SH8jJbvnip7w1B8lVU62/sg+EjoWs+WMZZSJakYkI6UZCvP+maHqKQ4VqsDcAj9dRqGTw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-extension-search", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:KBxlmsTXQTZ9ooAjmyIxeoxmXEdZ+LKic7Ktnv0iTsIqDLJYoBL5bpu2TCr2Z7HZ+RNS1+IW0YLYdVQW75IiXg==" + "integrity" : "sha512:FwlJHLX1z57dHM8eGFWSphzXsiNEoeQJtSqqpB5XjgRmJLLMp4nQ7QSoavCua0OGQFKbNnbBXLdZK0o2uCCfDg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-http-sci", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:UGte5+/bwQm3yVPz2tMMHMTUlCNlTeE0l9aWOE9YlI33xSiiRXP9RqgXwsdeefpkwvdp1B0nAZJVGUn5/x7xMA==" + "integrity" : "sha512:CowAp+6V5kkldVN3OddI2Xq9RMZg5wcKIKzeGW3z38FBwfoQ6NgHhwA9gTwstiigembbPcluR7nYVY0dXAm3ZQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-mp-client", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ChxjrcHgwYCvkDB7eJtaC/VISOYoRtIo5UHvArT+ZlMw4Gd3rXuQWkfHHZwnGft7yxfQv5TDZwqj0i0nKdzSsg==" + "integrity" : "sha512:4xz5a7dnmbdcaROXta3hbEwpIzLbexRL6PNWk5G9ndCia8Iwo+/mSYAL6lBZr+Nh2fHhW0xFU1wl/wyUcxgI4A==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-cors", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:H+PX89S64nybLZ2QKMza8PXLh1Gt+HYx0rVYHFUPuKIGX8W0GOn60BWXE4jMioQ5R2aa8xbUcSJbABpgpkNHlQ==" + "integrity" : "sha512:y0f5dgMluDvfWW9dL8hHJItiKMDGiSaGqT1EkIW6EnXa/XN0bLwBmsDF2TCXVtsDP2V9g7PetKZ/iDTQubihAQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-http-signature", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:S2GJ7SHnh1KgCt/wF0wadCVruZlB+jAtGROS3BQg3Ujnw8fsFLSoKo8bG0eFLDQYYFOXVpiVxS1w1Lh0sRHU4A==" + "integrity" : "sha512:Lcqyi96yzzvIbbZJJF24QGOak9bDPWoFRUaBsRiaPWZjeJJzIilBLVlyDkIBmGDsZR3Q36IcEjShzVhdOCC0MQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-jose-jaxrs", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1SeMxttuBh97szIQVdceHw+zYzupJURYiidUz8uhbW/kogD3q6Oj6U4HA+QEB+VggCMwakY+IEHio5zxjvJLiQ==" + "integrity" : "sha512:G8ZVoqUktHbu110VGuXQJ3vW/9UNPl6G3GLRF60bTLaP+T4AI1kyukpCSS+4mnyKZSxB44khxV87TP+gnUZmig==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-oauth2-saml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4XuBPZJiMx5ODF/0D8yc6yChSjMmvZB52XSy8wpss7Nm2SgzJjYzQwpD8oerqHipcJrIuv3zfdpu+wvJ4hUipA==" + "integrity" : "sha512:gfdlwfCAgoZ0adKs/fy85BNPTdDXkkT7wSiVFaZ1EVrHvSIutZopP54jk3AwuHQ95UvCegvpbz7HfwdpV91eyQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-oauth2", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:m0E2bqt1xEbvUahRa2yXLSUM6FbchBXG0f+in6P35Mhy4REGKKLsRfMJ4uNPkHKX3rzdrrddGNs4Q5HBAlvsuQ==" + "integrity" : "sha512:S/Om4xo10SvfIUXEzc4WrYDBYDic0UDfz814BdTqK0p1Hkn0A2Tl3Q7pLiPFANFyqOxL9FPpifr1rsddDP2bEA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-sso-oidc", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:vO3JC6RVSYiuSDQAp62Vz+vU5fixsPA+qrZRdHsarpFAT7e6SlzUovUDceDl1Du+l/hPqJSUoJfhCTPzvuemKw==" + "integrity" : "sha512:VANuHxSkz0IXSOgYgEPQWC7H/IEeV6cJdAKRsz9gGDdZPtdvIdI90uY+deK3zefHANXdKZcPU73yq/mY9q3kiw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-sso-saml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:SL8B8me02hAdVHebbVXgQd0q9hcNVxifCzGi43F0o8/CiMbndazaJ1ZJ3Sbs6TZsoeh3dvxRV4FPC/aVwCNyUA==" + "integrity" : "sha512:rgchYR8rUacAZryUbRQmHqtVje04yuc6fKODHveE+jbw9ZLR052RTgCaOn5MYPPr+CX1ntmstHVeTzAD3mtleA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-xml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:q6sUHsoHc2iBv1whe4WiQA9bPzYngn3XKPDb4eQdNGODa11NWaziF/iwQD1SyED1Dx7pKOFBUtwvb545/YSTDQ==" + "integrity" : "sha512:TdMy0bqqnZpkPGklvPx4GS27a7EtyZaBkAKcEvksWPYX1j2rOV+cqOPpQ59rhwOYtkdK69/5jElqrj5l88we4g==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-sse", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:cZspDg+//WvPNp4wawfh0ykGOpL1LBx1p7FjFe1TFmKla9BfB8uc8Ij0Oqcl/UF+qjoggELLH/ID/3TRgy1w+A==" + "integrity" : "sha512:uLhdyEJZ0udeihmHDJA5Iak+gkej3zpXEXyIxESe5pCzcTJJ9makpyOFYPThoP8suwMploxSx1bUyMUbmqmMng==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-security-saml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:2XC27GT+HNCazfw/84uALu+aAU3kGPNanPsRJDJJxAQY6KOgUypwKCCj6ZsmYizaBzOIUMJM1f4Xd2ulI3Gwsg==" + "integrity" : "sha512:/Qjs2YdcWlgZoPfwoj6ub+XzD//K6AGPf6GjwLD8W+ec+DapZlhJ4pEIIaVDzYXNpop0jZ/UtBCKBt9w7kSdFg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-security", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:eFDjI9L9VTwH1xVGmZ4VRzdWu9NwN1qd77RDfB4rKpYqF78TbVKBd56n29FTZCLLxx6599UxMlqlQDGQD5iLrw==" + "integrity" : "sha512:5mzRHnhlZSRaIQ2idj0UP31GQ4ofOFxk8YduBs2n3WleFnAOolXl9pRPMaeNuk3ZG8IVNY1JsdKOuRMLqHtQCQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-hc", - "version" : "3.5.11", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:G69zhbQzX6VBftfSy4fvHrM1BsRwlmCqXtiDTSsFF89yS5wg2bzTeAd8v8AhH6H5yMwupNdh/eKkI3pcu0cYtA==" - }, { - "groupId" : "org.apache.cxf", - "artifactId" : "cxf-rt-transports-http-jetty", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:DuOjpPRKjNl4iyW1+0qXDuHfVo8RGZPundRWrj+M00A7cfQBdnOqyYtDr7O6V8vBbDFGicC6ZbHbmshfl0rDtw==" + "integrity" : "sha512:0I0m3JAZNF7gNLJaGZb29+uz6AWH4EQc2U/8iR99iJk69kSSoBuzNcnisklfkYe/oBg7lG5XQys0PlBT1oBRfA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-netty-client", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:hvDR7j66HNu5NS411h1MtwhPMYdSljokCRb0B7qRsFhAHmrDlPBScnrtKmRdZYy0rAr+b1g7pAA8y55i6v9StQ==" + "integrity" : "sha512:7ILcfOIQ22jf+P+NG/CHvi8LxcjRh9aAH+War61cGENq+wZFPiMDA4/m5Y4z0BtN6mrPzqpTY+29N8MSPvB+nw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-netty-server", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:oc1o+XdNKYC8IdcLLAcjXqYyraia8qP8jxJVugMRWUoJnQRKSVsI/9k48fyeSTZ6qDckxgoBDPtaiwu2bmUeyw==" + "integrity" : "sha512:KnGtI0Z4ML3CofbugmAcIB+JUyWhCIplxtqi65jbi8pVF9U3BCBs+bFS2PDflmly0imad2PD188aHn98oOvLxw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-undertow", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4Txz8YbZ/0QzK/NnanKt8dwfxpNW02rNyhZrTLjVoi4r0ydccz6sbSELNP1dM+IaBJdHXVa1hMaO7Bdr8g30DQ==" + "integrity" : "sha512:5oE3dgXgfZzPmtL9XbinNbgSX7CleHzjIw45WSgkHxgg2SWj/7leXbclmmVhKWNRi7ipXdLqLiKFuvVilsWG/A==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http", - "version" : "3.5.11", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:yfTvaR5ePcMF8ptjgmmc5QI5P/BWHp/eE2HnMxnVGfdm/aHYuF10aCrU/ECmg3r38SSbzsAgtQ/dx7odTp8pkQ==" - }, { - "groupId" : "org.apache.cxf", - "artifactId" : "cxf-rt-transports-jms", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1S+ZN6MaQxgLxhCIw0PEXmCGqIzkQCAY35e9Kl8NNvc6sXyYQY4XHhp4GfTCnI++akaeKJueOvwy7aGK4qbmGA==" + "integrity" : "sha512:/Mcqk8IDdYyzJjVf1inJBV6JMxH6vxEHVghllTVWkRlR/K4f9Lxx8UecAjjJ76cdwidDXPOXUQ486JrVo5Y+pQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-local", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:pVtTNCvOT7YkEMIpTQUe4Z7ThoL2Oxjup5mmdUz1AKl/GxP5N4dFlxFNVxJEj/XN3jTr3FP41amTNxWuzIZMZw==" + "integrity" : "sha512:6uAQUIxUxUtmahUHQq54u/QMgNNCxSD/cDq9PL3MfHJW+FGF2OfDRvLGplD3nVbPdW6KtJlkPw4kMhdT2hRC9g==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-udp", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:+k/kPxlqkRl4QSXRjBK948rO3LfDr3+lgZ+/G0xb2X4SiJWP+qZzNoOGNNcspAB92nTn5FlQStQiySnMo0HTDw==" + "integrity" : "sha512:btZk4R/WpxbrTCwu1ReJzTAoqSMg272CrFQVUax2wQotSpAmlJ5MA72GHndnWdybHsnvcMPaKOeUdvppE42F6w==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-websocket", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:e/ro2vgqJiENLc/+9H82m4kO+v02uKJJQ7kFzG56L0ZY3OT4avlqhhnkDExyv00ZIWsb1H5l32HaoRpuemf8ew==" + "integrity" : "sha512:WnitAYNM/CVFMa0U+6yM25a+BLLIcKL4J+4c41TGFIb6PrLjqMaHteZ/SWt8itJc1EarQYWlb90Esbacv/S6ww==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-addr", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:XufO99R+5z2XBOYyZAmlwEy/MpbmjiXNwBKMYmnTuQz2sNHAt8bv57jx6o1IgHqGXGjZA5phDbREyJUMvkJiCw==" + "integrity" : "sha512:oP4mJ8JFzOzMBAf5E0c60+e9riAbIhv0deR5VkC8GSKidP0r32LZGTposNqI0nWAZj3xqyESa1MpSFRNNQjSIQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-eventing", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:tWzS1O99YNYqCkT9So+rdSFPGqzvf03X0uOdAo0DalMOtWjpjSBK7xEJxWUu5jTtNr+i8cKoIyOWBByzpL7c1g==" + "integrity" : "sha512:3vv49rG03nOa531eTE1+Uch31gEz3O03ekR746LDjISanojnPVS2hxHNKH++4tOw2V5lhIAjOfeOKcOaC9UH4Q==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-mex", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Gv8OwodMG38D8qipdP3YDCBoGk7A5FJsJ9k3/Y6yHXe2gVvxSMX7BYZwwSX4Hjw3EqLlb1S1NdWAhSQ23vIhKw==" + "integrity" : "sha512:7efu//2eUF0hkrqJ+QzEiyyR8OCY9HQOqHl3MkRlgnisGuX7Wuxkh3x7t6U9HWzUAivuBs+KKz6ZRWBoxzPgTw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-policy", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:TrsG6oVulvqxC9e4uvRc1K6UBjNsR2gptgFnza3czNWcQN4VB06BEXDfIheJQnxaz6iUkQh9NAGDvdIMzGFdHg==" + "integrity" : "sha512:faw8x7rhOLdWjjJM/hXyx/yAQHFx7dxOF9ix645RPhV629+LPM78vygUczKVWX3lWhRKlOCflwuiN9R192NqiA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-rm", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:MQZYW3pm3VgJHrA+9Wx/YiqT4vEqDaq26L2pdrKLNbXeunAom2ofLJKbQ+XfWbPUlxPl2ipPcCxkbJgqa7P7Ng==" + "integrity" : "sha512:Txq9iRdPhkC7kzaGVFkqdJ6IhmvzYQf6Vg8FFpy9r8po6ZHdpNw6MCxNCQal+TMrc7apbIO6cXoEgQBX2muVMg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-security", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Evp4MlNrn3H9G59o53rscxlxJDXxRVd15OWkv2rYVVxUxYtOiuml58iUbca8M8seVXluaCdu4+2ByQwBsEK+7g==" + "integrity" : "sha512:QKFK2jzbwzDJYuAa8yVMR3NLpBK2PcS6UZkOUMKI0SkGN0EXYg03wicaWTxif2J/iqsnXIY+Izxav/T6GSu+nQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-transfer", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:NDr03C9F+fXxiY4hWZmZflDjASwFKk01ldYn3ISuP/3T4dkR3WZUkby30KRqNFZm4b03Bs9Nb9giRBAO+8eJqw==" + "integrity" : "sha512:6a/oOnhdTBqZ6SxId1v70DsCXwYxYin7sC2f6RGMMAvsLyGqeAdI8p7vXKh46hX4kErNpe8GxE/NxmRSPBBFZw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-wsdl", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:OUuXclzUK9QcfHY0jGttXGA9D99IknX5Dt6EPLPYzlg6qzbJNWVaWvjy3n/sIj/Xj8+ilHvhbpTZAAOHvsQ17Q==" + "integrity" : "sha512:qkfh+tUeFDdNr+3u3UegAlo49BSAOMAOXBRWPraWPASnyVIYQlVb9+kF77KJYrHR5sAQsmee3WtaerBJHXwxEA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-common", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:NXuABVMem+e4H7h0D9Gf2t7EBgwwScpoLqLP9WXIO7NLWbJtJiu2mrKHuo2Pzou16T23YtoYZZykQwHPmmDnqg==" + "integrity" : "sha512:7MlrCH29saWl+KzSBIGItIZ/EvNNsJEF+Yuk+U8U8czkB2b4VdWclWNfKvMkCW93VubMPuDH4wU8Vn1fd85nbg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-corba", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ncYm6yfKPT6MhB2HCuhVEAEou8oxs+xvRp3F8FHnFT7B27+VsUCalxAd4PHUQSOAk0tvQHuhdjTYzeuNhD7Kkg==" + "integrity" : "sha512:5nlnFw8RhpZroTKymXOKScDXD3ZT4ffIaDJjpDVugKaQn3WxxdpNy3wrd1ZEWVBlqiqg9RwA05Vn657GJ4fmoA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-java2ws", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:FdGG7Unl87fUUm0I89rFILr8ycppFPP1g372bPTynhrbFp/+Ve9Ah8J1WPVsR/qQmmHtveHKN6Og7I4xB10HWg==" + "integrity" : "sha512:4nwLf6ACzIFH1ZTqi7tWqPdqZ8cp4/rABY4BM3AkqOzylRLErpICY+FZmrLkpdAeKu5Di3S/Mu0qD1AQaRtpBQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-misctools", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:MWX2MBFnd80wtsKg4T8lyjFvCMyuHI++8Ikn1Ne9SCtTDo3fbzOvTgtEdbd2SSV31d3XCvFOFqd73BwrhsGA0g==" + "integrity" : "sha512:Xf88uNChF8irgeeVkOCZLR1S0QFdnef3UE8miklJj+TFuNwgTCUmLDMJDKTxz7EXzp/BmyM5/0lhxhDr+O+ALQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-validator", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:TweqICy+jYqXetHHfGrbaNlsJ5Z4OIpJXzI6MG2/Ztd5h6IPg2Hc7t2RgB7946HNkXUYsScQurkr8CLpmR85Ow==" + "integrity" : "sha512:11tJLquRghp1KAdkTHS9Unhr2PzItVm8R/qSWNbXC7Le18t54FMlsrcva8RfB8Hiid9oH7kmLKbJbTyK2PkYFg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wadlto-jaxrs", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:M+ok2qiIjhbfGRZL+MWgmeCUOusKE4UjzMKrF32hyYm/hCn7VQTI+UMkAL2FusAGoMjMH3IX72Z0NM1c2TG3iw==" + "integrity" : "sha512:3CxQTldB+l32AtKMvrFtRcLED+3o1Mzti6rvi1oFHn3L+FlZkORgaafyRSg0YuUI6YLQYRw6xhwhXcAu/LnKvQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:LnDCN0NMl4Jarru9pap8oiTGdktxxld9i/6UE/T4WTPyONMpRwhOhisoaY0yrw20K16J0GSuXpsaqgB8+sf7NA==" + "integrity" : "sha512:zba4MECKncWf1yfvtGnXsC9FNSZNOit7q7BlG7N6ptq1/voreyJ6PtWbzRjPe+s9or1hhTZye48b5brdfb5Iww==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-databinding-jaxb", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1SZg9IBjFveImIG7kiY9f89tVfrEeDbJUHs9TILgVcKuKb7W2MuZIGQIESRTWmbY9yfkw2g85Vsfc67Va6l4kw==" + "integrity" : "sha512:encSEM+RBXzgL7GaR7sgpegSPymGwMrTOEp7LioiYT1EFRRnivEeZTC2KjkuIvjAS/BZRS2ulEeG2g2F28pIOg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-frontend-javascript", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:e+WX7smNJPRjKNWCBxvBxuUZp0wZarIG875oyc4YWx5IoPpsPfeoZoTL8difX9RsD5wvNnu8wZcmMfz2BG7Rug==" + "integrity" : "sha512:eVPb5ig7DnNfgtHcGhhdoU2QddjGAatCI00FINB/f3kevQq0IXay/eUSl6hI1kP609Bzj66ryuekdX3WVmCDCQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-frontend-jaxws", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:89QsXOIoticAKMtIbcB4R66fF4bwoJ8qA0P+HIx1UwAU8XRPyTvbn7FWrr6jZ7S7OHKbeb51bQDO3y4dXn20TA==" + "integrity" : "sha512:GQQjB6LdsREKelOdMjb+wr8RJCQ+EUfDTvTBuowt8Ae9x7MYTI6SL4jzkwgDWoQRPBvMieMRxLce5AMhZI5exQ==" }, { "groupId" : "org.apache.geronimo.javamail", "artifactId" : "geronimo-javamail_1.4_mail", @@ -2212,12 +2010,12 @@ "integrity" : "sha512:lMuGYHdVlrKY25PhH9uyjSpYKxYfem1mfUGUb1nosRSqgOFcKMQYbwW0P0MrGsVV2EWthwMJYJICOCw/YGHjGQ==" }, { "groupId" : "org.apache.geronimo.specs", - "artifactId" : "geronimo-jpa_2.1_spec", - "version" : "1.0-alpha-1", + "artifactId" : "geronimo-jpa_2.2_spec", + "version" : "1.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:8Y5QRBxQekjKsvjWrM+ZF4HBQD5atM8T0a5MAwIHdBFX1Q0JJx/MoN1M0Q14q2hPTLRVBZjgd2OZGpE7erztOg==" + "integrity" : "sha512:mytw5JAr9n8979XakR3YguXhs+DEoXswS+Uh5Lsw+EnNVu7ZaR86/8H0hAkaKBOavhLzveQKiHa4s4OEPp/g2w==" }, { "groupId" : "org.apache.geronimo.specs", "artifactId" : "geronimo-jta_1.1_spec", @@ -2237,11 +2035,11 @@ }, { "groupId" : "org.apache.httpcomponents.client5", "artifactId" : "httpclient5", - "version" : "5.4.3", + "version" : "5.4.4", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:5WEJ8MoXRwYxv2litZrYEOsd+3GEiI8gdFdRDI8CMrk3TNBs0Y/dJVZzPJc0KIrpx1aQh7Vp9bwuwToRDUfIxg==" + "integrity" : "sha512:co51vhEejFV8ZktO0k5qze3PcAvKD++mkVj0ELWre4EOlDcNqtlGcD78YBrfqMtLIJFt0LFXzbrN9twQXQ0WVA==" }, { "groupId" : "org.apache.httpcomponents.core5", "artifactId" : "httpcore5-h2", @@ -2293,19 +2091,19 @@ }, { "groupId" : "org.apache.httpcomponents", "artifactId" : "httpmime", - "version" : "4.5.6", + "version" : "4.5.14", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:mEHbd3m2R95GaN7Zt56MUQplMHY4T8MFnvGG6l2Cgo4UneSMAWtcuJob6r5gmBQpJlqDJL4xCEc8V693piq9ag==" + "integrity" : "sha512:iEsGICj2gng4m3TM+8NRQsquSJztpd8B0sYN+IS5YEzUBVv04VJOA1hmH6DojpPmFPtr5ZDLlAUQsHo3wLCiDA==" }, { "groupId" : "org.apache.james", "artifactId" : "apache-mime4j-core", - "version" : "0.8.6", + "version" : "0.8.10", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:SCWIHxpx/5PDzZNXgnYsjRDQlfhETFrBnFfsb4zJlqZA0k/cqtYIO/mGhbfi08XdQIhb83dIq/Vh+RHtPgIi8g==" + "integrity" : "sha512:o7GucQFDM254J6cCOFg5uCyYz6jLm9u+iXSBvHvGMuwx3fTzNTAfT/QVOhaiKlhjRULjiKtsCgsKv3OkEUFfaw==" }, { "groupId" : "org.apache.logging.log4j", "artifactId" : "log4j-1.2-api", @@ -2341,11 +2139,11 @@ }, { "groupId" : "org.apache.openjpa", "artifactId" : "openjpa", - "version" : "3.0.0", + "version" : "3.2.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:NnCD4I3wYLLvrdAJSoBfrToWy4p7+6+TOPMaZY48nsUWiuHo6tyrl8Dz7HUGNSHHEEbw4LBHRgR3dWBU5RNetg==" + "integrity" : "sha512:fxElSgQRT4+AeHo9UAqy7TgJjDrLDs1O0BtvTnfVpiqnUHnDLB7IYeDZ5oPNuoDP9/5iSNMr72C+tj7Phah8TQ==" }, { "groupId" : "org.apache.pdfbox", "artifactId" : "fontbox", @@ -2365,11 +2163,11 @@ }, { "groupId" : "org.apache.poi", "artifactId" : "poi", - "version" : "5.0.0", + "version" : "5.5.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:n/4e+RjqWe1nsh5NQLX2evx3wVDQQpyV8TkWUKgU6kdUwNz4BXHf/QXvlIDl/nSpey0sG7z9PU4r+SsIaHD/sA==" + "integrity" : "sha512:0WIVAC+l3khP7qh3K9ni0oK3NcxzYEx0JQ6F2GyfBL2EOUTiAAuubTORxOylzxPIVQwX/Bcv+aCl65A63xklSg==" }, { "groupId" : "org.apache.santuario", "artifactId" : "xmlsec", @@ -2410,14 +2208,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:dxUO13XmRL5E2fHq0ZqIDIoCy6GNrpeuxOqPFNsE7nlbzjW9LlMU8uldQMAUQdqVQyc0j5Gt3Ju40MyffAD1YQ==" - }, { - "groupId" : "org.apache.velocity", - "artifactId" : "velocity", - "version" : "1.7", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:5SF4XZR8rhoCBwsmpD0jW2MZQ5pjZMWCZtP5xFj5oJlAbBCqtfUcXbW6VB6IMiyzUgPGdYtLi7ZflTmjRdqaBA==" }, { "groupId" : "org.apache.woden", "artifactId" : "woden-core", @@ -2453,11 +2243,11 @@ }, { "groupId" : "org.apache.ws.xmlschema", "artifactId" : "xmlschema-core", - "version" : "2.3.1", + "version" : "2.3.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4IYw5vb74rlgp8Fh3f9G4TVWa8sd0qrzcHrAGoQ/tGKsHH7rgwrKf8iMvj/63CNa2sB+wBnhZgUIYO1z0knCHw==" + "integrity" : "sha512:d7AgBjNl603xyf1mKAMdXecmEoiSGwFjAnNt7/vl8EJ6+MIt/rXj79P3ksF5C7ocOOYdyL5DzK/zBR8BDNuDJw==" }, { "groupId" : "org.apache.wss4j", "artifactId" : "wss4j-bindings", @@ -2508,12 +2298,12 @@ "integrity" : "sha512:lz8NdizrBojcKX4DZqqdY/lksn2CKY3ZXV9pi9upoCkg7V+MXBdNE+yciYpx+oaKyn0gFSNEPZ3m+He4o1rFog==" }, { "groupId" : "org.apache.xbean", - "artifactId" : "xbean-asm6-shaded", - "version" : "4.8", + "artifactId" : "xbean-asm9-shaded", + "version" : "4.20", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:BwgXlfr5mLJCX673/2xXl7ZYjl4S8qqSNTJGhxJSU30Bv2uxiq8UMG5anKxZ/hyJhDg083uB4q3jNvqXZ2mDYA==" + "integrity" : "sha512:k+b5dZYwerV9DC4Eankdza6HA11mSI+0fS3ZjIiERutDGxL0W9nMiHLfhDhG2uK4iHgGaWnpw+N5IqPw34hLwQ==" }, { "groupId" : "org.apache.xmlbeans", "artifactId" : "xmlbeans", @@ -2522,6 +2312,38 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:IbheUyQR7bv0kp4gxEkdP+DXtLsVcztYxkVckB1KBfkY5ztlIeccYqiaZXbUFs3ct5sMUggs2BMvwwxA5Qa01w==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-anim", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:2CrN1Ef6ULybscX5gqNSpwQ/DZJYKRvCV/cyPEuGVWfn+ku61Z26P+He5EH1sa2IjILA+lxTw6w4meuCBEng5A==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-awt-util", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:pTC15tUQjIQ2mR5JYndt7R/d7fhkIa65m8z8cydnzb8Ec6V156Js/zh1lYYJxeFz+XbN84IKsSGEJrDyS3rvoA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-bridge", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:flZBflV0vXFXd+Yv1IAJ4p+oomlxYcrhs54JrkCAHVvKVJF5f6fcerFfYwWTrMJqL8pUfS+SLsz8Di+PqIbSiQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-codec", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:LF1zyVkEX2Vq9HgVTlCM3HfIaAbw/jwKWw0uIxLD/DbYxjw6oXMqop8NcPAm2wHELSry3Im1+bzHVEPeguxCFQ==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-constants", @@ -2538,6 +2360,30 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:TCxQmIamkp48Fd7BjS596ZJkYrqAXyIba+jRgLw+4vDeoN60yDyhD9EA+6hjWrVKP5qxfV4n/3ehm/iFvcnqRQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-dom", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:+1fwI9CaVpiB4QhkJ2cTF/nBv2Rwe4LaZy4DwctU9g1dxnt0QESIEZ94Uw4Sxl+H7yueJLtsnXek+hEQpOo0kw==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-ext", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:kZcbQbNJydgTV5fzt36ptsj5f02SPxLtESyV+OlL8AcimexTxBTuppv9OEOcakT/K7tOIq9Q/tZvrZ6dRYLXcA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-gvt", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:+yPLIQ9AP12m8L57X3CWtgqBoi8r3ZhsA8+pHH17DcjdXN1lDu5mIE777CYtJFXAYBTXuKQvxtVMWYZba6maSw==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-i18n", @@ -2546,6 +2392,22 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:u+7I9TNrxjHzUx6hEvAY5Wn8/biZfwHyvwta97xWWCVfY6DhQElrwnHA3TKeOL+lNUJUrX7vTao2bdLu6JHv3A==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-parser", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:E1MfgQ2kBoJ1xDWERXsT9NczU7iqSdJAOHR4Zq/kz8h6JJQC7ldIOb+eTSVKkF+gG3YF7/BAFr50YQV5VazBJQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-script", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:x3lmvGS8dXIl0Ohn0/RtPIyYjDIT/Ot8FdhhMm08L1hUrlPU7TmrolskP5vQm5WI8D8DnnIaWayYVfQN7/txQQ==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-shared-resources", @@ -2554,6 +2416,30 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:igW4quCOkTqYNrDz5Vunn6CluMkYUHA4avR7DngkVVWTrVVwiPxNYMnNqo2L6SQIgusbxUhBN7iYggAulqeKPQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-svg-dom", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:/Z5dc6SHEiMG4ByYrd72GH4AYnybZchcLlLf5sAPOyjTFQrIkqgzype5Ie7UHrNYB2B1xTmp9lvGiH1/UP9zKA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-svggen", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:oInHWP8h0urzFzK1iKiqUg15G4tLCrsKNJXHtXUB1IlipHUntmBAAZLqf4wbmiv5zkvGA6P+pRuYD4wkzRPbGA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-transcoder", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:HyW028KVAhuY5evuyVfDEfB0jciJiCnl7A9chL22BlJqjIKEm0zN6nEbQnYLou1aKfYx63Eax10Um+OLTrX0sQ==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-util", @@ -2562,6 +2448,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:XdBsiVHZ7H2zEuPUdT94HHP2heN7pP/3iinShH+JJ7hsGdYjtnCrwT/O4zwYkGZOU0x5C5feVuBswheCHPUEqA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-xml", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:OtJk9lSNfO6EYkgmKGIwiy9l9rNkhmVooACGvDsdZQVKAtkSDYkH/nP/ucrY3CN0dsow/cWC2acQ/OcWQ2MxeA==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "xmlgraphics-commons", @@ -2619,21 +2513,13 @@ "optional" : false, "integrity" : "sha512:o+x8IvbnFuLAa56TsZkr2iPrkuoMw/Ovxb165EqSNf8iFtDACXeZow/S4t1hjn8wzCEAB9ph4d7i5yuPuw3hbw==" }, { - "groupId" : "org.brotli", - "artifactId" : "dec", - "version" : "0.1.2", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:1M0rM/fDWAEv8B22oT6/4egFGlgGmL/82ULEdFEBLPU85JpACxyL91ArAeYx1518ZBcgKhRWIlctef0UXM3mGg==" - }, { - "groupId" : "org.ccil.cowan.tagsoup", - "artifactId" : "tagsoup", - "version" : "1.2.1", + "groupId" : "org.checkerframework", + "artifactId" : "checker-qual", + "version" : "3.51.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:H7EdGdjGNkC0xAkHqAOEtBdpJPYOR9h7TGz2EaBiy6QiDZkMCLhTawNA/TKYXAj5aWUK/TNgpb0ojs2JEk8Zow==" + "integrity" : "sha512:YzoMOWvAGIPWxp28U9qYB4TYg31xsJuFnRVxylo7YI5s8km6wEV1pvM0mPyS2Nbu1yAOSax2irDVsNKyvy2Lhg==" }, { "groupId" : "org.codehaus.jettison", "artifactId" : "jettison", @@ -2645,11 +2531,19 @@ }, { "groupId" : "org.codehaus.woodstox", "artifactId" : "stax2-api", - "version" : "4.2.1", + "version" : "4.2.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:AO/F1NF1QPsYDFsg1FZjCosyYt/0ZnZomukWuhbw+9mxpxx7rfslT6rWWX+U/tHtuW93wV9AF46vTYzTXOpejQ==" + "integrity" : "sha512:HAWH7LTFplnOKuH+Nv/BJjao7LpUminyz5HLTR02ozXAXzV3b0gEiNQNiUIwOJ92rus2OIcCbG71xWWZXBe3xg==" + }, { + "groupId" : "org.commonmark", + "artifactId" : "commonmark", + "version" : "0.23.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:3Brrkmmk3Wwdn9wViWautp9msUgQjvoGhiVzB1Tp4/7xeZCBtY/ujHY7joCli52na4jx64nDaIUdi0paqKFE+Q==" }, { "groupId" : "org.cryptacular", "artifactId" : "cryptacular", @@ -2669,11 +2563,11 @@ }, { "groupId" : "org.dom4j", "artifactId" : "dom4j", - "version" : "2.1.4", + "version" : "2.2.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:tkehycvY6OCoVRYLhSL/+OHU35XlThFqHP5m0XCD/4uMpv5wbWrupufT4BFiEq+aX2x/reZChpoz/HqXHRFq+Q==" + "integrity" : "sha512:nmnYxTuC1i1lidVsaGFFWWOsZOocdKc7Lmd75Sl8EE6hrCbrhxrJLy7lQRazARMESBBwriGlcNOyQb4cwTOQqw==" }, { "groupId" : "org.eclipse.jdt", "artifactId" : "ecj", @@ -2682,38 +2576,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:QTEYMqWT0T6oTuvqCHuqO6sW3zgccL1MD0JcrraerBtBviryfkBzWuFsA530hh+pPDz8TCH4S60cXrHLDnrTUQ==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-continuation", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:cKuvvl0OeNUhdsWBbLKd4Fq9SsA9WVap4cVUh5FLHtUuHVGroMCQsu00PBQoWuNsW3KiMG0KFRqjrktvo8TRCQ==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-io", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:K6JuwuiTRiuJSaMM0Eaqbg+cLdoW9wEazJLLYzuX92wxSy5uutLYYeA1zudAF/YzsPfujFFlDqsNo0dv0odHYg==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-security", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:HB/s9ab0QDaKnyS2hgOocXoxXo/NDL2l0swD9aCkRQpXH/wo7qHyGitFLmwRNajlNGc7gLWFSl2BfbeAv73G0w==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-util", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:cSttnJOWjLLcFg2d8KIiQ5qujBMLZt+uQi0paM4Gsd4YLHCOhLPJpXCPtMceMVqW2uEJ2prWTgsfHCcZRCqTbA==" }, { "groupId" : "org.eclipse.microprofile.rest.client", "artifactId" : "microprofile-rest-client-api", @@ -2765,11 +2627,11 @@ }, { "groupId" : "org.ehcache", "artifactId" : "ehcache", - "version" : "3.9.3", + "version" : "3.10.8", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:DT5ZVILyDzbUtv6lPDzKdDsnnd1FoIClHd2VihHb3hi1HF3JRT7BJGs35E9LBo4DNkvF496JxIyoJ/q2Peb6SA==" + "integrity" : "sha512:3ur7pjtP8I8mchqpuFgsSG1KEq04icPerbUsqGzXEhJVD/1x9878jlhUP9ART0jMCG7DwXMJHqelwvmaORmJPg==" }, { "groupId" : "org.freemarker", "artifactId" : "freemarker", @@ -2802,54 +2664,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:LYHZ3fzFPWK5UX8hDZ6NbuTSNxOJCTkqcxS7KT6keKWtrfs5fTE6UsXyP+TQLfL4fIECHBFIzjQkmcTRrC2/Mw==" - }, { - "groupId" : "org.glassfish.hk2.external", - "artifactId" : "aopalliance-repackaged", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:LZ5TlbqIf6W7aoIJtzEpLUQPXB2y/Mr1bEGx8dn3dHM9ooqoubdp52X+YvNkDXvLLPYUDwBEqLV26eRRRAOMRg==" - }, { - "groupId" : "org.glassfish.hk2.external", - "artifactId" : "jakarta.inject", - "version" : "2.6.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:f8gZatnuA6gx3/+FyUXkFsOQYHGnqo6/ari3AI3+wK3MwfHcpT7WdorFZ2zUs8Q0cWdPl/9z4fYfWkJ6rtaOBQ==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "hk2-api", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:mr6feNf2yAW2x7UVV5Iw5fpXOrvNgYvtVgaAgNZFhgji6Z1ZN+uVnPHk9M/cT3kAWd/BIxMTzY8wqu+/UY6xxw==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "hk2-locator", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:4sh6Jl8RQEL0wEOX20rcpykf1o4I6XEpV2zrYDKHtXzPWwPQwoVyfruM1/iACSgL3qtCVEddWdoaxBule3zeyw==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "hk2-utils", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:jafNiN5FJwsfz9LEca4JKzlyr3im4OzHbtSsELa9ZxLSpTi9FjpFfyHOpOflxS9UcQj0Sqp5HtD9Bp9pfxKCwQ==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "osgi-resource-locator", - "version" : "1.0.3", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:TYSYOpsccvWGYbV2x4ykVqIQZgLCrSEc1+ctlEZMh3QXOzSjVinFB8fITJgvHeDJv0g1JFjoSAvl+HTSDW5pow==" }, { "groupId" : "org.glassfish.jaxb", "artifactId" : "codemodel", @@ -2891,37 +2705,21 @@ "optional" : false, "integrity" : "sha512:0zlZlzBD+BthlpEUF9Vz2Zx4P9NSs0BcQlT7BsfgE6OuXXJVXy509ABB/kbZlE6cNX7aWs/HsWaunJP7vI1AeQ==" }, { - "groupId" : "org.glassfish.jersey.connectors", - "artifactId" : "jersey-apache-connector", - "version" : "2.30.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:62Y6UlayfEPKldnYi+0crfLcf3eYG7QJdV2My6jLGdXE4ktVNmRzPEZtwrDEe37ofKMtzt6goAnkvjQpAgT0UQ==" - }, { - "groupId" : "org.glassfish.jersey.core", - "artifactId" : "jersey-client", - "version" : "2.46", + "groupId" : "org.glassfish.web", + "artifactId" : "jakarta.servlet.jsp.jstl", + "version" : "1.2.6", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:nBagQSNTaOeL+DvgZAKm0G7z6AiNdXDSRWbI0EE6d45mFjzv0qDRJQEVcGUNzaE7hBOnwPRDTOD02E94SLowOw==" + "integrity" : "sha512:mUy2kuSnLux/caKREoxDwZpVe6CZcuQ2qGrJmGI8GxOuiUibli5YCHvl9vnBXActNRdEMDCCyyReKboD42Y7Xw==" }, { - "groupId" : "org.glassfish.jersey.core", - "artifactId" : "jersey-common", - "version" : "2.46", + "groupId" : "org.glassfish.web", + "artifactId" : "javax.servlet.jsp.jstl", + "version" : "1.2.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:9Zzm3wWBnb6zcxSKURdneMb/mKta1Ey4XX81zNLFbsoVQV7qrpQZtwUb9sQ0SqCQOuGUCW/56AHFPmJwTS4M9w==" - }, { - "groupId" : "org.glassfish.jersey.inject", - "artifactId" : "jersey-hk2", - "version" : "2.30.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:BHKy7lFCIkdgR0cb1Fy/Rap16ATTUrJjxGkJgbYTNVtzaHRhCFA6m2B422nutJK0U4wIPXK8h6sGhQflHygemQ==" + "integrity" : "sha512:cZ9OgJZT/tBmD4p5pvm/devpYwFzpkvpsoW6orSNoO0JVMOHKuYc5jQo5LfTOyrP5NqRN75NsoSpVSrq+0qI3Q==" }, { "groupId" : "org.hamcrest", "artifactId" : "hamcrest-core", @@ -2954,6 +2752,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:uvQRoPYBGX/YDS57pgUsqYeRiZY4O8F2k+ewX+WHFxyub3b/nBU4MESZ5SgRkoAK7kkcCeJXH+wf34mboHBesA==" + }, { + "groupId" : "org.jacorb", + "artifactId" : "jacorb-omgapi", + "version" : "3.9", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:qLF8Oz9xULdg+DdbpU7yyCb6Dlz5an+E1/QJSW3zFijyfLtkSagRS5tUhbuVAxnGTWvLUvfbiGK7EBiQpVwDKA==" }, { "groupId" : "org.jasypt", "artifactId" : "jasypt", @@ -3021,19 +2827,19 @@ }, { "groupId" : "org.jboss.xnio", "artifactId" : "xnio-api", - "version" : "3.8.16.Final", + "version" : "3.8.17.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:CKIvoavhZrkcgqahVO/Rw/axsrViRKdC60IfmBxmecApucCtupXMYTYmZtk2B8BE1GIrLY8RVXPqp+UmDHRPng==" + "integrity" : "sha512:jknlJTI6/kjuuRhOBv3+LgYQ8RPHx4sRO1M8wMBJd7AD4+h6AuyqF5E15PfhPkDvnLK3E1tDIFg5WVV3NTLHqA==" }, { "groupId" : "org.jboss.xnio", "artifactId" : "xnio-nio", - "version" : "3.8.16.Final", + "version" : "3.8.17.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:c/1uxttkSvWRF8lyWMsosAUx1E7d22kzdQ2k5RgTq/JvsUT9WKTj78rKidtTd33Ui5TurbJfKm292oDAGk10kQ==" + "integrity" : "sha512:IRsmg94lHWDNm2wZo7YEKxdFC7NznY4Qxg/m8VHlGPznOYt2Niozbbj2KJDitQXYR0Rzl7JIhs998c3jj613UA==" }, { "groupId" : "org.jboss", "artifactId" : "jandex", @@ -3077,11 +2883,11 @@ }, { "groupId" : "org.jfree", "artifactId" : "jfreechart", - "version" : "1.5.4", + "version" : "1.5.6", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ZpCfpiT7QTYw0PGVp/WzkPhPtIuYZs+BChY0AoT0DGa+vIIrhE3UOdMsUOQNx4rkwG2G2mKlbXcmDUUoFmOZcA==" + "integrity" : "sha512:UP+BTG33+WNTQHM+NO61sDUWysC7e01oQSzwtw0wOEKt7UZ+2w3I4as1hJXcwt7gK4n8SvupPEjrMIQW+FJSmA==" }, { "groupId" : "org.jrobin", "artifactId" : "jrobin", @@ -3186,14 +2992,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:B6gVYC1OcTt862fwXNN5R2unbOdQFnjP20asjNMBaZ01e6x5rhtNgbh3E5Tt34qOPOuhZfcfQ+rm4a8/hRQVZA==" - }, { - "groupId" : "org.mozilla", - "artifactId" : "rhino", - "version" : "1.7.15", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:VhnE9S8YY8XXLNkRXC6cz/VcfnqPTxOV9zSGEg2UqzkAY0+ynVQ1alsPwiFFcGFdXwbhUiYN+XG7AcW8TeS7lQ==" }, { "groupId" : "org.objenesis", "artifactId" : "objenesis", @@ -3317,11 +3115,11 @@ }, { "groupId" : "org.ow2.asm", "artifactId" : "asm", - "version" : "9.7.1", + "version" : "9.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:R2ewFgPa1cecweK183IvcrEFnZKPGE9Ea6EbresbOBs6OpqAHMQ9JdOW35ULCdGVl8cxc8QRsdqJDegIuU8fUA==" + "integrity" : "sha512:GXpPs+yzTQWsVVxqUQ5pr/yx5HbyTF6TWtUT7Nq/dLRaobDgsl2+kSJPxtt5WbJnfqWHbuSedIcmXiopxWDCHA==" }, { "groupId" : "org.owasp.antisamy", "artifactId" : "antisamy", @@ -3362,14 +3160,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:+lPetjA0P0/rxcEpuo29HslUIpw/y5Db64t+m/ph18qenU5HpOpSNMC+nv5ZgC/yhYL1V8VZDzFMvuXgbnrgYg==" - }, { - "groupId" : "org.quartz-scheduler", - "artifactId" : "quartz", - "version" : "1.8.5", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:E5L7Ktczeq/CRP00N0GKdeXTDEqmOWB4IE/le2CUYgeOfCAjw8FBfN2XhIZg8oiV/xgo1ZMutvnYd4xTmku5bA==" }, { "groupId" : "org.reactivestreams", "artifactId" : "reactive-streams", @@ -3379,93 +3169,117 @@ "optional" : false, "integrity" : "sha512:zatr0VbzkQbNa7/UffH0sKidxKooxowx7xKkYxk8aIiX5BXwG41/DUh7Dmtb0vGQRL+GBXBLAk8m1qofT5okcQ==" }, { - "groupId" : "org.rnorth.duct-tape", - "artifactId" : "duct-tape", - "version" : "1.0.8", + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-api", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:0KBBoObrJrkvFVQDjcFpqH/PCpNUl7ULk8E9eN3omsJjObRaDWml6Nzwdt6g0Yfb6Bzfl6BF8JLQk2cX2OCMMA==" + "integrity" : "sha512:6mwd3/ZWliQLHodkxtcDQXyqP5dj9h4Ay7fprrUQBO3aE6SFwAjhgGMPl9vZra9qsjQt2Gcp2JX/YDnvSkxJiA==" }, { "groupId" : "org.seleniumhq.selenium", - "artifactId" : "selenium-api", - "version" : "3.141.59", + "artifactId" : "selenium-chrome-driver", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:lvH6jU/uakUiWxjk38EUO7cE8tv/W6SYOl6JDdbDS3TuvmIYG3xXbyolB1ka4Cl25NxHkxfXAo4DzNRZSUkuUw==" + "integrity" : "sha512:/WcmNvOBq3eQudtI2WOQqhopCasTFKQHGns/rCIxsJSqfhU4XxfmgfVaJPIQREM6KVuJ+RevoeLwq5lZydWVJQ==" }, { "groupId" : "org.seleniumhq.selenium", - "artifactId" : "selenium-chrome-driver", - "version" : "3.141.59", + "artifactId" : "selenium-chromium-driver", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:qGoyvSOXWlrzD61B88nU2TlnDQhnDK6U+3+0IgWkGBuTyB9fWPBXxD1oFg/QGE5wy2GD9bbIxHqIICwCRjPohg==" + "integrity" : "sha512:IOeh3YiFGsehPu+TZ8mSOpG+4LRIcVaUlXjt/YVFZzFadszEltfjOl6L3W0KX6PN+R9Tx44lE/wBs3zczRDDXw==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-edge-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:EGeA1j0idvi/uu9Uk4WL19I81eAJjb1k8L0Xkis+5f9fISDykCy0a6pkCG5d6aFehhSdmYX3hbmkvUVOp4x57A==" + "integrity" : "sha512:hqlvFheCh5VchDlAY7c8D4wyqV6J8n6NuWnqx8smTHVZ7dBI3YGm7kEzTp/qOILupc3EdvY/GW421DSWO1skog==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-firefox-driver", - "version" : "3.141.59", + "version" : "4.40.0", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:RSls9iO/OcGf8U5rvzctCBXOsNwIUG4GqsJ/pHkFta7TtBp/QlMofSLZ+p8S/FFi7o2q1pkrlxVxd/b3U0ECHA==" + }, { + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-http", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:n6VcfHh5+ftr54pWEfkif+NfZEodOuOThl1csZVG88B4puTTqdffZcP0gZlYTIlJNcQKaDlD2p21IFzmTxk8jg==" + "integrity" : "sha512:0uQ8da3So2H18N5+llhc0u985IcZSfLzO6aqgF+RGJ+Vzj4rP/pmLLZzd4RLMZT4HI4kxwv3DEKUAqQeX7AtlQ==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-ie-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:WNtQx99wSINxOQpq0OxITCBMcH+WGVZ87ZbTGbBrURzbPEK+qxXI8oyDaiCpLDgkPdXE9Vo2/BkXb8UTywXJaQ==" + "integrity" : "sha512:uaaG7zUyyd1TC/CF+NbQQ7Sl3zVIxiAk0MJ4wiRvLUSVFTAUVLgg9tpDP7S9vh1Fv4p+zwQJRS2aQr//MxOAFw==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-java", - "version" : "3.141.59", + "version" : "4.40.0", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:sNgtVolOQnJ4EgPlzrVHkPxziOEsfukSZBD8/soGKmwTfAJNJ7ljOfTxy4J1iwZG7sxNQ2ziBJgVi4E/UUnZ3Q==" + }, { + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-json", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:JqelxjpmOsQIXO1wx65aDNx8LWQoAblsLTK5e/36Sms2qan+r9QEXj37dm+QFZsJSNQh42CdhwNjNYteNGuocA==" + "integrity" : "sha512:o6cSw9oakIfJTE14PzPWEpTxOG/OfAX74GHJRe8oV6XPtHG9U3WzSWbBqauMJQuZGO6aTFSYcDlRGQdznoK6bw==" }, { "groupId" : "org.seleniumhq.selenium", - "artifactId" : "selenium-opera-driver", - "version" : "3.141.59", + "artifactId" : "selenium-manager", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:BkI4W4CjcLSB6G14jLoG9m5jB3iXdU4ruU+JbDKEpBdGKCI437cLpp2EuRjj84Sm4W0py3KLBkbumDIU32fZtg==" + "integrity" : "sha512:mPmqfXi8Z3AqI9mL7aqlLtH9F78wR6bZVmB5k64GEwOlsawhBhswsj6MeV1CcgA7U2fX3/g83V487rXTP7DkQg==" + }, { + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-os", + "version" : "4.40.0", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:rJfyTEOZwt2k8R8t7cSOz9FdiZSc8U/8+R1yYh4fLcTCM+218VjHnNZlYyTmQi8mIm4pHgHgdagRs0SQWSZagQ==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-remote-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:RHOd/AXZOfwj4jc0To7mLrsvQoEvkzta3bXJsDWEV0RKqoKGmq1r9O0ldw9/ymPVIeSeyhcCkjYPIw0OFWBauw==" + "integrity" : "sha512:NoVKsLdz7Jaa0vwiFXFbHMmYh+U9QcEJvSFC8SR2C6VXQq/BVbcE87GH2ninf3OEHZuSWa+3W83T0HE46f9uTg==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-safari-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:rOsJd0Vn7HJrDRL2moDCgT2GojxSnk8BocRcTEOIc2Zu/2fDSt+89neZiX/RlbERwjKtW4sJ0NVSkx17os75Vw==" + "integrity" : "sha512:9BVdeaRcUzQ1q7fEJQYxhlAEE1YsaWxWsgs8cLZciKGZOnplBJ5fg1qcFBPaz4pBu+IrXz0RRHDiEtjzgZ21rg==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-support", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:u4HvxWYjE7MfUN1m2T+M3m/HuSk2ytGF8OkaDJ3lXBblo/lD4JSg5G+8A68G2YtBAbcHPx8dKDG/o3wak8GUFw==" + "integrity" : "sha512:tkoBJrCfbDCFIW8GKQvV/vZR+8od9HivmrOLfVU4eJDgKRsWhm5IafbcRKY7DNG5XIqQh2x8pC9d0M1vBJLxoQ==" }, { "groupId" : "org.slf4j", "artifactId" : "jcl-over-slf4j", @@ -3482,14 +3296,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:mj5522ZmpglqMCG7Lh2RjzD1idjeUda2APjr2SUVpRCuLY+HkZzC36g2XWTxAZTKyN+g+5UBYO7w6doG9squuQ==" - }, { - "groupId" : "org.slf4j", - "artifactId" : "slf4j-jdk14", - "version" : "1.7.35", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:SqZrxhSvks0pizSZMT2krdAeQEp98W+31//8He8I3r7UTU6JWhukLFTiZ3hx4pVTYasknm+HIwMDHXkJrfX1UQ==" }, { "groupId" : "org.springframework.integration", "artifactId" : "spring-integration-core", @@ -3666,14 +3472,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:urXSaGh82l/2WmfYVYvI1IqWhqtdqK5eswgADAFXxqnjoq2uGRQcS9o8HynmpvtcVgnhk+Y8n0W5qAP9SEvdRg==" - }, { - "groupId" : "org.testcontainers", - "artifactId" : "testcontainers", - "version" : "1.19.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:vVIiRiqw+UAAb9yOyVJAVWBa8UUfYE4TwdblJkKlEuuUxEwoz3+CDgBU0vFcF9vjVZKY3oD2esGyKyxeNNXufA==" }, { "groupId" : "org.testng", "artifactId" : "testng", @@ -3717,51 +3515,43 @@ }, { "groupId" : "org.xhtmlrenderer", "artifactId" : "flying-saucer-core", - "version" : "9.4.1", + "version" : "9.13.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:k/KW8ufEa4SA3V7C5tVZ33S5SBYrOQYG0YT4sC6neCL+suddnSAW3wScD2GaXNKJVKXLHuJnlMF0xRo+296TGw==" + "integrity" : "sha512:dFN0bHVmn+0ogsUw8za4clU9Jnajd4JQ1vnjyouL0D5JJCMTqXshN/G1PjLRviXv1tDHSWoCThRZsqvIarX/Yw==" }, { "groupId" : "org.xhtmlrenderer", "artifactId" : "flying-saucer-pdf", - "version" : "9.4.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:eTSW5s89TbbXL+h/xBHm88Si3TgfqSiyHfvCPPvuHriueQPcMG+qhCiUbvIp+S06goSVSSFjT4LZqfETR4/9yQ==" - }, { - "groupId" : "org", - "artifactId" : "jpedal", - "version" : "lgpl", + "version" : "9.13.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:nYKlrF2wKm0zGaoP6W0snVqzxznHnNj9EbQDlJk9h0ijYcmQ5x+hYLt41EAx9vFRtV3llxNGjjZD5LxKV0GdUg==" + "integrity" : "sha512:75tf+TeVE2g/PkEMyRuOhKwFSJ8JH83dxcB8CBDz9VdUv1kd5rAmsayHQ3BEiGBRyGN9wU6HRvpxcY6GtDwIOg==" }, { - "groupId" : "patientSiteVisit", - "artifactId" : "patientSiteVisit", - "version" : "0.0-SNAPSHOT", + "groupId" : "wsdl4j", + "artifactId" : "wsdl4j", + "version" : "1.6.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:xpIViq24ZgebxTg1iWRchOCeDH2p82OoAnUV7GQgv/x9XWmY50Pg+lDegSAFuig2euhELQsAKVp1wxB87osjJA==" + "integrity" : "sha512:N3k2Pv5LfPI7/Gg4jzxrUQXe25GSCA8URTT8rMincBT58+s64ZJzRKJnNkwk3u3r8l4wb4DfwpOFGXNoXMWMUg==" }, { - "groupId" : "taglibs", - "artifactId" : "standard", - "version" : "1.1.2", + "groupId" : "xalan", + "artifactId" : "serializer", + "version" : "2.7.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Wsytkm/UM33C98Ad3KdR1RXwPaFJRyI1Erbwr1MUxAuK9oY+RGBMqo8k5FwMyLALXdtEaHNmPRMbyw/4COxBLA==" + "integrity" : "sha512:iE2GWGWFikYwajaA32nz8O+g3xMTcGtU5pANNq8h4Xy2go9aa6xVHFn3+AvdHLZMP9veROITUZxK+Hlp6ecHdA==" }, { - "groupId" : "wsdl4j", - "artifactId" : "wsdl4j", - "version" : "1.6.3", + "groupId" : "xalan", + "artifactId" : "xalan", + "version" : "2.7.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:N3k2Pv5LfPI7/Gg4jzxrUQXe25GSCA8URTT8rMincBT58+s64ZJzRKJnNkwk3u3r8l4wb4DfwpOFGXNoXMWMUg==" + "integrity" : "sha512:APhZxb1l9tyR45bOkf4vbTCyNU1rQZzZ6paYTFQD5c0TQruTYrCuHyeSYS8N9zHE96yS8WqCW7fiIInCehKcbA==" }, { "groupId" : "xerces", "artifactId" : "xercesImpl", @@ -3810,21 +3600,5 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:MfPKWjrFEDVNfION2VnHtUvm6MC60SLG4OazZgrOt6kYhYeT6hsQ08o2NWqudIHQcipDISgPf3QllrKptqJ89A==" - }, { - "groupId" : "zxing", - "artifactId" : "zxing-core", - "version" : "1.5", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:IMF8rdSm54okRhvVvr/OTiqqURRNZ9lHhgafJCYJSeHGMbh6u1riqv31YdA4sLgaS0JzMgxG4sSKa4D8LR5FBA==" - }, { - "groupId" : "zxing", - "artifactId" : "zxing-j2se", - "version" : "1.5", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:M3SqXnEmTzk/IJ+nYinC8A/eRmGMZZi9+pPHcUjmE1j8bs/E9B1n8gSBM63ORqjM6nEbngrVi5yky+loR9jifA==" } ] } diff --git a/dependencies-lock.json b/dependencies-lock.json index dc9c170607f..cdfb23e43ac 100644 --- a/dependencies-lock.json +++ b/dependencies-lock.json @@ -7,6 +7,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:MRwxFfn2ZR0XEcUtFzniWnDyVFbKy5os3edidJjDCxPXIRM8x1s5RirRiBKoJHLvGzudZPq1q7A3fBK/ggQ6dA==" + }, { + "groupId" : "asm", + "artifactId" : "asm", + "version" : "3.3.1", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:Fk96WeLnoxM1/LPhcKF4BMqudKGSv1yNdr+QgZ628YPpzeFbSeHYtXE7FfxmOHGAi/XjojvhYo+2B09trwZQrA==" }, { "groupId" : "ca.ssha.www", "artifactId" : "olis-service", @@ -18,51 +26,51 @@ }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-base", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:2oz1V5Kn8WNKXvm8A2eY6F/B+cz9/XfNejYKoaPIF1a298R7OqpMaXBudIA52jxWveES7E7BLAoBAiP/fwC4hw==" + "integrity" : "sha512:+yroXyyOv20n0FZL7MzFG/yixcn/dBko09lAivI+uJaEMNJUtTGusVZI0krwXJm8ZgyqE6eGWrvPQfnhh8EmJA==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-caching-api", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ItuEAtdoCmu6iKtO9KxNCT2pwq8u3IIzoAkSmmpaIoJoXfPHUzIp3hagNf1Nh/QR/2/29CYbsPXH+GhgDHwoMg==" + "integrity" : "sha512:P7sy4EBGDXhLcZPUsS3xCkperUfAmQV/AJpOV9VLTudj9qt42wVGzUSTSX1GqrCBtyTz+7iF4wmpCi6dXnTuhQ==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-structures-dstu2", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1bxFD3Qa1axzg8dd0jWud0F8kxQbtdcodEMNKHx/SnJLI9GU/H5Qv/5c/deTQaaO3YY8wcip3IGVL4uaVUd0Qw==" + "integrity" : "sha512:dvDZ+0AGbT8G/IyHLgIK4WdosfJB2XBHNTAkPfijL260i1Y+uhr0WJKikH+Zx8HlCdwZ0NZ6M7VM6kcBE27aeA==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "hapi-fhir-structures-dstu3", - "version" : "6.4.0", + "version" : "6.10.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:5yZoCN6xvQGnLu1j6aky7jF9Exrjc2HgQo4+oMuF5+cE3+Lcx1N+jsUc2YQ0mMbog23Sq2iXpLmLG9GTE3pDjA==" + "integrity" : "sha512:TwbsA/lm8DAkBibmgATRxK3WBM/iGZsuO0SV7QI65QGXEDMWM8v4IvkjPfAybFU8NswYIYLI3DT57SGEWBBPKw==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "org.hl7.fhir.dstu3", - "version" : "5.6.881", + "version" : "6.4.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:HFvhYUucEcYMFddx5KvZEcQPkDrQkJLR+MpZ9za8oDeJ6boQYpgip2CebgS9WJZEdG2ZaqVpoa6ErtMDI10C4w==" + "integrity" : "sha512:jsXA+nxwtcREDusL853GitoYNywUJULdej+gWT0Wc7zo01zAPhblaiRS3UeBcFJ/5vWV0tD3LQhG7OTPnTIx+A==" }, { "groupId" : "ca.uhn.hapi.fhir", "artifactId" : "org.hl7.fhir.utilities", - "version" : "5.6.881", + "version" : "6.4.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:IONZ+tgMGxP9M1ZODhlPremqpT6nnVZRzswNMbxLzEVlvRAJq0koGPixM2I29ZX0SkF2CATU2m79vgRXt5+JSw==" + "integrity" : "sha512:0HVxuI390ovXEuMjSTpKyjTIgcUyDpxXb9/4kioGcIBQJTq80sz7Q1/HzOEEW8KOQpmhUEZc8ac3PS1NRQXiSw==" }, { "groupId" : "ca.uhn.hapi", "artifactId" : "hapi-base", @@ -168,93 +176,101 @@ "optional" : false, "integrity" : "sha512:kGAn8E5VII/duD6uY/Elj64QAQfijpy9Z2qNS99znBh9P5v6nLNyEc5KC3LzZQHeMAzYgG4fSwO8O9mDA7laOw==" }, { - "groupId" : "com.atlassian.commonmark", - "artifactId" : "commonmark", - "version" : "0.10.0", + "groupId" : "cglib", + "artifactId" : "cglib-nodep", + "version" : "3.3.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:+qHSEh6HrmnheeOq4heszQg04Npxa5GgKf1SbhkmEucWdfJ0C+30jiPvHtxF9nKivhs+eLv7GtWclt09L+7tug==" + }, { + "groupId" : "cglib", + "artifactId" : "cglib", + "version" : "2.2.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:e/GJjmMm624By3ec2psMA06QG1WdQa9ST3HjtCWD2HwDvxVDJiTPtOsWdwBn5JWPIiI08okSM3w3q/AAMdAzqg==" + "integrity" : "sha512:IvR7uftlGA6jAcsHjPWKqPGa8RCx7zt5DJkyItTs8cPa8j5LHIBOhyld4q0WDlvwjRxNm1Yw3DH9Kj5JDbUipQ==" }, { "groupId" : "com.beust", "artifactId" : "jcommander", - "version" : "1.78", - "scope" : "test", + "version" : "1.82", + "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:XuLvTBKIikjXyDAYnQbuimU8dmSlPJtvqTXU54ZrBFQRH4CS1+zghuyAxh7asoVhh6HiR4c+XI5HJO+wLDdQSw==" + "integrity" : "sha512:csm+tdKC7N6629WVxPBXEFmTKOSEMtwZaiYdiXPsdn1SA45b0m58C3i4W0RVaH1Z+dCjZyIehI45xy8vWDuvJg==" }, { "groupId" : "com.fasterxml.jackson.core", "artifactId" : "jackson-annotations", - "version" : "2.19.2", + "version" : "2.21", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:gJ0jlw/kr2FXz9/Xo/m5yj+A55D6rbMxPbBhVcpPth40djqWGUzpDVqiUmTdoRJkKKwHg3yZV17t9Cc8J+RJ8w==" + "integrity" : "sha512:2DKpmGeswtWvslltp2DFDmprVMG7yObEGG8mehbh1Vx6kW74sDStayd8QeM0K5Hc3C49zqi9zP6J58FHiUWRvg==" }, { "groupId" : "com.fasterxml.jackson.core", "artifactId" : "jackson-core", - "version" : "2.19.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1tZOwJgZu5AdWfNL+cQi5jL8jQlP+X/FPWlay7C4F2jxPkRAYRdunnmsGTTkQ86dHV3OUQSmYrZO/6la5XQwMg==" + "integrity" : "sha512:9LFToKfJdGIN7D/P5KSGnCYyq5f3PCZiBBr30OsMQq1GK/7ozcq1VChCF1uWGX3x2RCohBBnZU9udjs3DBjM+g==" }, { "groupId" : "com.fasterxml.jackson.core", "artifactId" : "jackson-databind", - "version" : "2.19.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:BTP+qaNaLnuSZ6YqOSUtOsXPirD/MAVyQoMaHhfCMiW5NffC7WTedYXqg+VsMuJrtgeNmDRlTgR/HKew7gDdcg==" + "integrity" : "sha512:g3qU4gR00K02MGY8ARLpgpFOXPo7vzl7jDHQC2jX/I5FFEWLdd05z3Tt2n4zM5UE+oRYZEdnhulIEr02paQo7g==" }, { "groupId" : "com.fasterxml.jackson.dataformat", "artifactId" : "jackson-dataformat-xml", - "version" : "2.14.1", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:9aim9EXBV+ubRhVWagHL9fkDMB5LSW3LyEE4Fh3GBiJNcySzCgyFHL+m8rmsflPQc3ZzXTGSoPmLjEGceaRgBg==" + "integrity" : "sha512:ssyfsNOBY2jWYB/EvbwMu5oCdXxGN6CqU91PGHK/NxmVbWvdRq1OXoIrUhn/OVeIKjb8Vbz5E0Cix4G11NlxzA==" }, { "groupId" : "com.fasterxml.jackson.datatype", "artifactId" : "jackson-datatype-jsr310", - "version" : "2.14.1", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:6qSvSdIuD+VJDjki/0vDiMt6tyNe2jtzzL+7OpmYmYmJtoaXfRSgan9Q4Tcu/DQuE5EIBV21UpVtFgFmhV1Pew==" + "integrity" : "sha512:BxE+iZ0BQd8EtvEYOv9zzFikEaGRM7OTUrwiGuWNKCUe8RTkjgOck4dgswxeIXpb1EPqyG/WB0RfVzyykKAYiw==" }, { "groupId" : "com.fasterxml.jackson.jaxrs", "artifactId" : "jackson-jaxrs-base", - "version" : "2.15.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Y1z10fObhQt01uJ3mWTNSGSj+P+3PnCGMpSI9nLeo3iDiuYiigeVRMt4OIyq+yYhIXnX5eQzITL/rFiScw07Ug==" + "integrity" : "sha512:MErw210PV4v5zLHBDIM/vRIgU53ESeQeib3bINuFvXINpqiL/nsg91eMzr1u6yFIQYY4evONN6wvl3SGvHgLsA==" }, { "groupId" : "com.fasterxml.jackson.jaxrs", "artifactId" : "jackson-jaxrs-json-provider", - "version" : "2.15.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Hr/94SGXnABae8hu0ElRcjYB43g7WLA7uXEZpvT01CrLXoVP7eIA27f37eq7+mbUaOUWwm3XNEt9C8Xe8A+V8g==" + "integrity" : "sha512:E0NbYGkpiwj4ue/8gDzDSDpPaU1Dyich3YTYPlIZZ4UjTfsufvUwJcsvUL5LDSUs1BtMMOa7aq9RjKAzeaEVIw==" }, { "groupId" : "com.fasterxml.jackson.module", "artifactId" : "jackson-module-jaxb-annotations", - "version" : "2.15.2", + "version" : "2.21.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:JStWAs5mgxg6w+3rKe4TMmUYAbs2I4DJB3ENPvbTb1NYIGnlieeHPFeecty1kO8/Xlo68yopE3YLjccWnopQrA==" + "integrity" : "sha512:1GXo4NdQx63jzEqS2LS/nO74zSeHfCFDtqkGaZDU3gZUrt5x3B5Tnh1TVn4rUed42HOgf63QQ8FHUnoItiSLzw==" }, { "groupId" : "com.fasterxml.woodstox", "artifactId" : "woodstox-core", - "version" : "6.4.0", + "version" : "7.1.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:faTNUfcILlmzy3iYjNp4vxYuKwJFfK8XJCy5zqm4ACraFdTf53TKA1Ws3qlciLZ8TQaiemFlPLhMmkbSeycmxg==" + "integrity" : "sha512:KBBdZAl2aWYSPU4hLbpVXEd2v+tTgJPTc57xE95cbW6SRTqrwWkVv7dhJKXcyCtX880TtC6i5AOKRJUoXGQtOg==" }, { "groupId" : "com.fasterxml", "artifactId" : "classmate", @@ -272,133 +288,21 @@ "optional" : false, "integrity" : "sha512:x390I/2WtbYVkjZTbk5LUJAyzqlDaBhrhsmfTscs9A7PsmghzHEkB3NjkCziuRZE4y5T+n3j/OmIW0ALBCTs0A==" }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-api", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:peR3qbanhvSzWOOPTB7t4ezXbs0fvRSmgUM8MuVaxqX7EWYtPnodneq83b3wrekf0pGkP2b5V1sbjIQ0YD0UHg==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-core", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:u8QpaOlueaYoCtK1Ne/YKPfxEfFSanT7PhMbOBeYX4TyQGdP3pOWw5lX2bODMudt/W9fqCrbq8BlSF8DAnI3eA==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-httpclient5", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:gPJFa7ey8stLu+FTqytcRlCXb+L/4YLZ4DhVpQ1UivpmpqCqz/XAL8Y0ZC2u96wnbfyzVXZOGLv2GFEGckOhuQ==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-jersey", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:wiSt8bnvY2Zfe5Hs7k7wKXrB8fwFECaqytfVTIUrsz6L0ZGRNfgDxSPnzQmymLb10QaYCjiMl7p4ABMa11PvLQ==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-netty", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:zXokfJ44d/armf1yVbhznIIFzTM39v5ygGkCnBVJ1NTlVch7qhGFKQ0v4KFOwDyVApXi7w6UX2D/ELsKgMmu7g==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-okhttp", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:3B3MiEe8fecbq4Hzk7ikOWlpUmSHIuhaNPCiy2x+aG+OYLUBLRgVHhEjwpe1YJQf1nyfWQN6XPm9NnyhGROL1Q==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-tck", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:QYm7Cwyn72frC13bqevUIhey5JwITYucOJYII+uUbaXWdZ4BsVlIDrBp2JAblK/r22lM3Bmsjfbca36PygngBg==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport-zerodep", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:ZZxtdwBieksCdzgDibCvYQnZl1IYcPPQYUaXmJz9Vh5LX+Tlh5T4MmPHs4lKOGL8KanI7P7KoQ5fMHYX1CCj3g==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java-transport", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:oKflCFLndOlu+tghIdqrjY7dF2/LFmFj7jkRTkPVNw7XIXVVkA4fnwRyR+8mjSYGzfVY11TWClFKBpW60aiyNA==" - }, { - "groupId" : "com.github.docker-java.docker-java", - "artifactId" : "docker-java", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:1AcoIzMgAOx9ZnABBgRpVp3pDiRtUi0dKZVma3Q/22Agg0kvjgqw7Vaxz/bfkjFdfnNcADzOiM6QBi/tVIzGGA==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-api", - "version" : "3.3.3", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:p/hg45FBOSnUa+DSp/M6Tviixm/RMezEHiswBiaOVwAb8UmCIlkp/loGN3Z0VLp4inKi+2g+nEl6A+yN05eOKQ==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-transport-httpclient5", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:JsjL731H992hg/HEhSWXYppl9dCE2qMZExWA8E6tc8ML5GRQOBxQY4yw4kY0/lZbuXtquwQlBweTWdEGEsg4Cg==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-transport-zerodep", - "version" : "3.3.3", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:MVGkmS3KanGkv+3I4PP9v8Iiu2DYnei/wTDJpo3fdy+m+gFyBLm+5bo2mN1XN6kQuBfMDRso0CSFNZGNZopA9Q==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java-transport", - "version" : "3.5.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:2HrYpdZlkrjWS/ks6FFH4b4sYD97DWkpgeKDHQgTtzmE5p4cGMk1BvIW+PEDkNFZY2zV7wYYnB60vApSAby2kQ==" - }, { - "groupId" : "com.github.docker-java", - "artifactId" : "docker-java", - "version" : "3.5.0", - "scope" : "test", + "groupId" : "com.github.hazendaz", + "artifactId" : "displaytag", + "version" : "2.9.0", + "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:YOFlogT8PaiMZF+l4g1nQVw5RRxXegegKUB3xbCYBWcrFvn6hqq8h+hrN38cI9xSsIwHkxljLjVYGomrpFEv/w==" + "integrity" : "sha512:BERkZzVHVcWUGG2qGbqxTfxLQbhb2DbH0kM76zqu0kuQk32c5ylWfqogj3z5Rx3y3W7dz71M9m/feVGo9kBkAQ==" }, { - "groupId" : "com.github.jtidy", - "artifactId" : "jtidy", - "version" : "1.0.5", - "scope" : "compile", + "groupId" : "com.github.jai-imageio", + "artifactId" : "jai-imageio-core", + "version" : "1.4.0", + "scope" : "runtime", "type" : "jar", "optional" : false, - "integrity" : "sha512:UbdO2vyS5w9gNRSN/+ek6fQcdUpQEeSoTYKEzFOJ/HDNu7I1hENRAoyS7qAJ3OtgO5VQGkDO0ELbqFyQx9FwMw==" + "integrity" : "sha512:X7AWF3F/3G21FP5torJTw9klMmGQqLoQGUHym/9uPBR+YhbFAcpmtNQFHSE7HAX62zcHVjeCv8xWdDVzOHhsAQ==" }, { "groupId" : "com.github.librepdf.openpdf", "artifactId" : "openpdf-core-modern", @@ -479,6 +383,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:EdDb32zXrgLV5/ynswZ5zW1uDxugc/K2Ht4ir/0RjEcWPk+mbn/70VPwDlPwBsDqWv87Tna1fNePpTIAE/dw/g==" + }, { + "groupId" : "com.github.mwiede", + "artifactId" : "jsch", + "version" : "0.2.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:xpH5Az2cdhqdsVI4+1j41Pg2EQRMVW4GusqL4Cba7ec5ZLnAewAB9TpVtIVzYKxGH1SmVT7lr1qM32gSjC9mlA==" }, { "groupId" : "com.github.openosp", "artifactId" : "ultrabuk-htmltopdf-java", @@ -511,6 +423,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:L+w8UAxL7RQ6SOhOmNWTjcR3SDDpyHbK8M/Di9nq7RiQcnjropJGd1T9EyyfuzCTAJ89yR91/xprznH09dQ7FA==" + }, { + "groupId" : "com.google.auto.service", + "artifactId" : "auto-service-annotations", + "version" : "1.1.1", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:nUnPlCadtiMA1f14JWEweH2f0ITxRZ1ju7Ns8al/DSvmElX/zE3JCEzDeY3W9XfQ/2tx/a6PyrolS/6YRe29fg==" }, { "groupId" : "com.google.code.findbugs", "artifactId" : "jsr305", @@ -575,6 +495,22 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:7ZquT6pWwE3Ahq8HB42zc09nXrQYi7K+mMlMxZqOTne3QZXEfXDHtpe8O5OOEG/cE3/9pTWLMCl5Xyjn2SFtaA==" + }, { + "groupId" : "com.google.zxing", + "artifactId" : "core", + "version" : "3.5.3", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:C18E8cF8JoanCb+9IXo7zYyeFDE5MFmGsGKmz8QFDQ3kPeu8igzqFd/A+MAJtisMmSByKMF1MO8FpGXPnWi5WQ==" + }, { + "groupId" : "com.google.zxing", + "artifactId" : "javase", + "version" : "3.5.3", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:fsxQfCGrCl4kVYrhPG6pVrKDe8S37A3twA5g21+AvXuwtjIGhbG7n8pxdFuywhF/2FXLOqEpLCiEwD/cPHhRkg==" }, { "groupId" : "com.h2database", "artifactId" : "h2", @@ -594,59 +530,19 @@ }, { "groupId" : "com.itextpdf.tool", "artifactId" : "xmlworker", - "version" : "5.5.13.4", + "version" : "5.5.13.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Tj69vcCRv0r0mr78sY5gHPfpojQ2WCg7J6+/K1Jhbta/vUhRwmitDPUFrda8DQShTb3uGRkCbF0Rkw03+0zU2A==" + "integrity" : "sha512:qT6Z6M8/iR6PQgI1/y8xfPoGe6iQElOtmuL0OTTRy1KfedxSz6mNqE5KLmB8LdvEb89b3H+GiVl7G30smd7EOA==" }, { "groupId" : "com.itextpdf", "artifactId" : "itextpdf", - "version" : "5.5.13.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:HCHFwerQk+96YOD6L8Xbe65mrOsBWdffo4Ynwu7htpmUtv3IjNT5ZXOT87noUhYzO7ZVbkQjYAFOB388gGWWmw==" - }, { - "groupId" : "com.jcraft", - "artifactId" : "jsch", - "version" : "0.1.54", + "version" : "5.5.13.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:l+xt5k9IcO48hPiDvTZkViv9YAyp8zZJZufb7n5OhSBkfAP5+B1oCOMwBSyhMz439JfWJSzSb+chqQ9XPL4gNg==" - }, { - "groupId" : "com.kohlschutter.junixsocket", - "artifactId" : "junixsocket-common", - "version" : "2.10.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:VXhwRNHNOt4RNk0cDqEGYOFSFWHNz3sSZhaOvibWM0A2SpZ5BYEAr6CW7wk3j11kfvu+v8t4AE98WjjXx3qreA==" - }, { - "groupId" : "com.kohlschutter.junixsocket", - "artifactId" : "junixsocket-native-common", - "version" : "2.10.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:sXIDC0TFQB6WcoCJMct5WDDV0d1azfWtRBgt73w6s5EA5W5YMljGsXf0Y93XG5wXSGaMSgZOwuQMsZq9WFO/Dg==" - }, { - "groupId" : "com.medseek.clinical.service", - "artifactId" : "SSOClinicalConnect", - "version" : "20171101", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:Qy0PyfO7id0Jsx6jlMDPsKtlcdy72unF0eM6zOp9KQ3hoWylFsQ7Qfb8/X8nlUv4xdHKqfXyPgJroS1rpJZtCg==" - }, { - "groupId" : "com.medseek", - "artifactId" : "PatientService", - "version" : "20161213", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:HLfbp3yV8KzFFEqazKmkfg7/oz/N7MRg2/PRuhXrgB6yJ8VZUzczVaI09CbuizXqdJEQH4rQMyYoQ0wS1WcEWA==" + "integrity" : "sha512:k8jO0QMHnJwgWpF6c1nn5ga8E6GsaZo2jDPwZWK6nTVoWa7i/OE3DT5vMwkx0vROptpnFABOnJ1Mm7R5JRD8Ag==" }, { "groupId" : "com.microsoft.playwright", "artifactId" : "driver-bundle", @@ -759,22 +655,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:uh0OM4Iv8QHKJg3hH1om3U10ie0Ke+ZVRlG8qS7ne/UkPERLpHJMP1Y62IYIHYidXq1s3PjTQaHrOwodV3B0cA==" - }, { - "groupId" : "com.squareup.okhttp3", - "artifactId" : "mockwebserver", - "version" : "3.14.9", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:MoJ9MAmEhIf26SxscGXv0N3C4eSUXmHPueNlfwf/NwR+EYkIPSWAs35XGxR/1W9gtRAPJTFmWvlRupzgFfDOlg==" - }, { - "groupId" : "com.squareup.okhttp3", - "artifactId" : "okhttp", - "version" : "3.11.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:99iBggx9a5ygv23I2BKOF2kVYtw5IC03Y1Oxc1SqgDEbbOD/WETlekrBNOC7OgOTEe3xysM0/TrnjqXzMRbTiA==" }, { "groupId" : "com.sun.activation", "artifactId" : "jakarta.activation", @@ -826,11 +706,11 @@ }, { "groupId" : "com.sun.xml.bind", "artifactId" : "jaxb-impl", - "version" : "2.3.3", + "version" : "2.3.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:gkCQxFbuEgVxmb/Zj9rlNaMIBbFsgleUHsj+bsq7p7WHmhgz7QBNtAHH3ZKOXxAhb1BBVYSqSPw3smMkBf5jJQ==" + "integrity" : "sha512:aVAkjiBa0+sjLpmjDTZS6/6fTdYP5MDcn5YuknVu0azKodvABehnBnvH5HxDXRQ0aAZa8m3p55GmoX/tx8MwYQ==" }, { "groupId" : "com.sun.xml.bind", "artifactId" : "jaxb-jxc", @@ -858,11 +738,11 @@ }, { "groupId" : "com.sun.xml.fastinfoset", "artifactId" : "FastInfoset", - "version" : "1.2.18", + "version" : "2.1.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:0bAbTBwhTHmSnJGUIbXqfz5FNVG3GypJm7SGehXw2HHM5rlL7tE4azSkJmb/IV7AWPuGRbxTC1OgtraRsfNKsw==" + "integrity" : "sha512:lk7166D2p75eSpEF5nSGhGGNWkqtB4GPaBt/Hp50g2ETF34CGU8EL1zNMrRbGt2OBIpMdhusurSSPeUrmg/YJQ==" }, { "groupId" : "com.sun.xml.messaging.saaj", "artifactId" : "saaj-impl", @@ -955,11 +835,11 @@ }, { "groupId" : "com.zaxxer", "artifactId" : "SparseBitSet", - "version" : "1.2", + "version" : "1.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4End2aJeao5rQwfa3+yR2PbpJ51u8ipQ0/KfcTgjEdIhCXDtWkvRw2WbhAIiQAKKCqyjxxuqgMuFnET6+wcVHw==" + "integrity" : "sha512:xWCfL91yqy50YaA8hQBKR5QbiDkm+EZlMCv/81q6X6SNTOR6wkMUo7wt18cOH42CRWflAm/RdIWwbESZmUKvXw==" }, { "groupId" : "commons-beanutils", "artifactId" : "commons-beanutils", @@ -1000,22 +880,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:zH/dfXvRhRtI0QiDdm+snXKwQHcUs8ZTNpEw4yJL3Rmky5QfuBPd4ejH0puwelsaRNYRJA6tFxflGhWjHJYw+A==" - }, { - "groupId" : "commons-dbcp", - "artifactId" : "commons-dbcp", - "version" : "1.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:wFErJVxKckJjS4IMeMOXKW/JOI3s603sGZd1NBWY8Mh7IRZEJal9/erfrZ88gOHU2rc10ysTYjd4IKQgS05aeA==" }, { "groupId" : "commons-digester", "artifactId" : "commons-digester", - "version" : "1.8", + "version" : "2.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:E4qq3eaxNO6zlXT96A+O7R3uSnBJ/M3YxGLAoN+rVBm6/SWed7mdhQlLTnyGRnPwcknDnDsYr/h+85s2Y/U3og==" + "integrity" : "sha512:osgiaQeGtB4KAlBseq9+ikuCUepx1peO4D6CsRyiQuSThtbahNvHGC1ab7FngirtIA2i2X4vJk1jzPjxuWgayA==" }, { "groupId" : "commons-fileupload", "artifactId" : "commons-fileupload", @@ -1032,14 +904,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:eGd4UpQ12KFKts4hds3yue5lhacYk7eF8mJXEiFm3O/HxK8/YS7aOXSwbBbQb8NXF4vyi5t0AQ6bwEwzIhrcLw==" - }, { - "groupId" : "commons-lang", - "artifactId" : "commons-lang", - "version" : "2.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:rjW3YdFvQyfNtv2hZ4kWb8ZwIO/XH9LMM5W5dET0Od/Mfu6Uij79OwJEBBbK64c0F9ldtqKxb07xmN6dGvvARQ==" }, { "groupId" : "commons-logging", "artifactId" : "commons-logging", @@ -1056,14 +920,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:f9hVMOAiBKjK9GJ/JpNiA7H7rMu50LCcPGT1i2O3OOmqrimqC4ReCe+5pw2d0VQuu8eQJbPrCcH7YupPepydgQ==" - }, { - "groupId" : "commons-pool", - "artifactId" : "commons-pool", - "version" : "1.5.4", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:u1pm19qPOJZg+zacGm53KW85I5zKHWnKG3yA6OgcOKnSXevvtwKi6qyYfoOIWJjKDJXGOH2EQOVIZT1r2uaGpg==" }, { "groupId" : "commons-validator", "artifactId" : "commons-validator", @@ -1072,14 +928,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:TwFPvvJ26/FjK4lf62j/EougiuxjxO31bxHm03M4W3DWzrtxzJWaGBclVXMCBl1azuLu6orRzlaDGuwbO2YKhQ==" - }, { - "groupId" : "displaytag", - "artifactId" : "displaytag", - "version" : "1.2", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:zejfe+mZG9NlrupVMNs/qWNs86GzwuTzE+6O2g78Glg3V2Jj/VQmiDgbNUHGdfo8xXEqVllBQpMxAXAKDIHvyw==" }, { "groupId" : "drools", "artifactId" : "drools-all", @@ -1096,128 +944,46 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:TSXsVUMPPIBP0lpkm4GwlaH3QqmLmWsjEM14Vn7zBZZDzE04U24FyezojodAnXbFcEctPBfGrM4bvSInnVlyDw==" - }, { - "groupId" : "io.github.bonigarcia", - "artifactId" : "webdrivermanager", - "version" : "6.1.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:9IFmcBdnemg/eGG349+t9NXXP5C+ZDAqKLL3FgQFBKVjnj0aM4VImU5yGtcODl4bOt7fydczzsPwhsFWQ4hQ3A==" }, { "groupId" : "io.netty", "artifactId" : "netty-buffer", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:HMXqJdDNXBGUwl6/rTTB3rSuwlBCUTAUy38OslLqjHbkh8wkEzb/5m7ZRPvOEdvm+UAw9UVraSHc+WOiWjjsJw==" + "integrity" : "sha512:TZ++bNn6SnhTDlaAt/7D+agp/899U6zW12iLPtHokZGvdmKC6gNAKXpCd+hTcZuV2JjNE4JEjdF8iQtBSxD6NQ==" }, { "groupId" : "io.netty", "artifactId" : "netty-codec-http2", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:iYjWadmaKZolqHrV3a4THVfKjltSEF7uqWbOHDUmt7Iwv4EyPVFYQk4cifI8yNHZNcmH7D8yStcHHheOML2PbA==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-codec-http", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:AxlOlh2IHmolHOWPXYsSIXFNNgQzDbe/EtCPVaqX72s+NUS9MaMiqOSYxB3rHjuglVT1lCRc1xyHv/r+QTH3EQ==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-codec-socks", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:qELVAKundBks0LAq/PnjsEL4+g1CxoI/jgR4zbklvmZI+l0viOG7ELwPndMXO6TeqkylWcTQuTevmV7BNM7uPw==" + "integrity" : "sha512:vxWCF/NlHB5j+5GOY6lCHjHeP8gdAOcUkU0BUx0P9vJNaLZNIKnMKo5XbWdEh9l2yFga77vf/cLk8Ah7gSQjoA==" }, { "groupId" : "io.netty", "artifactId" : "netty-codec", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:smCgGx3YNElSDg2/g84jKHJa9HaRJTSjvPK3DWaoJaLqL6FRA/STz1SeH/m7meiPZoXsDSyUxTzC92Tmt5uMjg==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-handler-proxy", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:tGOJ0RTZyNPiH3cdIK4b5vvHKgIvTVgQUfIhTlpzSuT+VmrgHpLhli6dD9C7yXJLRbi2tILc9nD6HgRkVvyYbg==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-handler", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:lCjdVI/tv6RWKLzp5BbJIQSWSEl6BvO/pvYvImIou5eHqAxXE11vVwdFIF3kr/4ZkHaIGSx1WjNomzKQTROeQg==" + "integrity" : "sha512:2Y3teF1BFRL7Aq08NaTzA1EGjTxAeIM2G/VE0snNNbid5avgA5BDHw9dgHVlwySA3K7Why91axuATNOya3BMiw==" }, { "groupId" : "io.netty", "artifactId" : "netty-resolver", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:eMUz585JYi86VLu/Ytu8CAJq9xXb/k6QkkcO6C2H2Qk+rQaWnJP0tQjeXIrll6jzK3ucWKNO+FueLDBhn7ceeQ==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-classes-epoll", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:bFepuNF8XbgGAzUA/alfjfRiqYQQ9l7STc9xmZHNFDiBB/fgnjD9RsyJcVBNXxwcWW4/WL2AHxcy16yNEY/lng==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-classes-kqueue", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:toVbGeh8DctG1Cr6EhPkTTpJLjQtYpS2BNd7lhNx8DMmwRFiSVrpL2mstSnWx86P+2RNGMT4ESgUz7L2A4S2wg==" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-native-epoll", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:agvkZPCFgT8TQVZnF3YqQR4Ny4sodN5NU3IR3K1Hw0qa/OFYvisa69s4zQC0sOKv+kdxHo418Ko6hzMd1JwNAw==", - "classifier" : "linux-x86_64" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-native-kqueue", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:Lw6dFmkjO/em3m5Al5+4lQHoSQKrTWiX0TzeZRF0wzwOgn8gY66rRI3agreoFbjKGfXEyWJY8eeIokooZRZ0IQ==", - "classifier" : "osx-x86_64" - }, { - "groupId" : "io.netty", - "artifactId" : "netty-transport-native-unix-common", - "version" : "4.1.119.Final", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:ewE+RJNB/Xwa+nxYKIdxdKuSb2Nh98W8ci3y50vAs7gxNus+YpShFZwaFldAiZs4uympfY/XPTjqYoPuMyry3A==" + "integrity" : "sha512:X+Kgn7DSj3hELxfrWpsZ/9nohX9InMUfynI/hOH6JmzzelB8tk1/QhDmD5Q4R4GtdgcyxfpwegYtSqUp0RaXAQ==" }, { "groupId" : "io.netty", "artifactId" : "netty-transport", - "version" : "4.1.119.Final", + "version" : "4.1.129.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:bg+TSYsz28O+a/6SWtXw8Ap5cn5SAUQpmK6M0TEdFIArqo5ahPuq2Pm34BErtqT1R83hBF1Uw9mZCHdYHkwsvQ==" + "integrity" : "sha512:3ulAVVAU1Ng/XJrXMIUomsIeAzf9x+svAjqmt4v+7iS2uhdUREU1+4JrIoe+AKY8fBI2Ay74MBl6l3lJs2hZpA==" }, { "groupId" : "io.projectreactor", "artifactId" : "reactor-core", @@ -1250,6 +1016,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:0az/FGwPnqkjqTJa1MIrogUuxHQ0Grg5Krq36KvTygENskAP+bWEn8Tx+lwKGIMOsQTaB6E70mtPCkPRZ5NYeA==" + }, { + "groupId" : "jakarta.json.bind", + "artifactId" : "jakarta.json.bind-api", + "version" : "1.0.2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:p5HpnV0AGcWf98+Ho6UXw5QS0erJeOWf8Mc7yvfihE2rreStgQ9mvUMT04M9k77/Vagu0TCSKuP+pbUNmEiaMA==" }, { "groupId" : "jakarta.json", "artifactId" : "jakarta.json-api", @@ -1274,6 +1048,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:Hgcle2Ma4zMacdfNkTYVLN3rvnhrpQxom+xhip62Wb6OlS/gQF2zYzLLbBLGyHxtZI6BfAJ+qMbgxmDOgvb0JA==" + }, { + "groupId" : "jakarta.servlet.jsp.jstl", + "artifactId" : "jakarta.servlet.jsp.jstl-api", + "version" : "1.2.7", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:7xaiGQwv8/Y8vYJbqJdno+2fNvHae6dcUMPU5ZjU7hcRYmm/OZkgVSvJh+2132ycqnEZBICul7f5+ry+kGGPqA==" }, { "groupId" : "jakarta.servlet", "artifactId" : "jakarta.servlet-api", @@ -1282,6 +1064,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:HOSgWf2pocerdRr7E+wFRG11asQY3ZX4ztNpsE9pKKds9QAD+Jsbhtlryx34uPf/McUWtShxVe6pP2g/c9VKsQ==" + }, { + "groupId" : "jakarta.transaction", + "artifactId" : "jakarta.transaction-api", + "version" : "1.3.3", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:dkrei6gHaC3NHsc4LDUnXz2KsJoD1bRcSOcyUBGQ4nOCaQgKryiqjdZWwR7oS/t9rmlT3Sdo8qzs06jPDKSWHg==" }, { "groupId" : "jakarta.ws.rs", "artifactId" : "jakarta.ws.rs-api", @@ -1338,6 +1128,22 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:Z5z0TDudY1tD7RIqVV1XApLD8JN8M4ccQEOKGlPiBYyAV4aU7JRm6snigOGb+3qVsmFZTMTBFhyF3JffYjXlUw==" + }, { + "groupId" : "javax.cache", + "artifactId" : "cache-api", + "version" : "1.1.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:NYJKA86QsZiq+xjnlDWU7YM7JXvwLl75aQ14IiTmg4IyKYQwYnRVu163qRvNQhRLNCc8+Ec3GdfX9kY4FkyJ+Q==" + }, { + "groupId" : "javax.inject", + "artifactId" : "javax.inject", + "version" : "1", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:4Sa3zPPkL9GYSgvu8QBKcmmjN8IC5Z4E6OKvcUKA0vLY0rpeb1lIG43NNKrzXJZqaI0LSOx+lvECwnTcDTs4Hg==" }, { "groupId" : "javax.persistence", "artifactId" : "javax.persistence-api", @@ -1346,6 +1152,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:AT5ODv5ksc9nRNzkTtcWtNhROyrVtqATGvZjt5GOtlcFvQnU33Y/9KgQgp9Pa2wZjKdnDOQ5lAvleu0JFLUT+A==" + }, { + "groupId" : "javax.servlet.jsp.jstl", + "artifactId" : "jstl-api", + "version" : "1.2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:5PZoZ3fZ0HMj4bt4XpRKwtsJ8mpNXEbJhHKAEmzVUv4QR1jkR3U4xsiWNK6xx5S06zKjwhon9KFU3eHZ4yZC7w==" }, { "groupId" : "javax.servlet.jsp", "artifactId" : "javax.servlet.jsp-api", @@ -1354,6 +1168,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:msaevADQDl7bKDAv3VFcjmeMrRwsusutSHs9hMdIJ1Y/yjeDgwYc4DuNnuUPmc7ZQYzJ2NZOSe7zInAjLWYMig==" + }, { + "groupId" : "javax.servlet.jsp", + "artifactId" : "jsp-api", + "version" : "2.1", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:8yCRW/J7BfX5OmlXL/Da1uaPAwtvD8sYMvgPf/5W26ngV13Y5rBCWzcErHXqK0p2Vr2tZLjMhhC/3NW8GYncxQ==" }, { "groupId" : "javax.servlet", "artifactId" : "javax.servlet-api", @@ -1364,12 +1186,12 @@ "integrity" : "sha512:dj3smAH2R7GkXkkusqZ/amD8YIvvRzjrexqS2T8fbbArMvTGVT1FV8Mg38JcDqC5hUxZ55MmK2ykU8ccrwXvOA==" }, { "groupId" : "javax.servlet", - "artifactId" : "jstl", - "version" : "1.2", + "artifactId" : "servlet-api", + "version" : "2.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:+2/jOSJjG7ohtgbLXVPERXBx5pXsVjIgUYUoHn2z4tY9lSSLQ7nH+yy1BC0Uome4fSxdp0LJiRdMNSbczyOu7A==" + "integrity" : "sha512:NjulWQQ2q4IGe3ouFLSBrrKxLKQEjXoVGaLlSbLTwJ3fcYrGTcK+bC/CTFH9ycgWAmEylAMRM2lYjOJ9h3cdtg==" }, { "groupId" : "javax.transaction", "artifactId" : "javax.transaction-api", @@ -1378,14 +1200,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:NJfPdzUqoTF8cK0dKOjn2lEzfYRMgiejVwcgnHULpvXWRKT/29sQ5fveIEADqkP/gOni/zFkWEp6NNgpImayvA==" - }, { - "groupId" : "javax.transaction", - "artifactId" : "jta", - "version" : "1.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:+ppatR+X4s1jtcHLF3W2Ox7cAZeu28wOirMRbf4n1HNlhl0k7vrxm2SFVLYPGh7OE+MZLRV8MZNEqXrVUcYoxA==" }, { "groupId" : "javax.xml.bind", "artifactId" : "jaxb-api", @@ -1394,14 +1208,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:k6R7JFq4MNZkpIydFOhhmKOICc6U9yymaz1odGrh17kC9v7y0awaksAXAVSa6AoH22m9gi/9gxqV2Nv/rUNXkA==" - }, { - "groupId" : "javax.xml", - "artifactId" : "jaxm-api", - "version" : "UNKNOWN", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:k8O8gXF/hX3oclm8qkULbFIgw5SgnQBKoVm89dUt+qH37s5Dyw2K7CPTJaHz7KSYjrKuOoG0OUMtYwqvRRILXw==" }, { "groupId" : "jaxen", "artifactId" : "jaxen", @@ -1410,6 +1216,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:ytWC/BLQdB6eb9fgz4ClD+sE9e9CBD35b4pbeEdsd2ldi0ODbSJB92s1Z26nWZIe3SXq6ywE7JFusTiqKQHOXw==" + }, { + "groupId" : "jcharts", + "artifactId" : "jcharts", + "version" : "0.7.5", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:OVOQC+vjj0JCSZ0QbVlCX1S3PAR4wwUPDcCRfVw2zDX5TM/qlua/hemxKCvVcvVa/vG0hfgfXtlJPMTTgo9aCw==" }, { "groupId" : "joda-time", "artifactId" : "joda-time", @@ -1450,14 +1264,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:VcR19CgIPWVt2e1aCHK7802j7wPlZ9xd/6kAqDUw0WPC4FnNYwQIxz90B3Ag59/mLVeKD1gmPu7wHJwwfgRDCQ==" - }, { - "groupId" : "net.java.dev.jna", - "artifactId" : "jna-platform", - "version" : "5.13.0", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:3fzoBgmDs79zrpOff3fxMwUqrb5NPp0ZkvHYv5xyEGEb85MepyE3BZvRNBqNTRN5EOhDw6UvpQUm4hFDMZ8Hjg==" }, { "groupId" : "net.java.dev.jna", "artifactId" : "jna", @@ -1477,19 +1283,11 @@ }, { "groupId" : "net.sf.jasperreports", "artifactId" : "jasperreports", - "version" : "6.20.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:+3RfbL2A+a+FuZ/wy2aljXN/gEIuJ/3slNK8pt42ErRfwiOyOQk2V4HehwnYlGEmHThK1yKFxNfhs3sumd9/ag==" - }, { - "groupId" : "net.sf.jcharts", - "artifactId" : "krysalis-jCharts", - "version" : "0.7.5", + "version" : "6.21.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:OVOQC+vjj0JCSZ0QbVlCX1S3PAR4wwUPDcCRfVw2zDX5TM/qlua/hemxKCvVcvVa/vG0hfgfXtlJPMTTgo9aCw==" + "integrity" : "sha512:RQszu70ICfl4Zk9oQTBWZLBNj3AgtHDCQL22ju3bblwHZ+662wwEnGSrzMQRUIYvyNye9ROCT/3xtfm9Q+MQ6w==" }, { "groupId" : "net.shibboleth.utilities", "artifactId" : "java-support", @@ -1533,11 +1331,11 @@ }, { "groupId" : "org.apache.activemq", "artifactId" : "activemq-broker", - "version" : "5.16.7", + "version" : "5.17.7", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:XJQIbhRlcep6ispfp+o6RkCk7CPeixlO/toHfX5QCjU//GegmSKV/kJJJUG6bf2PapbIK1ALFD31hLU8dgbQ1Q==" + "integrity" : "sha512:cLCgXdZVIG7Jf0ixVBzvohLEY1/Y9PqiBpub/9XVGn1WyFxpgcI3aMfCUfzlM4DT6DdHDKeb67XWcF73D8J8QQ==" }, { "groupId" : "org.apache.ant", "artifactId" : "ant-launcher", @@ -1586,14 +1384,22 @@ "type" : "pom", "optional" : false, "integrity" : "sha512:pa8yef7BRfr0xG7skikdK4LmX4A6IHLyACGzahSr9CIcheGWWEgfoTPkXejpiE1m29Ae38Df2Ycnvlk1I+tDXQ==" + }, { + "groupId" : "org.apache.commons", + "artifactId" : "commons-beanutils2", + "version" : "2.0.0-M2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:RLxaVRfSGBCGL5cC01zG2MyuKgWLkq2jvIDPHUK/d27JG2Uc8nF344RJZEmBq4pw3xB9N0HdDcIy8cvkqI/tnQ==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-collections4", - "version" : "4.2", + "version" : "4.5.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4bo2n/5ODY+xxDL/shcar0Q1riqI9skev4566ih5HcMDVoXzSpOlsTcHRTdOpL87nKepm/c6ABeBHSnBOvqaHg==" + "integrity" : "sha512:7kPFE6ydy9fdI7XLtOpfZaLhDN+7QD0IC4fneLO0UGIxVSIpfEHspRSpqUYiitdlDwpXLVt47/uCYN2AhBMZiA==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-compress", @@ -1602,6 +1408,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:rL6qKQm4Cc1WHnFW3xg0DZarrLF5MlYi1zvda4LLmzh9b8saRNgZWq1OeG2imSieF1mKHTN7fH0cC8YQzBKHFA==" + }, { + "groupId" : "org.apache.commons", + "artifactId" : "commons-dbcp2", + "version" : "2.14.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:c7mb0d8bukC9ylZ+12JqbvGw14w2zbJhqPU7slAmXA1st0QxfHMVOdywimnA7fs5B49HPzFE+ts5nV55aNnFlA==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-digester3", @@ -1613,11 +1427,11 @@ }, { "groupId" : "org.apache.commons", "artifactId" : "commons-exec", - "version" : "1.3", + "version" : "1.4.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:FUP7PQZJGiXav9uImAiULtMaQD7jSdWf0ceoULdPyCbohHzPye79oRHxJv44KYCDyuWWjB9EfW2BAF6gZEnDvg==" + "integrity" : "sha512:mYLNe9QyLVEBrSM3xigMCktGV/rTx3CSI3SEqVbYB7lOJXP2zopcyQ9EUirsy8yCBNfwMDT8PDd4BMPPnnmxBw==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-lang3", @@ -1634,6 +1448,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:i8JDiztNmmvkpHpYQQstTQ5W4FeHqyS62rjLyQddYYV+jS8L/+2tM/GPijVlQdAPgKhZe13tuZW+hIDWk9AyJg==" + }, { + "groupId" : "org.apache.commons", + "artifactId" : "commons-pool2", + "version" : "2.13.0", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:n2531xBjmMJPLdTYfXIolF4l3S8JKgSo7AdsJ4vq26scJpDkJLTfBKAdxeXnd7RY/V2LwIzEgSvcm3myYMZAhw==" }, { "groupId" : "org.apache.commons", "artifactId" : "commons-text", @@ -1645,27 +1467,27 @@ }, { "groupId" : "org.apache.cxf.services.sts", "artifactId" : "cxf-services-sts-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:mTovJV4hNqyQTp7m5vahjeY6apV7UKsf5L///s8+ZMS3+WzXQouSMkIS0h98q/TgfsX93OusY9DrQ2u5Lv9Gug==" + "integrity" : "sha512:fwmKfUnAOY5Jwn+LSwN3XXqWNg+RFCViZi9/jKIvIBKqiFDSc6TwaZfIFtA9ckNtoCC+MB/WSw4y4ltFaBDE6w==" }, { "groupId" : "org.apache.cxf.services.wsn", "artifactId" : "cxf-services-wsn-api", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:a8jB3yRJy0Hb63ZOjiCIov+wRhRS3wTloPfZvT7VjQRTsz9xJzuNRpsP/UfZL6JLfMdzGYOy7tIcDzL4Jwbgrw==" + "integrity" : "sha512:rawMrHnNylrFUtk74ziY6x26edJjzJiOz/5t2j/dVWypbJsslxQmxAwiLK+PmuPuIO4L9nYYcmYGLjYZNkWn/A==" }, { "groupId" : "org.apache.cxf.services.wsn", "artifactId" : "cxf-services-wsn-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Dht9VkXdglUVRuJAshh+d39hevl68WrGWXU/9RAg22z8N8S3HsFVJg4ufoBzvy0UemJ4sY8NxsDoCFkTCXCGVg==" + "integrity" : "sha512:kdd18++dvWeFOB3thAR7Xk13KY9uEEBXlsy2NAQW7VjaV3BEKUAqFAvn8ooHqYAY/dN2r/wVYOBxTxKiAnfX5g==" }, { "groupId" : "org.apache.cxf.xjc-utils", "artifactId" : "cxf-xjc-runtime", @@ -1717,483 +1539,459 @@ }, { "groupId" : "org.apache.cxf", "artifactId" : "apache-cxf", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "pom", "optional" : false, - "integrity" : "sha512:Cs2+VGhgCyHQM5Hv463d0Y4YJfii1Q8SKuf7LHYtO6pRpKspyL6qW6Z7dgZLdgBd9zhAosV5yk3o2iA82IMctA==" + "integrity" : "sha512:bZIrD6xd8+4ryijZb0oBiPZCyInZxEXATdzTo16Sh/BqGrpYVeUR/NAqQEJiBK2yuiYqE5llY7jlFDmf1tnZ0Q==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:tSCh0GlVguuVaPdvxPW/Llc1vzN6iPlSse8vcGH8G1YyJG5tegtTZvtEKhnySmwh8gvUck/wD6V7uPMhSMpOsQ==" + "integrity" : "sha512:3wT4c2RJ3CkPchmld22qa+otOOXQLFPuMZ6WYC6qr0y0kmCRexncqYNYF4NhNFJkLrSbrlwK9eouZRqsP9s9mA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-coloc", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:jlhWIvume8+Q0+7Stc0SLZCSsrLwfMGYW4+ZOGyvyZ1hN3IvnrlWknoX9VSV2QRHtMLJVV4Nvb8B6h0Z/CT1fA==" + "integrity" : "sha512:PotQOqFo8m0rr+tSPxghH0lGwZKAWePWQqSm1eQSPhC+tO0F9O1rgRjkGckieyETW26dHJ7CkACmtIyjgwqp4w==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-corba", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:hHVi9OociyMr9HHyvCu+svYL6cVQLmvsPIGTnwATkIPAuUPrVqPsXgXnqTF7b8xFVj2mFn9BvHZkcYRd9aTHgw==" + "integrity" : "sha512:R8tMXQtTVSPWUfDi5ux+XZSu2wmjANIK+/dYdbu9x6mZAMdvLQIRoAmDypTYcSbNT0zx75qICLTNQFBg+NmXzA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-soap", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1/P5Lq4ummYukpNUxy7F9j3hWRwss3sKNfGKrSHDjHrr3E/xeK0Gp+pPPqeH7RnWnYmdoLCMt+CDfkCsryn20w==" + "integrity" : "sha512:bMwmAVNKP9PVVAJMnSvPAIoOKbLU1Pyb5Ny/VQncTuU0jCUHn8j1vq5n4jQvCOG8SriV6crtV3TM+XS+9E7MgA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-bindings-xml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:b0xoTalEAerQtNvgKZ6yYIjRSKlEMDSjUvzcZ2bHechfQLutF9rnlxT1jloh15v5DmVOh13bbFOuPEYD9BDixQ==" + "integrity" : "sha512:RGqW7wqyBeA5Yy79ACy6O9DiniHOl9qtkJgKIvSlXnq3txnrnMtt38fX+S2iD9Nc4Y98OCjVHR4Fdn2EtqFXMg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-databinding-aegis", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:0IVOKqQN2oUwAbCm8B9o7sNl3YVqkOJuZmq1oRw6FbBXN7PXVr+DzOJ6Qnc527DhfGwJKI+zOWfMFaXcaP3ciw==" + "integrity" : "sha512:FYbrnpjjL4W8rwm20cG7JJUdlO5etG/mxisuU3iRf2KGt5NtziUT48v1HCtqcwtAkMq0dmBhbaRcIVbgLkwc+w==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-databinding-jaxb", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:LV/EgGt4H39iO4rs2lWt8YVVnluLUTc6ZSbZD1nNDvO5TqrQc69mkXzpZDq0NV8O/m5B9XA45BvGptLIgwClYA==" + "integrity" : "sha512:+k0JKk9KX0cLyIoeJV+NArmjBDQP+Llg/S5N6R3bIrReotP0oyW/j9nBKaQDTEHwRmdXSLhd8lBDKgAXOZFThg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-clustering", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:J5341+psZgDj0yRmwKF9GXYeZMIRA06raIUN5PRNZMq3R1AuIedV+mm8zDwDI9MyVn+kde/mbQtPO9mhdpRRGA==" + "integrity" : "sha512:AXig9IajV/ODQ0Pg2/sHrWS12GiMp+l4H3K3aerp3e0Bpeh61JN3Op7epXEHYr2O23hYzilIwnOsyV0RNqpN3Q==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-logging", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:8vGbk8Wk+1b/cBtx9kZyPKxYvMIR7PKwsyMZXRPS5hHBavUUrXwLD9YeICzmq+7AyEcawM4NQdISzqSRhPdOLg==" + "integrity" : "sha512:ii/Nw9orjV3bPh1oFK6USWY1CzG8mq3USnidUFf1v0GXCDe+Ip3Nwq2FvM9gDZq2N7+p8W+xzuMbevgsaY3vgg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-metrics", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:kFlGCRjTstIWFQ1IoF17GgsZEJ+bct3jOGuQKcA+wmDhU7W4JW3LBcp7VIo0HL5N4ESnUaXmoCSMZn4jeX47zg==" + "integrity" : "sha512:kgcrzC/SY1cAKftlM99JbKybDHX619I25q1RzsrMRNoOLoLuUzSc3vXmt23sJVII/izwxxlNzs6Vnwv5gw7wZA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-features-throttling", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:07oat6gWJUQX4f0468z+W5KQIZ/Wcoi5g2VnkktyG94brKsVRdTG76kOnnyd/AdFerCcFCA/BIxs13oCPboEBQ==" + "integrity" : "sha512:q+UHBkSDYjMdhE6UW59yCrZH8/h/dKaH88MNAJXiKgH4pMG0rFB0YMf57NGQ2D/PnU5BKUqs8Ny21kVoXpn5Yw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-frontend-jaxrs", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:0TKATNmiYX4HrpyvySPHPKsg234rSUgOnaZ7kwRAA5rBnZi5W7ToAJjhX23egvmABn1SzyhWDRKjiv3xjclQCQ==" + "integrity" : "sha512:RQ6lkoOjIP/OLA+9LaBXEWiwZCfhQtM2fOexjiiRCjcfLQh+ZNi2l4vZ7EXrteITQLf3GxAwRiOs5NVdWTEyzA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-frontend-jaxws", - "version" : "3.5.11", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:ppHjzG0MGRAtR5Un6onFsdX0aTcEBFq+hMRPg7CfpNyfvGW/zZXrPTkpzBI/VgETm5dOLnlfW3P2B0PwiaAnFQ==" - }, { - "groupId" : "org.apache.cxf", - "artifactId" : "cxf-rt-frontend-js", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:UFGYhfJUZ4KncYS0YU4ZFU/cwBdVMjP7DtFMkaMbBfLPN54an1AP09dGJ+8q0D+gN4rYRYr6qm9F11LbCBVwSA==" + "integrity" : "sha512:v+iJpZwLxeF6Z++J3hkRTc/EQZx/tkV8TZB1P7gjk416tsmN+NzhNbzcPRD3WbW73jvsut6FnwLvxxMbh8Z9Kg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-frontend-simple", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Kpc3Y19zBBBK/OdSqbcAyTN9ZKo46wOKhFfgoO5ZPgFD3ewhkvAhhL9qin0n/pTHZ5UxZa/+pWQcLIWxEJ+LlQ==" + "integrity" : "sha512:SSfZvri3jhhRphbVwznDFQ8UjHLUB2fb6kpxd/h/XDB3ex7ZlhkNqfRK6ZO+usLrpbwZTeRLpjgeRRor5c1GeA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-javascript", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:MugD+6ZxgyHuy4Vwqp9tGYiGkzlVPI10SwlKqlDFsOIj3I5ZEWnd5/utiZHMHYuioqdvjYw9i66tFZ24S0qBvQ==" + "integrity" : "sha512:OrGNnJwK7+jMOk2c2UuNsDtIri+DrwLgwXJCsbyRIKvkjBBnrFfNmynbmnZ9xKngTXGCTj0B3V2CMQvdEWBOoQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-client", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:fH0FmigPwjl60ALVvW21s4sFAepXDXDUjhkiaXbvLVsE3n7NjEt1X8fUd1oGOv4wU3JZXnbXnEpIakr5OKCTPw==" + "integrity" : "sha512:gkz+Ix0irNf5Y7oU+SH8jJbvnip7w1B8lVU62/sg+EjoWs+WMZZSJakYkI6UZCvP+maHqKQ4VqsDcAj9dRqGTw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-extension-search", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:KBxlmsTXQTZ9ooAjmyIxeoxmXEdZ+LKic7Ktnv0iTsIqDLJYoBL5bpu2TCr2Z7HZ+RNS1+IW0YLYdVQW75IiXg==" + "integrity" : "sha512:FwlJHLX1z57dHM8eGFWSphzXsiNEoeQJtSqqpB5XjgRmJLLMp4nQ7QSoavCua0OGQFKbNnbBXLdZK0o2uCCfDg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-http-sci", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:UGte5+/bwQm3yVPz2tMMHMTUlCNlTeE0l9aWOE9YlI33xSiiRXP9RqgXwsdeefpkwvdp1B0nAZJVGUn5/x7xMA==" + "integrity" : "sha512:CowAp+6V5kkldVN3OddI2Xq9RMZg5wcKIKzeGW3z38FBwfoQ6NgHhwA9gTwstiigembbPcluR7nYVY0dXAm3ZQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-mp-client", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ChxjrcHgwYCvkDB7eJtaC/VISOYoRtIo5UHvArT+ZlMw4Gd3rXuQWkfHHZwnGft7yxfQv5TDZwqj0i0nKdzSsg==" + "integrity" : "sha512:4xz5a7dnmbdcaROXta3hbEwpIzLbexRL6PNWk5G9ndCia8Iwo+/mSYAL6lBZr+Nh2fHhW0xFU1wl/wyUcxgI4A==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-cors", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:H+PX89S64nybLZ2QKMza8PXLh1Gt+HYx0rVYHFUPuKIGX8W0GOn60BWXE4jMioQ5R2aa8xbUcSJbABpgpkNHlQ==" + "integrity" : "sha512:y0f5dgMluDvfWW9dL8hHJItiKMDGiSaGqT1EkIW6EnXa/XN0bLwBmsDF2TCXVtsDP2V9g7PetKZ/iDTQubihAQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-http-signature", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:S2GJ7SHnh1KgCt/wF0wadCVruZlB+jAtGROS3BQg3Ujnw8fsFLSoKo8bG0eFLDQYYFOXVpiVxS1w1Lh0sRHU4A==" + "integrity" : "sha512:Lcqyi96yzzvIbbZJJF24QGOak9bDPWoFRUaBsRiaPWZjeJJzIilBLVlyDkIBmGDsZR3Q36IcEjShzVhdOCC0MQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-jose-jaxrs", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1SeMxttuBh97szIQVdceHw+zYzupJURYiidUz8uhbW/kogD3q6Oj6U4HA+QEB+VggCMwakY+IEHio5zxjvJLiQ==" + "integrity" : "sha512:G8ZVoqUktHbu110VGuXQJ3vW/9UNPl6G3GLRF60bTLaP+T4AI1kyukpCSS+4mnyKZSxB44khxV87TP+gnUZmig==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-oauth2-saml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4XuBPZJiMx5ODF/0D8yc6yChSjMmvZB52XSy8wpss7Nm2SgzJjYzQwpD8oerqHipcJrIuv3zfdpu+wvJ4hUipA==" + "integrity" : "sha512:gfdlwfCAgoZ0adKs/fy85BNPTdDXkkT7wSiVFaZ1EVrHvSIutZopP54jk3AwuHQ95UvCegvpbz7HfwdpV91eyQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-oauth2", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:m0E2bqt1xEbvUahRa2yXLSUM6FbchBXG0f+in6P35Mhy4REGKKLsRfMJ4uNPkHKX3rzdrrddGNs4Q5HBAlvsuQ==" + "integrity" : "sha512:S/Om4xo10SvfIUXEzc4WrYDBYDic0UDfz814BdTqK0p1Hkn0A2Tl3Q7pLiPFANFyqOxL9FPpifr1rsddDP2bEA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-sso-oidc", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:vO3JC6RVSYiuSDQAp62Vz+vU5fixsPA+qrZRdHsarpFAT7e6SlzUovUDceDl1Du+l/hPqJSUoJfhCTPzvuemKw==" + "integrity" : "sha512:VANuHxSkz0IXSOgYgEPQWC7H/IEeV6cJdAKRsz9gGDdZPtdvIdI90uY+deK3zefHANXdKZcPU73yq/mY9q3kiw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-sso-saml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:SL8B8me02hAdVHebbVXgQd0q9hcNVxifCzGi43F0o8/CiMbndazaJ1ZJ3Sbs6TZsoeh3dvxRV4FPC/aVwCNyUA==" + "integrity" : "sha512:rgchYR8rUacAZryUbRQmHqtVje04yuc6fKODHveE+jbw9ZLR052RTgCaOn5MYPPr+CX1ntmstHVeTzAD3mtleA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-security-xml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:q6sUHsoHc2iBv1whe4WiQA9bPzYngn3XKPDb4eQdNGODa11NWaziF/iwQD1SyED1Dx7pKOFBUtwvb545/YSTDQ==" + "integrity" : "sha512:TdMy0bqqnZpkPGklvPx4GS27a7EtyZaBkAKcEvksWPYX1j2rOV+cqOPpQ59rhwOYtkdK69/5jElqrj5l88we4g==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-rs-sse", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:cZspDg+//WvPNp4wawfh0ykGOpL1LBx1p7FjFe1TFmKla9BfB8uc8Ij0Oqcl/UF+qjoggELLH/ID/3TRgy1w+A==" + "integrity" : "sha512:uLhdyEJZ0udeihmHDJA5Iak+gkej3zpXEXyIxESe5pCzcTJJ9makpyOFYPThoP8suwMploxSx1bUyMUbmqmMng==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-security-saml", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:2XC27GT+HNCazfw/84uALu+aAU3kGPNanPsRJDJJxAQY6KOgUypwKCCj6ZsmYizaBzOIUMJM1f4Xd2ulI3Gwsg==" + "integrity" : "sha512:/Qjs2YdcWlgZoPfwoj6ub+XzD//K6AGPf6GjwLD8W+ec+DapZlhJ4pEIIaVDzYXNpop0jZ/UtBCKBt9w7kSdFg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-security", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:eFDjI9L9VTwH1xVGmZ4VRzdWu9NwN1qd77RDfB4rKpYqF78TbVKBd56n29FTZCLLxx6599UxMlqlQDGQD5iLrw==" + "integrity" : "sha512:5mzRHnhlZSRaIQ2idj0UP31GQ4ofOFxk8YduBs2n3WleFnAOolXl9pRPMaeNuk3ZG8IVNY1JsdKOuRMLqHtQCQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-hc", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:G69zhbQzX6VBftfSy4fvHrM1BsRwlmCqXtiDTSsFF89yS5wg2bzTeAd8v8AhH6H5yMwupNdh/eKkI3pcu0cYtA==" - }, { - "groupId" : "org.apache.cxf", - "artifactId" : "cxf-rt-transports-http-jetty", - "version" : "3.5.11", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:DuOjpPRKjNl4iyW1+0qXDuHfVo8RGZPundRWrj+M00A7cfQBdnOqyYtDr7O6V8vBbDFGicC6ZbHbmshfl0rDtw==" + "integrity" : "sha512:0I0m3JAZNF7gNLJaGZb29+uz6AWH4EQc2U/8iR99iJk69kSSoBuzNcnisklfkYe/oBg7lG5XQys0PlBT1oBRfA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-netty-client", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:hvDR7j66HNu5NS411h1MtwhPMYdSljokCRb0B7qRsFhAHmrDlPBScnrtKmRdZYy0rAr+b1g7pAA8y55i6v9StQ==" + "integrity" : "sha512:7ILcfOIQ22jf+P+NG/CHvi8LxcjRh9aAH+War61cGENq+wZFPiMDA4/m5Y4z0BtN6mrPzqpTY+29N8MSPvB+nw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-netty-server", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:oc1o+XdNKYC8IdcLLAcjXqYyraia8qP8jxJVugMRWUoJnQRKSVsI/9k48fyeSTZ6qDckxgoBDPtaiwu2bmUeyw==" + "integrity" : "sha512:KnGtI0Z4ML3CofbugmAcIB+JUyWhCIplxtqi65jbi8pVF9U3BCBs+bFS2PDflmly0imad2PD188aHn98oOvLxw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http-undertow", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4Txz8YbZ/0QzK/NnanKt8dwfxpNW02rNyhZrTLjVoi4r0ydccz6sbSELNP1dM+IaBJdHXVa1hMaO7Bdr8g30DQ==" + "integrity" : "sha512:5oE3dgXgfZzPmtL9XbinNbgSX7CleHzjIw45WSgkHxgg2SWj/7leXbclmmVhKWNRi7ipXdLqLiKFuvVilsWG/A==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-http", - "version" : "3.5.11", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:yfTvaR5ePcMF8ptjgmmc5QI5P/BWHp/eE2HnMxnVGfdm/aHYuF10aCrU/ECmg3r38SSbzsAgtQ/dx7odTp8pkQ==" - }, { - "groupId" : "org.apache.cxf", - "artifactId" : "cxf-rt-transports-jms", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1S+ZN6MaQxgLxhCIw0PEXmCGqIzkQCAY35e9Kl8NNvc6sXyYQY4XHhp4GfTCnI++akaeKJueOvwy7aGK4qbmGA==" + "integrity" : "sha512:/Mcqk8IDdYyzJjVf1inJBV6JMxH6vxEHVghllTVWkRlR/K4f9Lxx8UecAjjJ76cdwidDXPOXUQ486JrVo5Y+pQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-local", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:pVtTNCvOT7YkEMIpTQUe4Z7ThoL2Oxjup5mmdUz1AKl/GxP5N4dFlxFNVxJEj/XN3jTr3FP41amTNxWuzIZMZw==" + "integrity" : "sha512:6uAQUIxUxUtmahUHQq54u/QMgNNCxSD/cDq9PL3MfHJW+FGF2OfDRvLGplD3nVbPdW6KtJlkPw4kMhdT2hRC9g==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-udp", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:+k/kPxlqkRl4QSXRjBK948rO3LfDr3+lgZ+/G0xb2X4SiJWP+qZzNoOGNNcspAB92nTn5FlQStQiySnMo0HTDw==" + "integrity" : "sha512:btZk4R/WpxbrTCwu1ReJzTAoqSMg272CrFQVUax2wQotSpAmlJ5MA72GHndnWdybHsnvcMPaKOeUdvppE42F6w==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-transports-websocket", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:e/ro2vgqJiENLc/+9H82m4kO+v02uKJJQ7kFzG56L0ZY3OT4avlqhhnkDExyv00ZIWsb1H5l32HaoRpuemf8ew==" + "integrity" : "sha512:WnitAYNM/CVFMa0U+6yM25a+BLLIcKL4J+4c41TGFIb6PrLjqMaHteZ/SWt8itJc1EarQYWlb90Esbacv/S6ww==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-addr", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:XufO99R+5z2XBOYyZAmlwEy/MpbmjiXNwBKMYmnTuQz2sNHAt8bv57jx6o1IgHqGXGjZA5phDbREyJUMvkJiCw==" + "integrity" : "sha512:oP4mJ8JFzOzMBAf5E0c60+e9riAbIhv0deR5VkC8GSKidP0r32LZGTposNqI0nWAZj3xqyESa1MpSFRNNQjSIQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-eventing", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:tWzS1O99YNYqCkT9So+rdSFPGqzvf03X0uOdAo0DalMOtWjpjSBK7xEJxWUu5jTtNr+i8cKoIyOWBByzpL7c1g==" + "integrity" : "sha512:3vv49rG03nOa531eTE1+Uch31gEz3O03ekR746LDjISanojnPVS2hxHNKH++4tOw2V5lhIAjOfeOKcOaC9UH4Q==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-mex", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Gv8OwodMG38D8qipdP3YDCBoGk7A5FJsJ9k3/Y6yHXe2gVvxSMX7BYZwwSX4Hjw3EqLlb1S1NdWAhSQ23vIhKw==" + "integrity" : "sha512:7efu//2eUF0hkrqJ+QzEiyyR8OCY9HQOqHl3MkRlgnisGuX7Wuxkh3x7t6U9HWzUAivuBs+KKz6ZRWBoxzPgTw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-policy", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:TrsG6oVulvqxC9e4uvRc1K6UBjNsR2gptgFnza3czNWcQN4VB06BEXDfIheJQnxaz6iUkQh9NAGDvdIMzGFdHg==" + "integrity" : "sha512:faw8x7rhOLdWjjJM/hXyx/yAQHFx7dxOF9ix645RPhV629+LPM78vygUczKVWX3lWhRKlOCflwuiN9R192NqiA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-rm", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:MQZYW3pm3VgJHrA+9Wx/YiqT4vEqDaq26L2pdrKLNbXeunAom2ofLJKbQ+XfWbPUlxPl2ipPcCxkbJgqa7P7Ng==" + "integrity" : "sha512:Txq9iRdPhkC7kzaGVFkqdJ6IhmvzYQf6Vg8FFpy9r8po6ZHdpNw6MCxNCQal+TMrc7apbIO6cXoEgQBX2muVMg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-security", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Evp4MlNrn3H9G59o53rscxlxJDXxRVd15OWkv2rYVVxUxYtOiuml58iUbca8M8seVXluaCdu4+2ByQwBsEK+7g==" + "integrity" : "sha512:QKFK2jzbwzDJYuAa8yVMR3NLpBK2PcS6UZkOUMKI0SkGN0EXYg03wicaWTxif2J/iqsnXIY+Izxav/T6GSu+nQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-ws-transfer", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:NDr03C9F+fXxiY4hWZmZflDjASwFKk01ldYn3ISuP/3T4dkR3WZUkby30KRqNFZm4b03Bs9Nb9giRBAO+8eJqw==" + "integrity" : "sha512:6a/oOnhdTBqZ6SxId1v70DsCXwYxYin7sC2f6RGMMAvsLyGqeAdI8p7vXKh46hX4kErNpe8GxE/NxmRSPBBFZw==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-rt-wsdl", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:OUuXclzUK9QcfHY0jGttXGA9D99IknX5Dt6EPLPYzlg6qzbJNWVaWvjy3n/sIj/Xj8+ilHvhbpTZAAOHvsQ17Q==" + "integrity" : "sha512:qkfh+tUeFDdNr+3u3UegAlo49BSAOMAOXBRWPraWPASnyVIYQlVb9+kF77KJYrHR5sAQsmee3WtaerBJHXwxEA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-common", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:NXuABVMem+e4H7h0D9Gf2t7EBgwwScpoLqLP9WXIO7NLWbJtJiu2mrKHuo2Pzou16T23YtoYZZykQwHPmmDnqg==" + "integrity" : "sha512:7MlrCH29saWl+KzSBIGItIZ/EvNNsJEF+Yuk+U8U8czkB2b4VdWclWNfKvMkCW93VubMPuDH4wU8Vn1fd85nbg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-corba", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ncYm6yfKPT6MhB2HCuhVEAEou8oxs+xvRp3F8FHnFT7B27+VsUCalxAd4PHUQSOAk0tvQHuhdjTYzeuNhD7Kkg==" + "integrity" : "sha512:5nlnFw8RhpZroTKymXOKScDXD3ZT4ffIaDJjpDVugKaQn3WxxdpNy3wrd1ZEWVBlqiqg9RwA05Vn657GJ4fmoA==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-java2ws", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:FdGG7Unl87fUUm0I89rFILr8ycppFPP1g372bPTynhrbFp/+Ve9Ah8J1WPVsR/qQmmHtveHKN6Og7I4xB10HWg==" + "integrity" : "sha512:4nwLf6ACzIFH1ZTqi7tWqPdqZ8cp4/rABY4BM3AkqOzylRLErpICY+FZmrLkpdAeKu5Di3S/Mu0qD1AQaRtpBQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-misctools", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:MWX2MBFnd80wtsKg4T8lyjFvCMyuHI++8Ikn1Ne9SCtTDo3fbzOvTgtEdbd2SSV31d3XCvFOFqd73BwrhsGA0g==" + "integrity" : "sha512:Xf88uNChF8irgeeVkOCZLR1S0QFdnef3UE8miklJj+TFuNwgTCUmLDMJDKTxz7EXzp/BmyM5/0lhxhDr+O+ALQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-validator", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:TweqICy+jYqXetHHfGrbaNlsJ5Z4OIpJXzI6MG2/Ztd5h6IPg2Hc7t2RgB7946HNkXUYsScQurkr8CLpmR85Ow==" + "integrity" : "sha512:11tJLquRghp1KAdkTHS9Unhr2PzItVm8R/qSWNbXC7Le18t54FMlsrcva8RfB8Hiid9oH7kmLKbJbTyK2PkYFg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wadlto-jaxrs", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:M+ok2qiIjhbfGRZL+MWgmeCUOusKE4UjzMKrF32hyYm/hCn7VQTI+UMkAL2FusAGoMjMH3IX72Z0NM1c2TG3iw==" + "integrity" : "sha512:3CxQTldB+l32AtKMvrFtRcLED+3o1Mzti6rvi1oFHn3L+FlZkORgaafyRSg0YuUI6YLQYRw6xhwhXcAu/LnKvQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-core", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:LnDCN0NMl4Jarru9pap8oiTGdktxxld9i/6UE/T4WTPyONMpRwhOhisoaY0yrw20K16J0GSuXpsaqgB8+sf7NA==" + "integrity" : "sha512:zba4MECKncWf1yfvtGnXsC9FNSZNOit7q7BlG7N6ptq1/voreyJ6PtWbzRjPe+s9or1hhTZye48b5brdfb5Iww==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-databinding-jaxb", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:1SZg9IBjFveImIG7kiY9f89tVfrEeDbJUHs9TILgVcKuKb7W2MuZIGQIESRTWmbY9yfkw2g85Vsfc67Va6l4kw==" + "integrity" : "sha512:encSEM+RBXzgL7GaR7sgpegSPymGwMrTOEp7LioiYT1EFRRnivEeZTC2KjkuIvjAS/BZRS2ulEeG2g2F28pIOg==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-frontend-javascript", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:e+WX7smNJPRjKNWCBxvBxuUZp0wZarIG875oyc4YWx5IoPpsPfeoZoTL8difX9RsD5wvNnu8wZcmMfz2BG7Rug==" + "integrity" : "sha512:eVPb5ig7DnNfgtHcGhhdoU2QddjGAatCI00FINB/f3kevQq0IXay/eUSl6hI1kP609Bzj66ryuekdX3WVmCDCQ==" }, { "groupId" : "org.apache.cxf", "artifactId" : "cxf-tools-wsdlto-frontend-jaxws", - "version" : "3.5.11", + "version" : "3.6.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:89QsXOIoticAKMtIbcB4R66fF4bwoJ8qA0P+HIx1UwAU8XRPyTvbn7FWrr6jZ7S7OHKbeb51bQDO3y4dXn20TA==" + "integrity" : "sha512:GQQjB6LdsREKelOdMjb+wr8RJCQ+EUfDTvTBuowt8Ae9x7MYTI6SL4jzkwgDWoQRPBvMieMRxLce5AMhZI5exQ==" }, { "groupId" : "org.apache.geronimo.javamail", "artifactId" : "geronimo-javamail_1.4_mail", @@ -2212,12 +2010,12 @@ "integrity" : "sha512:lMuGYHdVlrKY25PhH9uyjSpYKxYfem1mfUGUb1nosRSqgOFcKMQYbwW0P0MrGsVV2EWthwMJYJICOCw/YGHjGQ==" }, { "groupId" : "org.apache.geronimo.specs", - "artifactId" : "geronimo-jpa_2.1_spec", - "version" : "1.0-alpha-1", + "artifactId" : "geronimo-jpa_2.2_spec", + "version" : "1.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:8Y5QRBxQekjKsvjWrM+ZF4HBQD5atM8T0a5MAwIHdBFX1Q0JJx/MoN1M0Q14q2hPTLRVBZjgd2OZGpE7erztOg==" + "integrity" : "sha512:mytw5JAr9n8979XakR3YguXhs+DEoXswS+Uh5Lsw+EnNVu7ZaR86/8H0hAkaKBOavhLzveQKiHa4s4OEPp/g2w==" }, { "groupId" : "org.apache.geronimo.specs", "artifactId" : "geronimo-jta_1.1_spec", @@ -2237,11 +2035,11 @@ }, { "groupId" : "org.apache.httpcomponents.client5", "artifactId" : "httpclient5", - "version" : "5.4.3", + "version" : "5.4.4", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:5WEJ8MoXRwYxv2litZrYEOsd+3GEiI8gdFdRDI8CMrk3TNBs0Y/dJVZzPJc0KIrpx1aQh7Vp9bwuwToRDUfIxg==" + "integrity" : "sha512:co51vhEejFV8ZktO0k5qze3PcAvKD++mkVj0ELWre4EOlDcNqtlGcD78YBrfqMtLIJFt0LFXzbrN9twQXQ0WVA==" }, { "groupId" : "org.apache.httpcomponents.core5", "artifactId" : "httpcore5-h2", @@ -2293,19 +2091,19 @@ }, { "groupId" : "org.apache.httpcomponents", "artifactId" : "httpmime", - "version" : "4.5.6", + "version" : "4.5.14", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:mEHbd3m2R95GaN7Zt56MUQplMHY4T8MFnvGG6l2Cgo4UneSMAWtcuJob6r5gmBQpJlqDJL4xCEc8V693piq9ag==" + "integrity" : "sha512:iEsGICj2gng4m3TM+8NRQsquSJztpd8B0sYN+IS5YEzUBVv04VJOA1hmH6DojpPmFPtr5ZDLlAUQsHo3wLCiDA==" }, { "groupId" : "org.apache.james", "artifactId" : "apache-mime4j-core", - "version" : "0.8.6", + "version" : "0.8.10", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:SCWIHxpx/5PDzZNXgnYsjRDQlfhETFrBnFfsb4zJlqZA0k/cqtYIO/mGhbfi08XdQIhb83dIq/Vh+RHtPgIi8g==" + "integrity" : "sha512:o7GucQFDM254J6cCOFg5uCyYz6jLm9u+iXSBvHvGMuwx3fTzNTAfT/QVOhaiKlhjRULjiKtsCgsKv3OkEUFfaw==" }, { "groupId" : "org.apache.logging.log4j", "artifactId" : "log4j-1.2-api", @@ -2341,11 +2139,11 @@ }, { "groupId" : "org.apache.openjpa", "artifactId" : "openjpa", - "version" : "3.0.0", + "version" : "3.2.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:NnCD4I3wYLLvrdAJSoBfrToWy4p7+6+TOPMaZY48nsUWiuHo6tyrl8Dz7HUGNSHHEEbw4LBHRgR3dWBU5RNetg==" + "integrity" : "sha512:fxElSgQRT4+AeHo9UAqy7TgJjDrLDs1O0BtvTnfVpiqnUHnDLB7IYeDZ5oPNuoDP9/5iSNMr72C+tj7Phah8TQ==" }, { "groupId" : "org.apache.pdfbox", "artifactId" : "fontbox", @@ -2365,11 +2163,11 @@ }, { "groupId" : "org.apache.poi", "artifactId" : "poi", - "version" : "5.0.0", + "version" : "5.5.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:n/4e+RjqWe1nsh5NQLX2evx3wVDQQpyV8TkWUKgU6kdUwNz4BXHf/QXvlIDl/nSpey0sG7z9PU4r+SsIaHD/sA==" + "integrity" : "sha512:0WIVAC+l3khP7qh3K9ni0oK3NcxzYEx0JQ6F2GyfBL2EOUTiAAuubTORxOylzxPIVQwX/Bcv+aCl65A63xklSg==" }, { "groupId" : "org.apache.santuario", "artifactId" : "xmlsec", @@ -2410,14 +2208,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:dxUO13XmRL5E2fHq0ZqIDIoCy6GNrpeuxOqPFNsE7nlbzjW9LlMU8uldQMAUQdqVQyc0j5Gt3Ju40MyffAD1YQ==" - }, { - "groupId" : "org.apache.velocity", - "artifactId" : "velocity", - "version" : "1.7", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:5SF4XZR8rhoCBwsmpD0jW2MZQ5pjZMWCZtP5xFj5oJlAbBCqtfUcXbW6VB6IMiyzUgPGdYtLi7ZflTmjRdqaBA==" }, { "groupId" : "org.apache.woden", "artifactId" : "woden-core", @@ -2453,11 +2243,11 @@ }, { "groupId" : "org.apache.ws.xmlschema", "artifactId" : "xmlschema-core", - "version" : "2.3.1", + "version" : "2.3.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:4IYw5vb74rlgp8Fh3f9G4TVWa8sd0qrzcHrAGoQ/tGKsHH7rgwrKf8iMvj/63CNa2sB+wBnhZgUIYO1z0knCHw==" + "integrity" : "sha512:d7AgBjNl603xyf1mKAMdXecmEoiSGwFjAnNt7/vl8EJ6+MIt/rXj79P3ksF5C7ocOOYdyL5DzK/zBR8BDNuDJw==" }, { "groupId" : "org.apache.wss4j", "artifactId" : "wss4j-bindings", @@ -2508,12 +2298,12 @@ "integrity" : "sha512:lz8NdizrBojcKX4DZqqdY/lksn2CKY3ZXV9pi9upoCkg7V+MXBdNE+yciYpx+oaKyn0gFSNEPZ3m+He4o1rFog==" }, { "groupId" : "org.apache.xbean", - "artifactId" : "xbean-asm6-shaded", - "version" : "4.8", + "artifactId" : "xbean-asm9-shaded", + "version" : "4.20", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:BwgXlfr5mLJCX673/2xXl7ZYjl4S8qqSNTJGhxJSU30Bv2uxiq8UMG5anKxZ/hyJhDg083uB4q3jNvqXZ2mDYA==" + "integrity" : "sha512:k+b5dZYwerV9DC4Eankdza6HA11mSI+0fS3ZjIiERutDGxL0W9nMiHLfhDhG2uK4iHgGaWnpw+N5IqPw34hLwQ==" }, { "groupId" : "org.apache.xmlbeans", "artifactId" : "xmlbeans", @@ -2522,6 +2312,38 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:IbheUyQR7bv0kp4gxEkdP+DXtLsVcztYxkVckB1KBfkY5ztlIeccYqiaZXbUFs3ct5sMUggs2BMvwwxA5Qa01w==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-anim", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:2CrN1Ef6ULybscX5gqNSpwQ/DZJYKRvCV/cyPEuGVWfn+ku61Z26P+He5EH1sa2IjILA+lxTw6w4meuCBEng5A==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-awt-util", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:pTC15tUQjIQ2mR5JYndt7R/d7fhkIa65m8z8cydnzb8Ec6V156Js/zh1lYYJxeFz+XbN84IKsSGEJrDyS3rvoA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-bridge", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:flZBflV0vXFXd+Yv1IAJ4p+oomlxYcrhs54JrkCAHVvKVJF5f6fcerFfYwWTrMJqL8pUfS+SLsz8Di+PqIbSiQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-codec", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:LF1zyVkEX2Vq9HgVTlCM3HfIaAbw/jwKWw0uIxLD/DbYxjw6oXMqop8NcPAm2wHELSry3Im1+bzHVEPeguxCFQ==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-constants", @@ -2538,6 +2360,30 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:TCxQmIamkp48Fd7BjS596ZJkYrqAXyIba+jRgLw+4vDeoN60yDyhD9EA+6hjWrVKP5qxfV4n/3ehm/iFvcnqRQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-dom", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:+1fwI9CaVpiB4QhkJ2cTF/nBv2Rwe4LaZy4DwctU9g1dxnt0QESIEZ94Uw4Sxl+H7yueJLtsnXek+hEQpOo0kw==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-ext", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:kZcbQbNJydgTV5fzt36ptsj5f02SPxLtESyV+OlL8AcimexTxBTuppv9OEOcakT/K7tOIq9Q/tZvrZ6dRYLXcA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-gvt", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:+yPLIQ9AP12m8L57X3CWtgqBoi8r3ZhsA8+pHH17DcjdXN1lDu5mIE777CYtJFXAYBTXuKQvxtVMWYZba6maSw==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-i18n", @@ -2546,6 +2392,22 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:u+7I9TNrxjHzUx6hEvAY5Wn8/biZfwHyvwta97xWWCVfY6DhQElrwnHA3TKeOL+lNUJUrX7vTao2bdLu6JHv3A==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-parser", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:E1MfgQ2kBoJ1xDWERXsT9NczU7iqSdJAOHR4Zq/kz8h6JJQC7ldIOb+eTSVKkF+gG3YF7/BAFr50YQV5VazBJQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-script", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:x3lmvGS8dXIl0Ohn0/RtPIyYjDIT/Ot8FdhhMm08L1hUrlPU7TmrolskP5vQm5WI8D8DnnIaWayYVfQN7/txQQ==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-shared-resources", @@ -2554,6 +2416,30 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:igW4quCOkTqYNrDz5Vunn6CluMkYUHA4avR7DngkVVWTrVVwiPxNYMnNqo2L6SQIgusbxUhBN7iYggAulqeKPQ==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-svg-dom", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:/Z5dc6SHEiMG4ByYrd72GH4AYnybZchcLlLf5sAPOyjTFQrIkqgzype5Ie7UHrNYB2B1xTmp9lvGiH1/UP9zKA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-svggen", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:oInHWP8h0urzFzK1iKiqUg15G4tLCrsKNJXHtXUB1IlipHUntmBAAZLqf4wbmiv5zkvGA6P+pRuYD4wkzRPbGA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-transcoder", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:HyW028KVAhuY5evuyVfDEfB0jciJiCnl7A9chL22BlJqjIKEm0zN6nEbQnYLou1aKfYx63Eax10Um+OLTrX0sQ==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "batik-util", @@ -2562,6 +2448,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:XdBsiVHZ7H2zEuPUdT94HHP2heN7pP/3iinShH+JJ7hsGdYjtnCrwT/O4zwYkGZOU0x5C5feVuBswheCHPUEqA==" + }, { + "groupId" : "org.apache.xmlgraphics", + "artifactId" : "batik-xml", + "version" : "1.19", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:OtJk9lSNfO6EYkgmKGIwiy9l9rNkhmVooACGvDsdZQVKAtkSDYkH/nP/ucrY3CN0dsow/cWC2acQ/OcWQ2MxeA==" }, { "groupId" : "org.apache.xmlgraphics", "artifactId" : "xmlgraphics-commons", @@ -2611,21 +2505,13 @@ "optional" : false, "integrity" : "sha512:o+x8IvbnFuLAa56TsZkr2iPrkuoMw/Ovxb165EqSNf8iFtDACXeZow/S4t1hjn8wzCEAB9ph4d7i5yuPuw3hbw==" }, { - "groupId" : "org.brotli", - "artifactId" : "dec", - "version" : "0.1.2", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:1M0rM/fDWAEv8B22oT6/4egFGlgGmL/82ULEdFEBLPU85JpACxyL91ArAeYx1518ZBcgKhRWIlctef0UXM3mGg==" - }, { - "groupId" : "org.ccil.cowan.tagsoup", - "artifactId" : "tagsoup", - "version" : "1.2.1", + "groupId" : "org.checkerframework", + "artifactId" : "checker-qual", + "version" : "3.51.1", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:H7EdGdjGNkC0xAkHqAOEtBdpJPYOR9h7TGz2EaBiy6QiDZkMCLhTawNA/TKYXAj5aWUK/TNgpb0ojs2JEk8Zow==" + "integrity" : "sha512:YzoMOWvAGIPWxp28U9qYB4TYg31xsJuFnRVxylo7YI5s8km6wEV1pvM0mPyS2Nbu1yAOSax2irDVsNKyvy2Lhg==" }, { "groupId" : "org.codehaus.jettison", "artifactId" : "jettison", @@ -2637,11 +2523,19 @@ }, { "groupId" : "org.codehaus.woodstox", "artifactId" : "stax2-api", - "version" : "4.2.1", + "version" : "4.2.2", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:HAWH7LTFplnOKuH+Nv/BJjao7LpUminyz5HLTR02ozXAXzV3b0gEiNQNiUIwOJ92rus2OIcCbG71xWWZXBe3xg==" + }, { + "groupId" : "org.commonmark", + "artifactId" : "commonmark", + "version" : "0.23.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:AO/F1NF1QPsYDFsg1FZjCosyYt/0ZnZomukWuhbw+9mxpxx7rfslT6rWWX+U/tHtuW93wV9AF46vTYzTXOpejQ==" + "integrity" : "sha512:3Brrkmmk3Wwdn9wViWautp9msUgQjvoGhiVzB1Tp4/7xeZCBtY/ujHY7joCli52na4jx64nDaIUdi0paqKFE+Q==" }, { "groupId" : "org.cryptacular", "artifactId" : "cryptacular", @@ -2661,11 +2555,11 @@ }, { "groupId" : "org.dom4j", "artifactId" : "dom4j", - "version" : "2.1.4", + "version" : "2.2.0", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:tkehycvY6OCoVRYLhSL/+OHU35XlThFqHP5m0XCD/4uMpv5wbWrupufT4BFiEq+aX2x/reZChpoz/HqXHRFq+Q==" + "integrity" : "sha512:nmnYxTuC1i1lidVsaGFFWWOsZOocdKc7Lmd75Sl8EE6hrCbrhxrJLy7lQRazARMESBBwriGlcNOyQb4cwTOQqw==" }, { "groupId" : "org.eclipse.jdt", "artifactId" : "ecj", @@ -2674,38 +2568,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:QTEYMqWT0T6oTuvqCHuqO6sW3zgccL1MD0JcrraerBtBviryfkBzWuFsA530hh+pPDz8TCH4S60cXrHLDnrTUQ==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-continuation", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:cKuvvl0OeNUhdsWBbLKd4Fq9SsA9WVap4cVUh5FLHtUuHVGroMCQsu00PBQoWuNsW3KiMG0KFRqjrktvo8TRCQ==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-io", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:K6JuwuiTRiuJSaMM0Eaqbg+cLdoW9wEazJLLYzuX92wxSy5uutLYYeA1zudAF/YzsPfujFFlDqsNo0dv0odHYg==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-security", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:HB/s9ab0QDaKnyS2hgOocXoxXo/NDL2l0swD9aCkRQpXH/wo7qHyGitFLmwRNajlNGc7gLWFSl2BfbeAv73G0w==" - }, { - "groupId" : "org.eclipse.jetty", - "artifactId" : "jetty-util", - "version" : "9.4.57.v20241219", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:cSttnJOWjLLcFg2d8KIiQ5qujBMLZt+uQi0paM4Gsd4YLHCOhLPJpXCPtMceMVqW2uEJ2prWTgsfHCcZRCqTbA==" }, { "groupId" : "org.eclipse.microprofile.rest.client", "artifactId" : "microprofile-rest-client-api", @@ -2757,11 +2619,11 @@ }, { "groupId" : "org.ehcache", "artifactId" : "ehcache", - "version" : "3.9.3", + "version" : "3.10.8", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:DT5ZVILyDzbUtv6lPDzKdDsnnd1FoIClHd2VihHb3hi1HF3JRT7BJGs35E9LBo4DNkvF496JxIyoJ/q2Peb6SA==" + "integrity" : "sha512:3ur7pjtP8I8mchqpuFgsSG1KEq04icPerbUsqGzXEhJVD/1x9878jlhUP9ART0jMCG7DwXMJHqelwvmaORmJPg==" }, { "groupId" : "org.freemarker", "artifactId" : "freemarker", @@ -2794,54 +2656,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:LYHZ3fzFPWK5UX8hDZ6NbuTSNxOJCTkqcxS7KT6keKWtrfs5fTE6UsXyP+TQLfL4fIECHBFIzjQkmcTRrC2/Mw==" - }, { - "groupId" : "org.glassfish.hk2.external", - "artifactId" : "aopalliance-repackaged", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:LZ5TlbqIf6W7aoIJtzEpLUQPXB2y/Mr1bEGx8dn3dHM9ooqoubdp52X+YvNkDXvLLPYUDwBEqLV26eRRRAOMRg==" - }, { - "groupId" : "org.glassfish.hk2.external", - "artifactId" : "jakarta.inject", - "version" : "2.6.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:f8gZatnuA6gx3/+FyUXkFsOQYHGnqo6/ari3AI3+wK3MwfHcpT7WdorFZ2zUs8Q0cWdPl/9z4fYfWkJ6rtaOBQ==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "hk2-api", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:mr6feNf2yAW2x7UVV5Iw5fpXOrvNgYvtVgaAgNZFhgji6Z1ZN+uVnPHk9M/cT3kAWd/BIxMTzY8wqu+/UY6xxw==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "hk2-locator", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:4sh6Jl8RQEL0wEOX20rcpykf1o4I6XEpV2zrYDKHtXzPWwPQwoVyfruM1/iACSgL3qtCVEddWdoaxBule3zeyw==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "hk2-utils", - "version" : "2.6.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:jafNiN5FJwsfz9LEca4JKzlyr3im4OzHbtSsELa9ZxLSpTi9FjpFfyHOpOflxS9UcQj0Sqp5HtD9Bp9pfxKCwQ==" - }, { - "groupId" : "org.glassfish.hk2", - "artifactId" : "osgi-resource-locator", - "version" : "1.0.3", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:TYSYOpsccvWGYbV2x4ykVqIQZgLCrSEc1+ctlEZMh3QXOzSjVinFB8fITJgvHeDJv0g1JFjoSAvl+HTSDW5pow==" }, { "groupId" : "org.glassfish.jaxb", "artifactId" : "codemodel", @@ -2883,37 +2697,21 @@ "optional" : false, "integrity" : "sha512:0zlZlzBD+BthlpEUF9Vz2Zx4P9NSs0BcQlT7BsfgE6OuXXJVXy509ABB/kbZlE6cNX7aWs/HsWaunJP7vI1AeQ==" }, { - "groupId" : "org.glassfish.jersey.connectors", - "artifactId" : "jersey-apache-connector", - "version" : "2.30.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:62Y6UlayfEPKldnYi+0crfLcf3eYG7QJdV2My6jLGdXE4ktVNmRzPEZtwrDEe37ofKMtzt6goAnkvjQpAgT0UQ==" - }, { - "groupId" : "org.glassfish.jersey.core", - "artifactId" : "jersey-client", - "version" : "2.46", + "groupId" : "org.glassfish.web", + "artifactId" : "jakarta.servlet.jsp.jstl", + "version" : "1.2.6", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:nBagQSNTaOeL+DvgZAKm0G7z6AiNdXDSRWbI0EE6d45mFjzv0qDRJQEVcGUNzaE7hBOnwPRDTOD02E94SLowOw==" + "integrity" : "sha512:mUy2kuSnLux/caKREoxDwZpVe6CZcuQ2qGrJmGI8GxOuiUibli5YCHvl9vnBXActNRdEMDCCyyReKboD42Y7Xw==" }, { - "groupId" : "org.glassfish.jersey.core", - "artifactId" : "jersey-common", - "version" : "2.46", + "groupId" : "org.glassfish.web", + "artifactId" : "javax.servlet.jsp.jstl", + "version" : "1.2.5", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:9Zzm3wWBnb6zcxSKURdneMb/mKta1Ey4XX81zNLFbsoVQV7qrpQZtwUb9sQ0SqCQOuGUCW/56AHFPmJwTS4M9w==" - }, { - "groupId" : "org.glassfish.jersey.inject", - "artifactId" : "jersey-hk2", - "version" : "2.30.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:BHKy7lFCIkdgR0cb1Fy/Rap16ATTUrJjxGkJgbYTNVtzaHRhCFA6m2B422nutJK0U4wIPXK8h6sGhQflHygemQ==" + "integrity" : "sha512:cZ9OgJZT/tBmD4p5pvm/devpYwFzpkvpsoW6orSNoO0JVMOHKuYc5jQo5LfTOyrP5NqRN75NsoSpVSrq+0qI3Q==" }, { "groupId" : "org.hamcrest", "artifactId" : "hamcrest-core", @@ -2946,6 +2744,14 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:uvQRoPYBGX/YDS57pgUsqYeRiZY4O8F2k+ewX+WHFxyub3b/nBU4MESZ5SgRkoAK7kkcCeJXH+wf34mboHBesA==" + }, { + "groupId" : "org.jacorb", + "artifactId" : "jacorb-omgapi", + "version" : "3.9", + "scope" : "compile", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:qLF8Oz9xULdg+DdbpU7yyCb6Dlz5an+E1/QJSW3zFijyfLtkSagRS5tUhbuVAxnGTWvLUvfbiGK7EBiQpVwDKA==" }, { "groupId" : "org.jasypt", "artifactId" : "jasypt", @@ -3013,19 +2819,19 @@ }, { "groupId" : "org.jboss.xnio", "artifactId" : "xnio-api", - "version" : "3.8.16.Final", + "version" : "3.8.17.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:CKIvoavhZrkcgqahVO/Rw/axsrViRKdC60IfmBxmecApucCtupXMYTYmZtk2B8BE1GIrLY8RVXPqp+UmDHRPng==" + "integrity" : "sha512:jknlJTI6/kjuuRhOBv3+LgYQ8RPHx4sRO1M8wMBJd7AD4+h6AuyqF5E15PfhPkDvnLK3E1tDIFg5WVV3NTLHqA==" }, { "groupId" : "org.jboss.xnio", "artifactId" : "xnio-nio", - "version" : "3.8.16.Final", + "version" : "3.8.17.Final", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:c/1uxttkSvWRF8lyWMsosAUx1E7d22kzdQ2k5RgTq/JvsUT9WKTj78rKidtTd33Ui5TurbJfKm292oDAGk10kQ==" + "integrity" : "sha512:IRsmg94lHWDNm2wZo7YEKxdFC7NznY4Qxg/m8VHlGPznOYt2Niozbbj2KJDitQXYR0Rzl7JIhs998c3jj613UA==" }, { "groupId" : "org.jboss", "artifactId" : "jandex", @@ -3069,11 +2875,11 @@ }, { "groupId" : "org.jfree", "artifactId" : "jfreechart", - "version" : "1.5.4", + "version" : "1.5.6", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:ZpCfpiT7QTYw0PGVp/WzkPhPtIuYZs+BChY0AoT0DGa+vIIrhE3UOdMsUOQNx4rkwG2G2mKlbXcmDUUoFmOZcA==" + "integrity" : "sha512:UP+BTG33+WNTQHM+NO61sDUWysC7e01oQSzwtw0wOEKt7UZ+2w3I4as1hJXcwt7gK4n8SvupPEjrMIQW+FJSmA==" }, { "groupId" : "org.jrobin", "artifactId" : "jrobin", @@ -3122,14 +2928,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:fYNi4VyUGo/MBw9AsUwAEf6UW+hVta8qNRKS3UadOg56kk4m6+lmBQ3RMEFdBGXeGx73cUFcGvSCLQnA9SKcGw==" - }, { - "groupId" : "org.mozilla", - "artifactId" : "rhino", - "version" : "1.7.15", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:VhnE9S8YY8XXLNkRXC6cz/VcfnqPTxOV9zSGEg2UqzkAY0+ynVQ1alsPwiFFcGFdXwbhUiYN+XG7AcW8TeS7lQ==" }, { "groupId" : "org.objenesis", "artifactId" : "objenesis", @@ -3253,11 +3051,11 @@ }, { "groupId" : "org.ow2.asm", "artifactId" : "asm", - "version" : "9.7.1", + "version" : "9.9", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:R2ewFgPa1cecweK183IvcrEFnZKPGE9Ea6EbresbOBs6OpqAHMQ9JdOW35ULCdGVl8cxc8QRsdqJDegIuU8fUA==" + "integrity" : "sha512:GXpPs+yzTQWsVVxqUQ5pr/yx5HbyTF6TWtUT7Nq/dLRaobDgsl2+kSJPxtt5WbJnfqWHbuSedIcmXiopxWDCHA==" }, { "groupId" : "org.owasp.antisamy", "artifactId" : "antisamy", @@ -3298,14 +3096,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:+lPetjA0P0/rxcEpuo29HslUIpw/y5Db64t+m/ph18qenU5HpOpSNMC+nv5ZgC/yhYL1V8VZDzFMvuXgbnrgYg==" - }, { - "groupId" : "org.quartz-scheduler", - "artifactId" : "quartz", - "version" : "1.8.5", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:E5L7Ktczeq/CRP00N0GKdeXTDEqmOWB4IE/le2CUYgeOfCAjw8FBfN2XhIZg8oiV/xgo1ZMutvnYd4xTmku5bA==" }, { "groupId" : "org.reactivestreams", "artifactId" : "reactive-streams", @@ -3315,93 +3105,117 @@ "optional" : false, "integrity" : "sha512:zatr0VbzkQbNa7/UffH0sKidxKooxowx7xKkYxk8aIiX5BXwG41/DUh7Dmtb0vGQRL+GBXBLAk8m1qofT5okcQ==" }, { - "groupId" : "org.rnorth.duct-tape", - "artifactId" : "duct-tape", - "version" : "1.0.8", + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-api", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:0KBBoObrJrkvFVQDjcFpqH/PCpNUl7ULk8E9eN3omsJjObRaDWml6Nzwdt6g0Yfb6Bzfl6BF8JLQk2cX2OCMMA==" + "integrity" : "sha512:6mwd3/ZWliQLHodkxtcDQXyqP5dj9h4Ay7fprrUQBO3aE6SFwAjhgGMPl9vZra9qsjQt2Gcp2JX/YDnvSkxJiA==" }, { "groupId" : "org.seleniumhq.selenium", - "artifactId" : "selenium-api", - "version" : "3.141.59", + "artifactId" : "selenium-chrome-driver", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:lvH6jU/uakUiWxjk38EUO7cE8tv/W6SYOl6JDdbDS3TuvmIYG3xXbyolB1ka4Cl25NxHkxfXAo4DzNRZSUkuUw==" + "integrity" : "sha512:/WcmNvOBq3eQudtI2WOQqhopCasTFKQHGns/rCIxsJSqfhU4XxfmgfVaJPIQREM6KVuJ+RevoeLwq5lZydWVJQ==" }, { "groupId" : "org.seleniumhq.selenium", - "artifactId" : "selenium-chrome-driver", - "version" : "3.141.59", + "artifactId" : "selenium-chromium-driver", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:qGoyvSOXWlrzD61B88nU2TlnDQhnDK6U+3+0IgWkGBuTyB9fWPBXxD1oFg/QGE5wy2GD9bbIxHqIICwCRjPohg==" + "integrity" : "sha512:IOeh3YiFGsehPu+TZ8mSOpG+4LRIcVaUlXjt/YVFZzFadszEltfjOl6L3W0KX6PN+R9Tx44lE/wBs3zczRDDXw==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-edge-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:EGeA1j0idvi/uu9Uk4WL19I81eAJjb1k8L0Xkis+5f9fISDykCy0a6pkCG5d6aFehhSdmYX3hbmkvUVOp4x57A==" + "integrity" : "sha512:hqlvFheCh5VchDlAY7c8D4wyqV6J8n6NuWnqx8smTHVZ7dBI3YGm7kEzTp/qOILupc3EdvY/GW421DSWO1skog==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-firefox-driver", - "version" : "3.141.59", + "version" : "4.40.0", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:RSls9iO/OcGf8U5rvzctCBXOsNwIUG4GqsJ/pHkFta7TtBp/QlMofSLZ+p8S/FFi7o2q1pkrlxVxd/b3U0ECHA==" + }, { + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-http", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:n6VcfHh5+ftr54pWEfkif+NfZEodOuOThl1csZVG88B4puTTqdffZcP0gZlYTIlJNcQKaDlD2p21IFzmTxk8jg==" + "integrity" : "sha512:0uQ8da3So2H18N5+llhc0u985IcZSfLzO6aqgF+RGJ+Vzj4rP/pmLLZzd4RLMZT4HI4kxwv3DEKUAqQeX7AtlQ==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-ie-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:WNtQx99wSINxOQpq0OxITCBMcH+WGVZ87ZbTGbBrURzbPEK+qxXI8oyDaiCpLDgkPdXE9Vo2/BkXb8UTywXJaQ==" + "integrity" : "sha512:uaaG7zUyyd1TC/CF+NbQQ7Sl3zVIxiAk0MJ4wiRvLUSVFTAUVLgg9tpDP7S9vh1Fv4p+zwQJRS2aQr//MxOAFw==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-java", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:JqelxjpmOsQIXO1wx65aDNx8LWQoAblsLTK5e/36Sms2qan+r9QEXj37dm+QFZsJSNQh42CdhwNjNYteNGuocA==" + "integrity" : "sha512:sNgtVolOQnJ4EgPlzrVHkPxziOEsfukSZBD8/soGKmwTfAJNJ7ljOfTxy4J1iwZG7sxNQ2ziBJgVi4E/UUnZ3Q==" }, { "groupId" : "org.seleniumhq.selenium", - "artifactId" : "selenium-opera-driver", - "version" : "3.141.59", + "artifactId" : "selenium-json", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:BkI4W4CjcLSB6G14jLoG9m5jB3iXdU4ruU+JbDKEpBdGKCI437cLpp2EuRjj84Sm4W0py3KLBkbumDIU32fZtg==" + "integrity" : "sha512:o6cSw9oakIfJTE14PzPWEpTxOG/OfAX74GHJRe8oV6XPtHG9U3WzSWbBqauMJQuZGO6aTFSYcDlRGQdznoK6bw==" + }, { + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-manager", + "version" : "4.40.0", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:mPmqfXi8Z3AqI9mL7aqlLtH9F78wR6bZVmB5k64GEwOlsawhBhswsj6MeV1CcgA7U2fX3/g83V487rXTP7DkQg==" + }, { + "groupId" : "org.seleniumhq.selenium", + "artifactId" : "selenium-os", + "version" : "4.40.0", + "scope" : "test", + "type" : "jar", + "optional" : false, + "integrity" : "sha512:rJfyTEOZwt2k8R8t7cSOz9FdiZSc8U/8+R1yYh4fLcTCM+218VjHnNZlYyTmQi8mIm4pHgHgdagRs0SQWSZagQ==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-remote-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:RHOd/AXZOfwj4jc0To7mLrsvQoEvkzta3bXJsDWEV0RKqoKGmq1r9O0ldw9/ymPVIeSeyhcCkjYPIw0OFWBauw==" + "integrity" : "sha512:NoVKsLdz7Jaa0vwiFXFbHMmYh+U9QcEJvSFC8SR2C6VXQq/BVbcE87GH2ninf3OEHZuSWa+3W83T0HE46f9uTg==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-safari-driver", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:rOsJd0Vn7HJrDRL2moDCgT2GojxSnk8BocRcTEOIc2Zu/2fDSt+89neZiX/RlbERwjKtW4sJ0NVSkx17os75Vw==" + "integrity" : "sha512:9BVdeaRcUzQ1q7fEJQYxhlAEE1YsaWxWsgs8cLZciKGZOnplBJ5fg1qcFBPaz4pBu+IrXz0RRHDiEtjzgZ21rg==" }, { "groupId" : "org.seleniumhq.selenium", "artifactId" : "selenium-support", - "version" : "3.141.59", + "version" : "4.40.0", "scope" : "test", "type" : "jar", "optional" : false, - "integrity" : "sha512:u4HvxWYjE7MfUN1m2T+M3m/HuSk2ytGF8OkaDJ3lXBblo/lD4JSg5G+8A68G2YtBAbcHPx8dKDG/o3wak8GUFw==" + "integrity" : "sha512:tkoBJrCfbDCFIW8GKQvV/vZR+8od9HivmrOLfVU4eJDgKRsWhm5IafbcRKY7DNG5XIqQh2x8pC9d0M1vBJLxoQ==" }, { "groupId" : "org.slf4j", "artifactId" : "jcl-over-slf4j", @@ -3418,14 +3232,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:mj5522ZmpglqMCG7Lh2RjzD1idjeUda2APjr2SUVpRCuLY+HkZzC36g2XWTxAZTKyN+g+5UBYO7w6doG9squuQ==" - }, { - "groupId" : "org.slf4j", - "artifactId" : "slf4j-jdk14", - "version" : "1.7.35", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:SqZrxhSvks0pizSZMT2krdAeQEp98W+31//8He8I3r7UTU6JWhukLFTiZ3hx4pVTYasknm+HIwMDHXkJrfX1UQ==" }, { "groupId" : "org.springframework.integration", "artifactId" : "spring-integration-core", @@ -3602,14 +3408,6 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:urXSaGh82l/2WmfYVYvI1IqWhqtdqK5eswgADAFXxqnjoq2uGRQcS9o8HynmpvtcVgnhk+Y8n0W5qAP9SEvdRg==" - }, { - "groupId" : "org.testcontainers", - "artifactId" : "testcontainers", - "version" : "1.19.1", - "scope" : "test", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:vVIiRiqw+UAAb9yOyVJAVWBa8UUfYE4TwdblJkKlEuuUxEwoz3+CDgBU0vFcF9vjVZKY3oD2esGyKyxeNNXufA==" }, { "groupId" : "org.testng", "artifactId" : "testng", @@ -3653,51 +3451,43 @@ }, { "groupId" : "org.xhtmlrenderer", "artifactId" : "flying-saucer-core", - "version" : "9.4.1", + "version" : "9.13.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:k/KW8ufEa4SA3V7C5tVZ33S5SBYrOQYG0YT4sC6neCL+suddnSAW3wScD2GaXNKJVKXLHuJnlMF0xRo+296TGw==" + "integrity" : "sha512:dFN0bHVmn+0ogsUw8za4clU9Jnajd4JQ1vnjyouL0D5JJCMTqXshN/G1PjLRviXv1tDHSWoCThRZsqvIarX/Yw==" }, { "groupId" : "org.xhtmlrenderer", "artifactId" : "flying-saucer-pdf", - "version" : "9.4.1", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:eTSW5s89TbbXL+h/xBHm88Si3TgfqSiyHfvCPPvuHriueQPcMG+qhCiUbvIp+S06goSVSSFjT4LZqfETR4/9yQ==" - }, { - "groupId" : "org", - "artifactId" : "jpedal", - "version" : "lgpl", + "version" : "9.13.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:nYKlrF2wKm0zGaoP6W0snVqzxznHnNj9EbQDlJk9h0ijYcmQ5x+hYLt41EAx9vFRtV3llxNGjjZD5LxKV0GdUg==" + "integrity" : "sha512:75tf+TeVE2g/PkEMyRuOhKwFSJ8JH83dxcB8CBDz9VdUv1kd5rAmsayHQ3BEiGBRyGN9wU6HRvpxcY6GtDwIOg==" }, { - "groupId" : "patientSiteVisit", - "artifactId" : "patientSiteVisit", - "version" : "0.0-SNAPSHOT", + "groupId" : "wsdl4j", + "artifactId" : "wsdl4j", + "version" : "1.6.3", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:xpIViq24ZgebxTg1iWRchOCeDH2p82OoAnUV7GQgv/x9XWmY50Pg+lDegSAFuig2euhELQsAKVp1wxB87osjJA==" + "integrity" : "sha512:N3k2Pv5LfPI7/Gg4jzxrUQXe25GSCA8URTT8rMincBT58+s64ZJzRKJnNkwk3u3r8l4wb4DfwpOFGXNoXMWMUg==" }, { - "groupId" : "taglibs", - "artifactId" : "standard", - "version" : "1.1.2", + "groupId" : "xalan", + "artifactId" : "serializer", + "version" : "2.7.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:Wsytkm/UM33C98Ad3KdR1RXwPaFJRyI1Erbwr1MUxAuK9oY+RGBMqo8k5FwMyLALXdtEaHNmPRMbyw/4COxBLA==" + "integrity" : "sha512:iE2GWGWFikYwajaA32nz8O+g3xMTcGtU5pANNq8h4Xy2go9aa6xVHFn3+AvdHLZMP9veROITUZxK+Hlp6ecHdA==" }, { - "groupId" : "wsdl4j", - "artifactId" : "wsdl4j", - "version" : "1.6.3", + "groupId" : "xalan", + "artifactId" : "xalan", + "version" : "2.7.2", "scope" : "compile", "type" : "jar", "optional" : false, - "integrity" : "sha512:N3k2Pv5LfPI7/Gg4jzxrUQXe25GSCA8URTT8rMincBT58+s64ZJzRKJnNkwk3u3r8l4wb4DfwpOFGXNoXMWMUg==" + "integrity" : "sha512:APhZxb1l9tyR45bOkf4vbTCyNU1rQZzZ6paYTFQD5c0TQruTYrCuHyeSYS8N9zHE96yS8WqCW7fiIInCehKcbA==" }, { "groupId" : "xerces", "artifactId" : "xercesImpl", @@ -3746,21 +3536,5 @@ "type" : "jar", "optional" : false, "integrity" : "sha512:MfPKWjrFEDVNfION2VnHtUvm6MC60SLG4OazZgrOt6kYhYeT6hsQ08o2NWqudIHQcipDISgPf3QllrKptqJ89A==" - }, { - "groupId" : "zxing", - "artifactId" : "zxing-core", - "version" : "1.5", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:IMF8rdSm54okRhvVvr/OTiqqURRNZ9lHhgafJCYJSeHGMbh6u1riqv31YdA4sLgaS0JzMgxG4sSKa4D8LR5FBA==" - }, { - "groupId" : "zxing", - "artifactId" : "zxing-j2se", - "version" : "1.5", - "scope" : "compile", - "type" : "jar", - "optional" : false, - "integrity" : "sha512:M3SqXnEmTzk/IJ+nYinC8A/eRmGMZZi9+pPHcUjmE1j8bs/E9B1n8gSBM63ORqjM6nEbngrVi5yky+loR9jifA==" } ] } diff --git a/docs/migration/jasypt-to-spring-crypto.md b/docs/migration/jasypt-to-spring-crypto.md new file mode 100644 index 00000000000..bec4419e119 --- /dev/null +++ b/docs/migration/jasypt-to-spring-crypto.md @@ -0,0 +1,273 @@ +# Migration: jasypt to Spring Security Crypto + +**Date**: 2026-01-28 +**Issue**: [#2158](https://github.com/openo-beta/Open-O/issues/2158) +**Migration**: Replace jasypt 1.9.3 with Spring Security Crypto 6.3.9 + +## Overview + +OpenO EMR has migrated from the stale jasypt library (last updated 2017) to Spring Security Crypto for encryption functionality. This migration affects the Shared Outcomes Dashboard integration. + +## What Changed + +### Code Changes + +**File Modified**: `src/main/java/ca/openosp/openo/managers/DashboardManagerImpl.java` + +**Before** (jasypt): +```java +import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.util.encoders.Base64; + +Security.addProvider(new BouncyCastleProvider()); +StandardPBEStringEncryptor encrypter = new StandardPBEStringEncryptor(); +encrypter.setAlgorithm("PBEWITHSHA256AND256BITAES-CBC-BC"); +encrypter.setProviderName("BC"); +encrypter.setPassword(OscarProperties.getInstance().getProperty("shared_outcomes_dashboard_key")); +encrypted = encrypter.encrypt(json); +b64 = Base64.toBase64String(encrypted.getBytes()); +``` + +**After** (Spring Security Crypto): +```java +import org.springframework.security.crypto.encrypt.BytesEncryptor; +import org.springframework.security.crypto.encrypt.Encryptors; +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +String password = OscarProperties.getInstance().getProperty("shared_outcomes_dashboard_key"); +String salt = OscarProperties.getInstance().getProperty("shared_outcomes_dashboard_salt"); + +BytesEncryptor encryptor = Encryptors.stronger(password, salt); +byte[] encrypted = encryptor.encrypt(json.getBytes(StandardCharsets.UTF_8)); +b64 = Base64.getEncoder().encodeToString(encrypted); +``` + +### Dependency Changes + +**Removed from pom.xml**: +```xml + + org.jasypt + jasypt + 1.9.3 + +``` + +**Already Available** (no changes needed): +```xml + + org.springframework.security + spring-security-crypto + 6.3.9 + +``` + +## Configuration Changes Required + +### New Property Required: `shared_outcomes_dashboard_salt` + +**IMPORTANT**: This migration adds a **required** new property to `oscar.properties`. + +#### Generate Salt Value + +Use OpenSSL to generate a random 16-byte hex salt: + +```bash +openssl rand -hex 16 +``` + +Example output: `8f3c21ab56789def1234567890abcdef` + +#### Add to oscar.properties + +```properties +# Shared Outcomes Dashboard Encryption +# Password for encrypting dashboard URL parameters +shared_outcomes_dashboard_key= + +# Salt for encryption (REQUIRED as of version X.X.X) +# Generate with: openssl rand -hex 16 +shared_outcomes_dashboard_salt=8f3c21ab56789def1234567890abcdef +``` + +### Validation + +The code now validates that both properties are present: + +```java +if (password == null || password.isEmpty()) { + throw new IllegalArgumentException("shared_outcomes_dashboard_key property is required"); +} +if (salt == null || salt.isEmpty()) { + throw new IllegalArgumentException("shared_outcomes_dashboard_salt property is required"); +} +``` + +If either property is missing, the application will log an error, and the generated dashboard URL will contain `encodedParams=null` (for example, `https://dashboard.example.com?encodedParams=null&version=1.1`). + +## Breaking Changes + +### External Dashboard Integration + +⚠️ **CRITICAL**: If you use the Shared Outcomes Dashboard integration: + +1. **Encryption Algorithm Changed**: + - Old: `PBEWITHSHA256AND256BITAES-CBC-BC` (Bouncy Castle) + - New: AES-256-CBC with PKCS5 padding (Spring Security Crypto) + +2. **Output Format**: + - Old: Base64-encoded string from Bouncy Castle encoder + - New: Base64-encoded string from Java standard encoder + +3. **Encryption Behavior**: + - Both use random IV generation (different output each time) + - Both use 256-bit AES encryption + - Both are secure for PHI protection + +4. **External Dashboard Decryption**: + - External dashboard must be updated to decrypt using Spring Security Crypto + - Or implement compatible decryption algorithm + - Coordinate deployment with external dashboard team + +### Decryption Example (Java) + +If the external dashboard is Java-based, use this decryption code: + +```java +import org.springframework.security.crypto.encrypt.BytesEncryptor; +import org.springframework.security.crypto.encrypt.Encryptors; +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +String password = "shared-password"; // Same as shared_outcomes_dashboard_key +String salt = "8f3c21ab56789def1234567890abcdef"; // Same as shared_outcomes_dashboard_salt + +BytesEncryptor encryptor = Encryptors.stronger(password, salt); + +// Decrypt from URL parameter +String encodedParams = request.getParameter("encodedParams"); +byte[] decoded = Base64.getDecoder().decode(encodedParams); +byte[] decrypted = encryptor.decrypt(decoded); +String json = new String(decrypted, StandardCharsets.UTF_8); +``` + +## Upgrade Steps + +### For Existing Deployments + +1. **Generate salt value**: + ```bash + openssl rand -hex 16 + ``` + +2. **Update oscar.properties**: + ```properties + shared_outcomes_dashboard_salt= + ``` + +3. **Deploy updated application**: + - Stop Tomcat + - Deploy new WAR + - Start Tomcat + - Verify logs for encryption errors + +4. **Coordinate with external dashboard team** (if applicable): + - Share new encryption algorithm details + - Share password and salt values (securely) + - Coordinate deployment timeline + - Test integration in staging first + +5. **Monitor logs** for 48 hours after deployment + +### For New Deployments + +Include both properties in initial `oscar.properties` configuration: + +```properties +shared_outcomes_dashboard_url=https://dashboard.example.com +shared_outcomes_dashboard_key= +shared_outcomes_dashboard_salt= +shared_outcomes_dashboard_clinic_id= +``` + +## Testing + +### Automated Tests + +Run the new test suite: + +```bash +mvn test -Dtest=DashboardManagerEncryptionIntegrationTest +``` + +Tests verify: +- ✅ Valid URL generation with encryption +- ✅ Base64 output format +- ✅ Random IV generation (different output each time) +- ✅ Round-trip encryption/decryption +- ✅ Error handling for missing configuration + +### Manual Testing + +1. **Verify configuration**: + ```bash + grep shared_outcomes_dashboard oscar.properties + ``` + +2. **Generate shared dashboard URL**: + - Log in to OpenO EMR + - Navigate to Shared Outcomes Dashboard + - Verify URL is generated without errors + +3. **Test external dashboard** (if applicable): + - Copy generated URL + - Open in browser + - Verify dashboard loads with correct user/clinic data + +## Rollback Plan + +If the migration causes issues: + +1. **Revert code changes**: + ```bash + git revert + ``` + +2. **Redeploy previous version**: + - Stop Tomcat + - Deploy previous WAR + - Start Tomcat + +3. **Remove salt property** (optional): + ```bash + # Comment out or remove from oscar.properties + # shared_outcomes_dashboard_salt=... + ``` + +4. **Timeline**: < 30 minutes rollback + +## Benefits + +- ✅ **Modern encryption library**: Spring Security Crypto actively maintained +- ✅ **Reduced dependencies**: Removed 8-year-old jasypt library +- ✅ **Security**: Uses industry-standard AES-256-CBC encryption +- ✅ **PHI protection**: Maintains HIPAA/PIPEDA compliance +- ✅ **Integration**: Better integration with Spring ecosystem + +## Support + +For questions or issues with this migration: + +1. **Documentation**: This file (`docs/migration/jasypt-to-spring-crypto.md`) +2. **Issue Tracker**: [GitHub Issue #2158](https://github.com/openo-beta/Open-O/issues/2158) +3. **Code Reference**: `DashboardManagerImpl.java:748-766` +4. **Test Reference**: `DashboardManagerEncryptionIntegrationTest.java` + +## References + +- **Spring Security Crypto Documentation**: https://docs.spring.io/spring-security/reference/features/integrations/cryptography.html +- **jasypt (deprecated)**: https://github.com/jasypt/jasypt +- **Issue #2158**: Replace jasypt 1.9.3 with Spring Security Crypto +- **Parent Issue #2139**: Dependency Audit and Modernization diff --git a/docs/struts-actions-detailed.md b/docs/struts-actions-detailed.md index 5a235ad81d9..0ff13753170 100644 --- a/docs/struts-actions-detailed.md +++ b/docs/struts-actions-detailed.md @@ -144,11 +144,7 @@ Client and patient image management. ## Clinical Connect Module -Clinical Connect EHR integration. - -| Action Name | Class Name | Description | -|-------------|------------|-------------| -| clinicalConnectEHRViewer | ca.openosp.openo.integration.clinicalconnect.ClinicalConnectViewer2Action | Views Clinical Connect EHR data | +Clinical Connect EHR integration has been removed and this module is deprecated; no Struts actions are currently available. ## Code Search Module diff --git a/docs/test/README.md b/docs/test/README.md index c8ed039391f..4f0079536ac 100644 --- a/docs/test/README.md +++ b/docs/test/README.md @@ -7,8 +7,11 @@ This directory contains comprehensive documentation for the OpenO EMR modern tes ## Current Status - **Framework**: ✅ Production Ready -- **Tests**: 23 of 24 passing (96% pass rate) - - Unit Tests: 12/12 passing ✅ +- **Tests**: 129 unit tests passing, 12 integration tests (11 passing) + - Unit Tests: 129/129 passing ✅ + - DemographicManagerUnitTest: 117 tests (18 @Nested classes) + - TicklerManagerUnitTest: 9 tests + - TicklerDaoUnitTest: 3 tests - Integration Tests: 11/12 passing (1 fails due to lst_gender table dependency) - **Java 21 Support**: ✅ Fully compatible with ByteBuddy experimental flag @@ -43,12 +46,15 @@ src/test-modern/ ├── java/ca/openosp/openo/ │ ├── test/ │ │ ├── base/ # Base test classes -│ │ ├── unit/ # Unit test infrastructure +│ │ ├── unit/ # Unit test infrastructure (OpenOUnitTestBase) │ │ └── mocks/ # Mock implementations -│ └── [domain]/ # Domain-specific tests +│ ├── managers/ # Manager layer unit tests +│ │ ├── DemographicUnitTestBase.java # Base class with test data builders +│ │ └── DemographicManagerUnitTest.java # 117 tests in 18 @Nested classes +│ └── tickler/ # Domain-specific tests │ ├── dao/ # DAO tests (integration + unit) │ │ └── archive/ # Original single-file tests (reference only) -│ └── manager/ # Service/Manager tests +│ └── manager/ # Tickler Manager tests └── resources/ # Test configurations ``` @@ -97,8 +103,10 @@ mvn test -Dtest=TicklerDao* # Specific test pattern ### 3. BDD Naming Convention ```java -// Clear, self-documenting test names -void should_returnActiveTicklers_when_demographicNumberProvided() +// Clear, self-documenting test names with ONE underscore +void shouldReturnActiveTicklers_whenDemographicNumberProvided() // camelCase + underscore +void shouldReturnNull_whenNotFound() // Simple condition +void shouldThrowException_whenPrivilegeDenied() // Exception testing ``` ### 4. Comprehensive Tagging @@ -144,21 +152,48 @@ public class MyComponentIntegrationTest extends OpenOTestBase { ### Unit Test Example ```java -@DisplayName("My Component Unit Tests") +@ExtendWith(MockitoExtension.class) +@DisplayName("My Manager Unit Tests") @Tag("unit") -public class MyComponentUnitTest extends OpenOUnitTestBase { +@Tag("fast") +@Tag("manager") +public class MyManagerUnitTest extends OpenOUnitTestBase { - @Mock - private DependencyDao mockDao; + @Mock private SomeDao mockDao; + @Mock private AnotherDao mockAnotherDao; + + private MyManagerImpl manager; + private MockedStatic logActionMock; @BeforeEach void setUp() { - registerMock(DependencyDao.class, mockDao); + // Register mocks for SpringUtils BEFORE static class mocking + registerMock(SomeDao.class, mockDao); + registerMock(OscarLogDao.class, createAndRegisterMock(OscarLogDao.class)); + + // Mock static classes + logActionMock = mockStatic(LogAction.class); + + // Create manager and inject dependencies via reflection + manager = new MyManagerImpl(); + injectDependency(manager, "someDao", mockDao); } - @Test - void should_validateInput_when_processing() { - // Test with mocked dependencies + @AfterEach + void tearDown() { + if (logActionMock != null) logActionMock.close(); + } + + @Nested + @DisplayName("Core Operations") + class CoreOperationsTests { + @Test + @DisplayName("should return entity when valid ID provided") + void shouldReturnEntity_whenValidIdProvided() { + when(mockDao.find(1)).thenReturn(new Entity()); + Entity result = manager.getEntity(loggedInInfo, 1); + assertThat(result).isNotNull(); + } } } ``` @@ -194,6 +229,6 @@ For questions or issues: --- -*Last Updated: September 2025* -*Version: 1.0* +*Last Updated: January 2026* +*Version: 1.1* *Status: Production Ready* \ No newline at end of file diff --git a/docs/test/claude-test-context.md b/docs/test/claude-test-context.md new file mode 100644 index 00000000000..5bb15f20b9d --- /dev/null +++ b/docs/test/claude-test-context.md @@ -0,0 +1,161 @@ +# Modern Test Framework - Claude Context + +> This file is automatically injected by hooks when working on test files. +> For complete documentation, see test-writing-best-practices.md. + +=============================================================================== +CRITICAL: Before writing tests, READ the actual DAO/Manager interface! +Never invent methods - verify they exist in the codebase first. +=============================================================================== + +## BDD NAMING CONVENTION + +### Method Naming (Choose ONE style consistently) + +**Option 1: Pure camelCase (RECOMMENDED for Java)** + - Pattern: `shouldWhen()` + - Examples: + - `shouldReturnTicklerWhenValidIdProvided()` + - `shouldThrowExceptionWhenTicklerNotFound()` + - `shouldLoadSpringContext()` (no condition needed) + +**Option 2: Snake_case (common in Ruby/Python BDD, valid for Java)** + - Pattern: `should__when_()` + - Examples: + - `should_return_tickler_when_valid_id_provided()` + - `should_throw_exception_when_tickler_not_found()` + - `should_load_spring_context()` + +**AVOID**: Mixed camelCase with underscores (e.g., `shouldReturnTickler_whenValid`) +**AVOID**: Traditional test naming (e.g., `testFindById()`, `findById_validId_returnsTickler()`) + +### @DisplayName (describes behavior from user perspective) + @DisplayName("should return tickler when valid ID is provided") + @DisplayName("should throw exception when tickler not found") + @DisplayName("should load Spring context successfully") + +=============================================================================== + +## REQUIRED STRUCTURE + +```java +@Tag("integration") // Test type: integration, unit +@Tag("dao") // Layer: dao, manager, service, controller +@Tag("read") // CRUD: create, read, update, delete +@DisplayName("Component Tests") +public class ComponentTest extends OpenOTestBase { // MUST be public! + + @PersistenceContext(unitName = "testPersistenceUnit") + private EntityManager entityManager; + + @Test + @DisplayName("should perform action when condition is met") + void shouldPerformActionWhenConditionMet() { // Pure camelCase + // Given - set up test data + Entity entity = createTestEntity(); + + // When - perform the action + Result result = componentUnderTest.doSomething(entity); + + // Then - verify outcome with AssertJ + assertThat(result).isNotNull(); + assertThat(result.getValue()).isEqualTo(expected); + } +} +``` + +=============================================================================== + +## TAG HIERARCHY + +Level 1 (Test Type): @Tag("integration"), @Tag("unit"), @Tag("slow"), @Tag("fast") +Level 2 (Layer): @Tag("dao"), @Tag("manager"), @Tag("service"), @Tag("controller") +Level 3 (CRUD): @Tag("create"), @Tag("read"), @Tag("update"), @Tag("delete") +Level 4 (Extended): @Tag("query"), @Tag("search"), @Tag("filter"), @Tag("aggregate") + +=============================================================================== + +## TEST DATA MANAGEMENT + +```java +protected Entity createTestEntity() { + Entity entity = new Entity(); + entity.setField("deterministic value"); // NOT new Date() or random + return entity; +} + +protected Entity createAndPersist() { + Entity entity = createTestEntity(); + entityManager.persist(entity); + entityManager.flush(); + return entity; +} +``` + +=============================================================================== + +## ASSERTIONS (Use AssertJ) + +```java +// Good - fluent AssertJ +assertThat(result).isNotNull(); +assertThat(result.getStatus()).isEqualTo("ACTIVE"); +assertThat(resultList) + .hasSize(3) + .extracting(Entity::getStatus) + .containsOnly("ACTIVE"); + +// Avoid - JUnit basic assertions +assertNotNull(result); // Less readable +assertEquals("ACTIVE", result.getStatus()); // Argument order confusion +``` + +=============================================================================== + +## COMMON PITFALLS + +- Non-public test class -> Maven Surefire won't discover it +- Testing invented methods -> Read actual interface first! +- Random/time-dependent data -> Use deterministic values +- Testing implementation -> Test behavior, not internal methods +- Too many things in one test -> One behavior per test + +=============================================================================== + +## CHECKLIST BEFORE COMMITTING + +[ ] Method name follows BDD pattern (pure camelCase or snake_case, consistently) +[ ] @DisplayName describes behavior from user perspective +[ ] Appropriate @Tag annotations (min: type + layer) +[ ] Extends OpenOTestBase (or appropriate base) +[ ] Given-When-Then structure with comments +[ ] Uses AssertJ assertions +[ ] Deterministic test data (no random/time values) +[ ] Test passes consistently +[ ] Test fails when expected behavior is broken + +=============================================================================== + +## UNIT TESTING WITH MOCKS (SpringUtils Anti-Pattern) + +```java +public class ManagerUnitTest extends OpenOUnitTestBase { // Note: OpenOUnitTestBase for unit tests + @Mock private SomeDao mockDao; + private MockedStatic logActionMock; + + @BeforeEach + void setUp() { + registerMock(SomeDao.class, mockDao); // 1. Register dependency mocks first + logActionMock = mockStatic(LogAction.class); // 2. Then create static mocks + } + + @AfterEach + void tearDown() { + if (logActionMock != null) logActionMock.close(); + } +} +``` + +=============================================================================== + +Full documentation: docs/test/test-writing-best-practices.md diff --git a/docs/test/legacy-test-reference.md b/docs/test/legacy-test-reference.md index b5cab9d4ca3..4b11295030e 100644 --- a/docs/test/legacy-test-reference.md +++ b/docs/test/legacy-test-reference.md @@ -244,6 +244,6 @@ For legacy test issues: --- -*Last Updated: September 2025* +*Last Updated: January 2026* *Version: 1.0* *Status: Active* \ No newline at end of file diff --git a/docs/test/modern-test-framework-complete.md b/docs/test/modern-test-framework-complete.md index 9dcf73aa980..70ede4444ff 100644 --- a/docs/test/modern-test-framework-complete.md +++ b/docs/test/modern-test-framework-complete.md @@ -4,7 +4,7 @@ A comprehensive modern test framework has been successfully implemented for OpenO EMR using JUnit 5 (Jupiter). The framework runs alongside existing JUnit 4 tests with zero impact on legacy code, allowing gradual migration while immediately enabling modern testing practices for new development. -**Key Achievement**: Successfully implemented 23 comprehensive tests (12 unit + 11 integration), achieving 96% pass rate (23/24 tests passing). +**Key Achievement**: Successfully implemented 141 comprehensive tests (129 unit + 12 integration), achieving 99% pass rate (140/141 tests passing). ## Table of Contents 1. [Architecture Overview](#architecture-overview) @@ -50,15 +50,21 @@ workspace/ │ │ │ │ ├── OpenOTestBase.java │ │ │ │ ├── OpenODaoTestBase.java │ │ │ │ └── OpenOWebTestBase.java +│ │ │ ├── unit/ # Unit test base classes +│ │ │ │ └── OpenOUnitTestBase.java │ │ │ ├── examples/ # Example tests │ │ │ ├── mocks/ # Mock implementations │ │ │ │ └── MockSecurityInfoManager.java -│ │ │ └── simple/ # Framework validation tests -│ │ └── tickler/ # Domain-specific tests +│ │ │ └── simple/ # Framework validation tests +│ │ ├── managers/ # Manager layer unit tests +│ │ │ ├── DemographicUnitTestBase.java # Base with test data builders +│ │ │ └── DemographicManagerUnitTest.java # 117 tests, 18 @Nested classes +│ │ └── tickler/ # Domain-specific tests │ │ ├── dao/ │ │ │ └── Multiple test files (11 integration + 3 unit tests) -│ │ └── manager/ -│ │ └── SimpleTicklerManagerTest.java +│ │ ├── manager/ +│ │ │ └── TicklerManagerUnitTest.java +│ │ └── TicklerUnitTestBase.java │ └── resources/ │ ├── META-INF/ │ │ └── persistence.xml # JPA configuration @@ -168,7 +174,7 @@ public abstract class OpenOTestBase { ```xml - + @@ -329,7 +335,7 @@ make install --run-tests ### Successfully Demonstrated Features -Based on the 23 implemented tests: +Based on the 141 implemented tests (129 unit + 12 integration): #### ✅ Database Operations - CRUD operations (Create, Read, Update, Delete) @@ -363,17 +369,19 @@ Based on the 23 implemented tests: From actual test execution: - **Setup Time**: ~2 seconds for Spring context - **Test Execution**: < 300ms per test average -- **Total Time**: < 4 seconds for all tests +- **Total Time**: < 30 seconds for all 141 tests - **Memory Usage**: < 512MB heap -- **Success Rate**: 96% (23/24 passing) +- **Success Rate**: 99% (140/141 passing) ## Current Implementation Status - ✅ Modern framework operational with JUnit 5 - ✅ Both test suites (modern JUnit 5 and legacy JUnit 4) run independently - ✅ No impact on existing tests -- ✅ 23 of 24 tests passing (96% pass rate) +- ✅ 140 of 141 tests passing (99% pass rate) - ✅ Full Java 21 compatibility with ByteBuddy experimental flag +- ✅ Manager unit test patterns proven with 117-test DemographicManagerUnitTest +- ✅ Domain-specific base classes demonstrated (DemographicUnitTestBase, TicklerUnitTestBase) ## Required Configurations for OpenO @@ -561,6 +569,6 @@ New tests should be written in `src/test-modern/` using JUnit 5 and the establis --- -*Last Updated: September 2025* -*Version: 1.0* +*Last Updated: January 2026* +*Version: 1.1* *Status: Production Ready* \ No newline at end of file diff --git a/docs/test/modern-test-framework-guide.md b/docs/test/modern-test-framework-guide.md index 24ad5d72477..ee430bd76cc 100644 --- a/docs/test/modern-test-framework-guide.md +++ b/docs/test/modern-test-framework-guide.md @@ -8,6 +8,12 @@ OpenO EMR uses a dual test framework approach with JUnit 5 (modern) tests runnin ## Current Test Results +### Unit Tests +- **129 of 129 passing** - All unit tests pass + - `DemographicManagerUnitTest` - 117 tests ✅ (18 @Nested classes covering 66 methods) + - `TicklerManagerUnitTest` - 9 tests ✅ (5 validation + 4 business operations) + - `TicklerDaoUnitTest` - 3 tests ✅ + ### Integration Tests - **11 of 12 passing** - TicklerDao integration tests - Tests are split across multiple files by operation type: @@ -16,11 +22,6 @@ OpenO EMR uses a dual test framework approach with JUnit 5 (modern) tests runnin - `TicklerDaoAggregateIntegrationTest` - 3 tests ✅ - `TicklerDaoWriteIntegrationTest` - 1 test ❌ (lst_gender table dependency) -### Unit Tests -- **12 of 12 passing** - All unit tests pass - - `TicklerDaoUnitTest` - 3 tests ✅ - - `TicklerManagerUnitTest` - 9 tests ✅ (5 validation + 4 business operations) - ## Quick Start ### Running Tests diff --git a/docs/test/modern-test-implementation-summary.md b/docs/test/modern-test-implementation-summary.md index 8e3d6c891fa..f372f943af5 100644 --- a/docs/test/modern-test-implementation-summary.md +++ b/docs/test/modern-test-implementation-summary.md @@ -27,15 +27,16 @@ A parallel modern test framework using JUnit 5 (Jupiter) has been successfully a - Mixed Hibernate XML and JPA entity support ### 4. Implemented Tests -- **23 tests total**: 11 integration tests passing, 12 unit tests passing +- **141 tests total**: 129 unit tests passing, 12 integration tests (11 passing) - **Integration tests** split across multiple files by operation type: - TicklerDaoFindIntegrationTest (5 tests) - TicklerDaoQueryIntegrationTest (3 tests) - TicklerDaoAggregateIntegrationTest (3 tests) - TicklerDaoWriteIntegrationTest (1 test - fails due to lst_gender table) - **Unit tests**: - - TicklerDaoUnitTest (3 tests) + - DemographicManagerUnitTest (117 tests in 18 @Nested classes) - TicklerManagerUnitTest (9 tests) + - TicklerDaoUnitTest (3 tests) ## How It Works @@ -78,14 +79,15 @@ mvn test ## Validation ✅ Modern tests compile successfully -✅ 23 of 24 tests passing (96% pass rate) -✅ All 12 unit tests pass +✅ 140 of 141 tests passing (99% pass rate) +✅ All 129 unit tests pass (including 117 DemographicManager tests) ✅ 11 of 12 integration tests pass (lst_gender table issue) ✅ Spring context loads properly ✅ Database persistence works (Tickler entity saved) ✅ Original tests remain unaffected ✅ Both test suites can run sequentially ✅ ByteBuddy Java 21 compatibility resolved with -Dnet.bytebuddy.experimental=true +✅ Manager unit tests demonstrate complex mocking patterns (17 dependencies) ## How to Use diff --git a/docs/test/test-writing-best-practices.md b/docs/test/test-writing-best-practices.md index df22a6794f1..dfb31a33a76 100644 --- a/docs/test/test-writing-best-practices.md +++ b/docs/test/test-writing-best-practices.md @@ -6,19 +6,21 @@ All test methods follow BDD (Behavior-Driven Development) naming for self-documenting tests: ```java -// Pattern 1: should__when_ +// Pattern 1: should_when (PREFERRED - camelCase with ONE underscore) @Test -void should_returnActiveTicklers_when_demographicNumberProvided() { } +void shouldReturnActiveTicklers_whenDemographicNumberProvided() { } // Pattern 2: __ @Test void findById_validId_returnsTickler() { } -// Pattern 3: should (simple cases) +// Pattern 3: should (simple cases without conditions) @Test void shouldLoadSpringContext() { } ``` +**IMPORTANT**: Use camelCase with exactly ONE underscore separating action from condition. Do NOT use multiple underscores like `should_return_tickler_when_valid()`. + ### @DisplayName Best Practices ```java @@ -282,6 +284,164 @@ void should_returnCompleteTickler_when_foundById() { } ``` +## Manager Unit Testing Patterns + +### Overview + +Manager (service layer) unit tests verify business logic without database access. They use mocked DAOs and require special handling for: +- Multiple dependencies (often 10-20 mocks) +- Static class mocking (LogAction, DemographicContactCreator) +- Reflection-based dependency injection +- Security manager mocking + +### Complete Manager Unit Test Structure + +```java +@ExtendWith(MockitoExtension.class) +@MockitoSettings(strictness = Strictness.LENIENT) +@DisplayName("MyManager Unit Tests") +@Tag("unit") +@Tag("fast") +@Tag("manager") +public class MyManagerUnitTest extends MyDomainUnitTestBase { + + // Mock all dependencies + @Mock private SomeDao mockSomeDao; + @Mock private AnotherDao mockAnotherDao; + // ... more mocks as needed + + private MyManagerImpl manager; + private MockedStatic logActionMock; + private MockedStatic helperMock; + + @BeforeEach + void setUp() { + // 1. Register SpringUtils mocks FIRST (before static mocking) + registerMock(SomeDao.class, mockSomeDao); + registerMock(OscarLogDao.class, createAndRegisterMock(OscarLogDao.class)); + + // 2. Mock static classes SECOND + logActionMock = mockStatic(LogAction.class); + helperMock = mockStatic(SomeStaticHelper.class); + + // 3. Configure default security behavior + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), any())) + .thenReturn(true); + + // 4. Create manager and inject dependencies via reflection + manager = new MyManagerImpl(); + injectDependency(manager, "someDao", mockSomeDao); + injectDependency(manager, "securityInfoManager", mockSecurityInfoManager); + } + + @AfterEach + void tearDown() { + // CRITICAL: Close all static mocks to prevent test pollution + if (helperMock != null) helperMock.close(); + if (logActionMock != null) logActionMock.close(); + } + + /** + * Tests for security and privilege checking. + */ + @Nested + @DisplayName("Security Tests") + @Tag("security") + class SecurityTests { + @Test + @DisplayName("should throw exception when privilege denied") + void shouldThrowException_whenPrivilegeDenied() { + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), any())) + .thenReturn(false); + + assertThatThrownBy(() -> manager.doSomething(loggedInInfo, 1)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + } +} +``` + +### Reflection-Based Dependency Injection + +When managers don't have setters for dependencies, use reflection: + +```java +protected void injectDependency(Object target, String fieldName, Object dependency) { + try { + java.lang.reflect.Field field = target.getClass().getDeclaredField(fieldName); + field.setAccessible(true); + field.set(target, dependency); + } catch (Exception e) { + throw new RuntimeException("Failed to inject " + fieldName, e); + } +} +``` + +### Domain-Specific Base Classes + +Create a base class for each domain with test data builders: + +```java +@Tag("unit") +@Tag("fast") +@Tag("demographic") +public abstract class DemographicUnitTestBase extends OpenOUnitTestBase { + + protected SecurityInfoManager mockSecurityInfoManager; + protected LoggedInInfo mockLoggedInInfo; + protected Facility mockFacility; + + protected static final Integer TEST_DEMO_NO = 12345; + protected static final String TEST_PROVIDER = "999990"; + + @BeforeEach + void setUpDemographicMocks() { + mockSecurityInfoManager = Mockito.mock(SecurityInfoManager.class); + mockLoggedInInfo = Mockito.mock(LoggedInInfo.class); + mockFacility = Mockito.mock(Facility.class); + + Mockito.lenient().when(mockLoggedInInfo.getCurrentFacility()).thenReturn(mockFacility); + Mockito.lenient().when(mockFacility.isIntegratorEnabled()).thenReturn(false); + + registerMock(SecurityInfoManager.class, mockSecurityInfoManager); + } + + protected Demographic createTestDemographic() { + Demographic demographic = new Demographic(); + demographic.setDemographicNo(TEST_DEMO_NO); + demographic.setFirstName("John"); + demographic.setLastName("Doe"); + // ... set other fields + return demographic; + } +} +``` + +### @Nested Class Documentation + +All @Nested test classes should have comprehensive JavaDoc: + +```java +/** + * Tests for demographic search functionality. + * + *

These tests cover various search operations including:

+ *
    + *
  • Search by name (partial matching)
  • + *
  • Search by health card number (HIN)
  • + *
  • Search by multiple attributes
  • + *
+ */ +@Nested +@DisplayName("Search Operations") +@Tag("search") +class SearchOperationsTests { + // tests... +} +``` + ## Unit Testing with SpringUtils ### Handling the SpringUtils Anti-Pattern diff --git a/docs/test/test-writing-guide.md b/docs/test/test-writing-guide.md index 6d2e73de633..1ba7f905103 100644 --- a/docs/test/test-writing-guide.md +++ b/docs/test/test-writing-guide.md @@ -182,9 +182,11 @@ void shouldPerformExpectedBehavior_whenConditionIsMet() { // camelCase with ONE --- -## Test Base Class +## Test Base Classes -All modern tests should extend `OpenOTestBase`: +### Integration Tests - OpenOTestBase + +All modern integration tests should extend `OpenOTestBase`: ```java @ExtendWith(SpringExtension.class) @@ -214,6 +216,65 @@ public abstract class OpenOTestBase { 3. **EntityManager**: Provides properly configured EntityManager 4. **Transaction support**: Tests are transactional and roll back automatically +### Unit Tests - OpenOUnitTestBase + +For unit tests (no database, all mocks), extend `OpenOUnitTestBase`: + +```java +@Tag("unit") +@Tag("fast") +public abstract class OpenOUnitTestBase { + + protected MockedStatic springUtilsMock; + protected Map, Object> mockedBeans = new HashMap<>(); + + @BeforeEach + void setUpSpringUtilsMocking() { + springUtilsMock = mockStatic(SpringUtils.class); + springUtilsMock.when(() -> SpringUtils.getBean(any(Class.class))) + .thenAnswer(invocation -> mockedBeans.get(invocation.getArgument(0))); + } + + @AfterEach + void tearDownSpringUtilsMocking() { + if (springUtilsMock != null) springUtilsMock.close(); + mockedBeans.clear(); + } + + protected void registerMock(Class clazz, T mock) { + mockedBeans.put(clazz, mock); + } +} +``` + +### Domain-Specific Base Classes + +For complex domains (like Demographic), create a domain-specific base class: + +```java +@Tag("unit") +@Tag("fast") +@Tag("demographic") +public abstract class DemographicUnitTestBase extends OpenOUnitTestBase { + + protected SecurityInfoManager mockSecurityInfoManager; + protected LoggedInInfo mockLoggedInInfo; + + protected static final Integer TEST_DEMO_NO = 12345; + + @BeforeEach + void setUpDemographicMocks() { + mockSecurityInfoManager = Mockito.mock(SecurityInfoManager.class); + mockLoggedInInfo = Mockito.mock(LoggedInInfo.class); + registerMock(SecurityInfoManager.class, mockSecurityInfoManager); + } + + // Test data builders + protected Demographic createTestDemographic() { /* ... */ } + protected DemographicExt createTestDemographicExt(Integer demoNo, String key, String value) { /* ... */ } +} +``` + --- ## Test Tagging System @@ -268,6 +329,45 @@ class TicklerDaoFindIntegrationTest extends OpenOTestBase { --- +## Static Class Mocking for Manager Tests + +Manager tests often need to mock static classes like `LogAction` or `DemographicContactCreator`. + +### Critical Order of Operations + +**ALWAYS register SpringUtils mocks BEFORE creating static mocks:** + +```java +@BeforeEach +void setUp() { + // 1. FIRST: Register mocks for SpringUtils (static initializers may need these) + registerMock(OscarLogDao.class, createAndRegisterMock(OscarLogDao.class)); + registerMock(ProfessionalSpecialistDao.class, createAndRegisterMock(ProfessionalSpecialistDao.class)); + + // 2. SECOND: Mock static classes (their static initializers run now) + logActionMock = mockStatic(LogAction.class); + demographicContactCreatorMock = mockStatic(DemographicContactCreator.class); + + // 3. Configure static mock behavior + demographicContactCreatorMock.when(() -> + DemographicContactCreator.addContactDetailsToDemographicContact(anyList())) + .thenAnswer(invocation -> invocation.getArgument(0)); +} + +@AfterEach +void tearDown() { + // CRITICAL: Close static mocks in reverse order + if (demographicContactCreatorMock != null) demographicContactCreatorMock.close(); + if (logActionMock != null) logActionMock.close(); +} +``` + +### Why Order Matters + +When `mockStatic(LogAction.class)` is called, Java loads and initializes the `LogAction` class. If `LogAction`'s static initializer calls `SpringUtils.getBean(OscarLogDao.class)`, that mock must already be registered, or you'll get a `NoClassDefFoundError` or `NullPointerException`. + +--- + ## Common Issues and Solutions ### "Table not found" Errors @@ -301,6 +401,9 @@ class TicklerDaoFindIntegrationTest extends OpenOTestBase { ## File Locations - **Modern tests**: `src/test-modern/java/ca/openosp/openo/` +- **Unit test base**: `src/test-modern/java/ca/openosp/openo/test/unit/OpenOUnitTestBase.java` +- **Manager tests**: `src/test-modern/java/ca/openosp/openo/managers/` +- **Domain bases**: `src/test-modern/java/ca/openosp/openo/managers/DemographicUnitTestBase.java` - **Test resources**: `src/test-modern/resources/` - **Test context**: `src/test-modern/resources/applicationContext-test.xml` - **H2 schema**: `src/test-modern/resources/schema.sql` diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/_remote.repositories b/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/_remote.repositories deleted file mode 100644 index 68c3c70a7b0..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/_remote.repositories +++ /dev/null @@ -1,3 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Fri Jul 21 10:23:09 EDT 2017 -hapi-deployable-pom-2.5.pom>central= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom b/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom deleted file mode 100644 index 5feca654e2d..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom +++ /dev/null @@ -1,164 +0,0 @@ - - 4.0.0 - - - ca.uhn.hapi.fhir - hapi-fhir - 2.5 - ../pom.xml - - - hapi-deployable-pom - pom - - HAPI FHIR - Deployable Artifact Parent POM - - - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - check-java-api - test - true - - check - - - - org.codehaus.mojo.signature - java16 - 1.1 - - - - - - - - org.ow2.asm - asm-all - 5.0.4 - - - - - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - default - - javadoc - - - - http://jamesagnew.github.io/hapi-fhir/apidocs/ - https://docs.oracle.com/javaee/7/api/ - - -Xdoclint:none - - - - - - - - - - DIST - - - - org.apache.maven.plugins - maven-javadoc-plugin - true - - 128m - 1g - true - false - false - -Xdoclint:none - - - - package - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - - - package - - jar-no-fork - - - - - - org.codehaus.mojo - license-maven-plugin - - - first - - update-file-header - - process-sources - - apache_v2 - true - true - - src/main/java - - - - - - - - - - - diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom.lastUpdated b/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom.lastUpdated deleted file mode 100644 index 26226c266f9..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom.lastUpdated +++ /dev/null @@ -1,11 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Fri Jul 21 10:23:09 EDT 2017 -http\://oscarmcmaster.sourceforge.net/m2/.error= -http\://hl7api.sourceforge.net/m2/.lastUpdated=1500646988810 -http\://te.marc-hi.ca/mvn/.error= -file\:///home/marc/workspaces/born/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1500646989032 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1500646988910 -http\://te.marc-hi.ca/mvn/.lastUpdated=1500646988942 -file\:///home/marc/workspaces/born/oscar/local_repo/.lastUpdated=1500646988727 -http\://hl7api.sourceforge.net/m2/.error= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom.sha1 b/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom.sha1 deleted file mode 100644 index 4ec32449540..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-deployable-pom/2.5/hapi-deployable-pom-2.5.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -7b3dc4af9a1eccae763bbd670f20ed174e0f24b4 \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/_remote.repositories b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/_remote.repositories deleted file mode 100644 index 6f063dddcd3..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/_remote.repositories +++ /dev/null @@ -1,5 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Jul 24 14:38:53 EDT 2017 -hapi-fhir-base-2.5.pom>central= -hapi-fhir-base-2.5.jar>central= -hapi-fhir-base-2.5-sources.jar>central= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar deleted file mode 100644 index 0c1704251d6..00000000000 Binary files a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar and /dev/null differ diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar.lastUpdated b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar.lastUpdated deleted file mode 100644 index 279ea2a6abc..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar.lastUpdated +++ /dev/null @@ -1,11 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Jul 24 14:38:53 EDT 2017 -http\://oscarmcmaster.sourceforge.net/m2/.error= -http\://hl7api.sourceforge.net/m2/.lastUpdated=1500921532841 -http\://te.marc-hi.ca/mvn/.error= -file\:///home/marc/workspaces/stable/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1500921533668 -file\:///home/marc/workspaces/stable/oscar/local_repo/.lastUpdated=1500921532659 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1500921532973 -http\://te.marc-hi.ca/mvn/.lastUpdated=1500921533095 -http\://hl7api.sourceforge.net/m2/.error= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar.sha1 b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar.sha1 deleted file mode 100644 index 5e99e4d215f..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5-sources.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -54eb7aa925e3514692678fc06ccc1b6233ae04e2 \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar deleted file mode 100644 index d59cfaa5e52..00000000000 Binary files a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar and /dev/null differ diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar.lastUpdated b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar.lastUpdated deleted file mode 100644 index 9a339416de0..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar.lastUpdated +++ /dev/null @@ -1,11 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Fri Jul 21 10:23:13 EDT 2017 -http\://oscarmcmaster.sourceforge.net/m2/.error= -http\://hl7api.sourceforge.net/m2/.lastUpdated=1500646991378 -http\://te.marc-hi.ca/mvn/.error= -file\:///home/marc/workspaces/born/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1500646993268 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1500646991474 -http\://te.marc-hi.ca/mvn/.lastUpdated=1500646991532 -file\:///home/marc/workspaces/born/oscar/local_repo/.lastUpdated=1500646991279 -http\://hl7api.sourceforge.net/m2/.error= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar.sha1 b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar.sha1 deleted file mode 100644 index ea75db16ca3..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -db21c5862679e4645ce40d459811b0dc8ea6c55b \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom deleted file mode 100644 index 9e4cd95c70b..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom +++ /dev/null @@ -1,261 +0,0 @@ - - 4.0.0 - - - ca.uhn.hapi.fhir - hapi-deployable-pom - 2.5 - ../hapi-deployable-pom/pom.xml - - - hapi-fhir-base - jar - - http://jamesagnew.github.io/hapi-fhir/ - - HAPI FHIR - Core Library - - - - - - com.google.code.gson - gson - - - - - org.codehaus.woodstox - woodstox-core-asl - - - - - org.thymeleaf - thymeleaf - true - - - org.javassist - javassist - true - - - - - com.phloc - phloc-schematron - true - - - - - com.phloc - phloc-commons - true - - - - - - - org.apache.commons - commons-lang3 - - - commons-codec - commons-codec - - - commons-io - commons-io - - - - - org.slf4j - slf4j-api - - - org.slf4j - jcl-over-slf4j - - - ch.qos.logback - logback-classic - true - - - - - org.apache.httpcomponents - httpclient - - - commons-logging - commons-logging - - - - - org.apache.httpcomponents - httpcore - - - - org.springframework - spring-beans - true - - - commons-logging - commons-logging - - - - - org.springframework - spring-web - true - - - commons-logging - commons-logging - - - - - org.springframework - spring-test - test - - - - - javax.servlet - javax.servlet-api - provided - - - - - - - - org.jacoco - jacoco-maven-plugin - - - ${basedir}/target/classes - - - ${basedir}/src/main/java - - true - - - - default-prepare-agent - - prepare-agent - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${argLine} -Dfile.encoding=UTF-8 -Xmx712m - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - - - src/main/resources - true - - - - - - - MINI - - - SITE - - - - - - org.apache.maven.plugins - maven-jxr-plugin - ${maven_jxr_plugin_version} - - - normal - - jxr - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - - checkstyle - - - - - false - ${project.basedir}/../src/checkstyle/checkstyle.xml - - - - - - - - - - - diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom.lastUpdated b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom.lastUpdated deleted file mode 100644 index e5c4004f039..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom.lastUpdated +++ /dev/null @@ -1,11 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Fri Jul 21 10:23:08 EDT 2017 -http\://oscarmcmaster.sourceforge.net/m2/.error= -http\://hl7api.sourceforge.net/m2/.lastUpdated=1500646987963 -http\://te.marc-hi.ca/mvn/.error= -file\:///home/marc/workspaces/born/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1500646988724 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1500646988068 -http\://te.marc-hi.ca/mvn/.lastUpdated=1500646988182 -file\:///home/marc/workspaces/born/oscar/local_repo/.lastUpdated=1500646987602 -http\://hl7api.sourceforge.net/m2/.error= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom.sha1 b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom.sha1 deleted file mode 100644 index a5dd9a9dcf9..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/hapi-fhir-base-2.5.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -017c390f3a6b95329a8117e54a898f47a96bba73 \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/m2e-lastUpdated.properties b/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/m2e-lastUpdated.properties deleted file mode 100644 index f32df9ceb14..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir-base/2.5/m2e-lastUpdated.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Jul 24 14:38:53 EDT 2017 -central|https\://repo.maven.apache.org/maven2|sources=1500921533717 -oscar_repo|http\://oscarmcmaster.sourceforge.net/m2|sources=1500921533717 -marc-te-main|http\://te.marc-hi.ca/mvn|sources=1500921533717 -hapi-sf|http\://hl7api.sourceforge.net/m2|sources=1500921533717 -local_repo|file\:///home/marc/workspaces/stable/oscar/local_repo|sources=1500921533717 diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/_remote.repositories b/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/_remote.repositories deleted file mode 100644 index 7984124ae7c..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/_remote.repositories +++ /dev/null @@ -1,3 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Fri Jul 21 10:23:09 EDT 2017 -hapi-fhir-2.5.pom>central= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom b/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom deleted file mode 100644 index 73fc3cbdf30..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom +++ /dev/null @@ -1,1790 +0,0 @@ - - - - - org.sonatype.oss - oss-parent - 9 - - - 4.0.0 - ca.uhn.hapi.fhir - hapi-fhir - pom - 2.5 - HAPI-FHIR - https://hapifhir.io - - - University Health Network - http://www.uhn.ca - - - 2014 - - - GitHub - https://github.com/jamesagnew/hapi-fhir/issues/ - - - - - git.server - scm:git:git@github.com:jamesagnew/hapi-fhir.git - - - - - scm:git:git@github.com:jamesagnew/hapi-fhir.git - scm:git:git@github.com:jamesagnew/hapi-fhir.git - scm:git:git@github.com:jamesagnew/hapi-fhir.git - - - - - - false - - bintray-dnault-maven - bintray - http://dl.bintray.com/dnault/maven - - - jitpack.io - https://jitpack.io - - - - - - - - - - - junit - junit - test - - - hamcrest-core - org.hamcrest - - - - - org.hamcrest - java-hamcrest - test - - - org.mockito - mockito-all - test - - - - - 3.2 - - - - - jamesagnew - James Agnew - University Health Network - - - dmuylwyk - Diederik Muylwyk - Smile CDR - - - Dmitri Sotnikov - University Health Network - - - Lisa Wong - University Health Network - - - Josh Mandel - Boston Children's Hospital - - - lmds - Laura MacDougall Sookraj - University Health Network - - - Neal Acharya - University Health Network - - - David Hay - Orion Health - - - sweetnavelorange - James Butler - Orion Health - - - suranga - Suranga Nath Kasthurirathne - OpenMRS / Regenstrief Center for Biomedical Informatics - - - dougmartin - Doug Martin - Regenstrief Center for Biomedical Informatics - - - akley - Alexander Kley - - - preston - Preston Lee - Arizona State University - - - jjathman - Joe Athman - - - petromykhailysyn - Petro Mykhailyshyn - - - tahurac - Tahura Chaudhry - University Health Network - - - b.debeaubien - Bill de Beaubien - Systems Made Simple - - - twilson650 - Tom Wilson - - - esteban-aliverti - Esteban Aliverti - - - mochaholic - Mohammad Jafari - Edmond Scientific Company - - - joel-costigliola - Joel Costigliola - JCOS-Technologies - - - pukkaone - Chin Huang - - - SingingTree - Bryce Van Dyk - - - botunge - Thomas Andersen - - - samlanfranchi - Sam Lanfranchi - - - jkiddo - Jens Kristian Villadsen - - - cmikeb1 - C. Mike Bylund - - - nrpeterson - Nick Peterson - - - petervanhoute - Peter Van Houte - - - SRiviere - Sébastien Rivière - - - karlmdavis - Karl M. Davis - - - matt-blanchette - Matt Blanchette - - - petromykhailysyn - Petro Mykhaylyshyn - - - adam-carbone - Adam Carbone - - - joelsch - Joel Schneider - - - euvitudo - Phillip Warner - - - subhrajyotim - Subhro - - - mion00 - Carlo Mion - - - kiwiandroiddev - Matt Clarke - Orion Health - - - FilipDomazet - Filip Domazet - - - bdenton - Bill Denton - Akana, Inc - - - hnnesv - Hannes Venter - Jembi Health Systems - - - vadi2 - Vadim Peretokin - - - lawley - Michael Lawley - CSIRO - - - CarthageKing - CarthageKing - - - gijsbert802 - Gijsbert van den Brink - - - rqg0717 - James Ren - - - Robbert1 - Robbert van Waveren - - - daliboz - Jenny Syed - Cerner - - - sekaijin - sekaijin - - - hugosoares - Hugo Soares - - - SRiviere - Sebastien Riviere - - - jodue - jodue - - - joelsch - Joel Schneider - - - elnin0815 - - - dangerousben - Ben Spencer - - - maclema - maclema - - - ohr - Christian Ohr - - - - - - Apache Software License 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - - yyyy-MM-dd'T'HH:mm:ss'Z' - - UTF-8 - - - ${user.home}/sites/hapi-fhir - ${user.home}/sites/scm/hapi-fhir - - - 10.13.1.1 - 2.25.1 - 9.4.5.v20170502 - 5.2.9.Final - 5.4.1.Final - - 5.7.0.Final - 5.5.4 - 2.5.3 - 1.8 - 2.4 - 2.7.1 - 4.4.6 - 4.3.7.RELEASE - 3.0.2.RELEASE - 1.6 - - - 1.6.0 - - UTF-8 - 1.0.1 - - - - - - aopalliance - aopalliance - 1.0 - - - ch.qos.logback - logback-classic - 1.2.2 - - - com.github.bkiers - Liqp - 0.6.4 - - - com.github.dnault - xml-patch - 0.3.0 - - - com.google.errorprone - error_prone_core - 2.0.9 - - - com.google.guava - guava - 21.0 - - - com.phloc - phloc-schematron - ${phloc_schematron_version} - - - com.phloc - phloc-commons - ${phloc_commons_version} - - - commons-cli - commons-cli - 1.3.1 - - - commons-codec - commons-codec - 1.10 - - - commons-io - commons-io - 2.5 - - - directory-naming - naming-java - 0.8 - test - - - commons-logging - commons-logging - - - - - javax.ejb - ejb-api - 3.0 - - - javax.el - javax.el-api - 3.0.0 - - - javax.interceptor - javax.interceptor-api - 1.2 - - - javax.json - javax.json-api - 1.0 - - - com.google.code.gson - gson - 2.8.0 - - - javax.mail - javax.mail-api - 1.5.6 - - - javax.servlet - javax.servlet-api - 3.1.0 - - - javax.transaction - javax.transaction-api - 1.2 - - - javax.validation - validation-api - 1.1.0.Final - - - javax.ws.rs - javax.ws.rs-api - 2.0.1 - - - junit - junit - 4.12 - - - lt.velykis.maven.skins - reflow-velocity-tools - 1.1.1 - - - net.riotopsys - json_patch - 0.0.0 - - - net.sf.json-lib - json-lib - 2.4 - jdk15 - - - commons-logging - commons-logging - - - - - net.sf.json-lib - json-lib - 2.4 - jdk15-sources - - - net.sf.saxon - Saxon-HE - 9.5.1-5 - - - org.apache.commons - commons-dbcp2 - 2.1.1 - - - org.apache.commons - commons-lang3 - 3.5 - - - org.apache.derby - derby - ${derby_version} - - - org.apache.derby - derbynet - ${derby_version} - - - org.apache.derby - derbyclient - ${derby_version} - - - org.apache.httpcomponents - httpclient - 4.5.2 - - - org.apache.httpcomponents - httpclient-android - 4.3.5.1 - - - org.apache.httpcomponents - httpcore - 4.4.5 - - - org.apache.lucene - lucene-highlighter - ${lucene_version} - - - org.apache.lucene - lucene-analyzers-phonetic - ${lucene_version} - - - org.apache.maven.doxia - doxia-module-markdown - 1.6 - - - org.apache.maven.scm - maven-scm-api - 1.9.5 - - - org.apache.maven.scm - maven-scm-manager-plexus - 1.9.5 - - - org.apache.maven.scm - maven-scm-provider-gitexe - 1.9.5 - - - org.apache.maven.wagon - wagon-scm - 2.10 - - - org.apache.maven - maven-project - 2.2.1 - - - org.apache.maven - maven-plugin-api - 3.2.5 - - - org.apache.maven.plugin-tools - maven-plugin-annotations - 3.2 - - - org.apache.velocity - velocity - 1.7 - - - org.apache.velocity - velocity-tools - 2.0 - - - org.codehaus.plexus - plexus-compiler-javac - 2.8.1 - - - org.codehaus.plexus - plexus-compiler-javac-errorprone - 2.8.1 - - - org.codehaus.plexus - plexus-utils - 3.0.22 - - - org.codehaus.woodstox - woodstox-core-asl - 4.4.1 - - - org.ebaysf.web - cors-filter - ${ebay_cors_filter_version} - - - org.eclipse.jetty - jetty-http - ${jetty_version} - - - org.eclipse.jetty - jetty-servlets - ${jetty_version} - - - org.eclipse.jetty - jetty-servlet - ${jetty_version} - - - org.eclipse.jetty - jetty-server - ${jetty_version} - - - org.eclipse.jetty - jetty-util - ${jetty_version} - - - org.eclipse.jetty - jetty-webapp - ${jetty_version} - - - org.eclipse.jetty.websocket - websocket-api - ${jetty_version} - - - org.eclipse.jetty.websocket - websocket-client - ${jetty_version} - - - org.eclipse.jetty.websocket - websocket-server - ${jetty_version} - - - org.fusesource.jansi - jansi - 1.15 - - - org.glassfish - javax.el - 3.0.0 - - - org.glassfish - javax.json - 1.0.4 - - - org.glassfish.jersey.core - jersey-server - ${jersey_version} - - - org.glassfish.jersey.containers - jersey-container-servlet-core - ${jersey_version} - - - org.glassfish.jersey.containers - jersey-container-jetty-http - ${jersey_version} - - - org.glassfish.jersey.media - jersey-media-moxy - ${jersey_version} - - - org.jscience - jscience - 4.3.1 - - - org.hamcrest - java-hamcrest - 2.0.0.0 - - - org.hibernate - hibernate-core - ${hibernate_version} - - - org.hibernate - hibernate-ehcache - ${hibernate_version} - - - org.hibernate - hibernate-entitymanager - ${hibernate_version} - - - org.hibernate - hibernate-validator - ${hibernate_validator_version} - - - org.hibernate - hibernate-search-orm - ${hibernate_search_version} - - - org.javassist - javassist - 3.20.0-GA - - - org.mockito - mockito-all - 1.10.19 - - - org.slf4j - slf4j-android - 1.7.25 - - - org.slf4j - slf4j-api - 1.7.25 - - - org.slf4j - jcl-over-slf4j - 1.7.25 - - - org.springframework - spring-beans - ${spring_version} - - - org.springframework - spring-context - ${spring_version} - - - org.springframework - spring-context-support - ${spring_version} - - - org.springframework - spring-core - ${spring_version} - - - org.springframework.data - spring-data-jpa - 1.10.4.RELEASE - - - org.springframework - spring-messaging - ${spring_version} - - - org.springframework - spring-orm - ${spring_version} - - - org.springframework - spring-test - ${spring_version} - - - org.springframework - spring-tx - ${spring_version} - - - org.springframework - spring-web - ${spring_version} - - - org.springframework - spring-webmvc - ${spring_version} - - - org.springframework - spring-websocket - ${spring_version} - - - org.thymeleaf - thymeleaf - ${thymeleaf-version} - - - org.thymeleaf - thymeleaf-spring4 - ${thymeleaf-version} - - - xmlunit - xmlunit - 1.6 - - - - - - - - - de.juplo - hibernate-maven-plugin - 2.0.0 - - false - false - false - false - true - true - - - - org.apache.felix - maven-bundle-plugin - 3.0.1 - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.6 - 1.6 - - 1.8 - 1.8 - true - UTF-8 - - - - com.google.errorprone - error_prone_core - 2.0.19 - - - org.codehaus.plexus - plexus-compiler-javac - 2.8.1 - - - org.codehaus.plexus - plexus-compiler-javac-errorprone - 2.8.1 - - - org.codehaus.plexus - plexus-utils - 3.0.24 - - - - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - - org.apache.maven.plugins - maven-jxr-plugin - 2.5 - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.19.1 - - - org.apache.maven.plugins - maven-plugin-plugin - 3.5 - - - org.apache.maven.plugins - maven-shade-plugin - 2.4.3 - - - org.apache.maven.plugins - maven-source-plugin - 3.0.0 - - - org.codehaus.plexus - plexus-utils - 3.0.24 - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.19.1 - - true - random - -Dfile.encoding=UTF-8 -Xmx1024m - 1.0C - - - - org.apache.maven.plugins - maven-war-plugin - 3.0.0 - - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - org.codehaus.mojo - animal-sniffer-maven-plugin - 1.15 - - - org.codehaus.mojo - cobertura-maven-plugin - 2.7 - - true - - - - org.codehaus.mojo - license-maven-plugin - 1.12 - - true - false - - - - org.codehaus.mojo - versions-maven-plugin - 2.2 - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty_version} - - - org.eluder.coveralls - coveralls-maven-plugin - 4.3.0 - - - - - - - org.jacoco - jacoco-maven-plugin - 0.7.9 - - - org.apache.maven.plugins - maven-site-plugin - - 3.4 - - false - true - UTF-8 - UTF-8 - false - - - - org.apache.maven.wagon - wagon-scm - - - org.apache.maven.scm - maven-scm-manager-plexus - - - org.apache.maven.scm - maven-scm-provider-gitexe - - - org.apache.maven.scm - maven-scm-api - - - - org.apache.maven.doxia - doxia-module-markdown - - - lt.velykis.maven.skins - reflow-velocity-tools - - - org.apache.velocity - velocity - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - ca.uhn.hapi.fhir - - - hapi-tinder-plugin - - - [0.8-SNAPSHOT,) - - - - generate-jparest-server - - - - - - - - - - - org.apache.maven.plugins - - - maven-antrun-plugin - - - [1.7,) - - - run - - - - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17 - - - com.puppycrawl.tools - checkstyle - 6.17 - - - - ${project.basedir}/src/checkstyle/checkstyle.xml - - - - org.apache.maven.plugins - maven-install-plugin - 2.5.2 - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-java - - enforce - - - - - [1.8,) - - The hapi-fhir Maven build requires JDK version 1.8 or higher. - - - - - - - - - org.codehaus.mojo - license-maven-plugin - false - - - update-project-license - package - - update-project-license - - - apache_v2 - - - - - - maven-antrun-plugin - false - - - copySubProjects - site - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fixing Checkstyle Report - - - "../../ - "./ - - - - http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css - ./css/bootstrap-responsive.min.css - - - - http://netdna.bootstrapcd - https://netdna.bootstrapcd - - - - http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css - https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css - - - - http://ajax.googleapis - https://ajax.googleapis - - - - \t - - - - - - Welcome]]> - - - ]]> - - - - - - - addSyntaxHighlighter - site - - run - - - - Adding Fontawesome - - - Download]]> - Download]]> - - - - GitHub Project]]> - GitHub Project]]> - - - - Test Servers <]]> -  Test Servers <]]> - - - - Documentation <]]> -  Documentation <]]> - - - - Get Help <]]> -  Get Help <]]> - - Changing Breadcrumbs - - - /]]> - / -
  • Documentation
  • -
  • /
  • ]]>
    -
    - Adding Syntax Highlighter - - - ]]> - - var elements = document.getElementsByClassName("source"); - for (var i=0; i < elements.length; i++) { - var pres = elements[i].getElementsByTagName("pre"); - for (var j = 0; j < pres.length; j++) { - var pre = pres[j]; - if (pre.innerHTML.match(/^\s*\<\;/)) { - pre.className = 'brush: xml'; - } else if (pre.innerHTML.match(/\/\*/)) { - pre.className = 'brush: java'; - } else if (pre.innerHTML.match(/^\/\//)) { - pre.className = 'brush: java'; - } else if (pre.innerHTML.match(/^\{/)) { - pre.className = 'brush: jscript'; - } else if (pre.innerHTML.match(/^\#/)) { - pre.className = 'brush: bash'; - } else if (pre.innerHTML.match(/\<\;\//)) { - pre.className = 'brush: xml'; - } else { - pre.className = 'brush: java'; - } - } - } - - SyntaxHighlighter.all(); - - - ]]> - -
    -
    -
    - - addAnalytics - site - - - Adding Google analytics in target/site for <body> - - - - - ]]> - - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - ga('create', 'UA-1395874-5', 'auto'); - ga('require', 'displayfeatures'); - ga('require', 'linkid', 'linkid.js'); - ga('send', 'pageview'); - - - - ]]> - - Adding Google analytics in target/site for <BODY> - - - ]]> - - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - ga('create', 'UA-1395874-5', 'auto'); - ga('require', 'displayfeatures'); - ga('require', 'linkid', 'linkid.js'); - ga('send', 'pageview'); - - - - ]]> - - - - - run - - -
    -
    - - maven-site-plugin - false - - - stage-for-scm-publish - post-site - - stage - - - ${siteMainDirectory} - - - - - - org.apache.maven.wagon - wagon-scm - 2.12 - - - org.apache.maven.scm - maven-scm-manager-plexus - 1.9.5 - - - org.apache.maven.scm - maven-scm-provider-gitexe - 1.9.5 - - - org.apache.maven.scm - maven-scm-api - 1.9.5 - - - - org.apache.maven.doxia - doxia-module-markdown - 1.6 - - - lt.velykis.maven.skins - reflow-velocity-tools - 1.1.1 - - - org.apache.velocity - velocity - 1.7 - - - - - org.apache.maven.plugins - maven-scm-publish-plugin - 1.1 - false - - ${scmPubCheckoutDirectory} - \${siteMainDirectory} - true - gh-pages - scm:git:git@github.com:jamesagnew/hapi-fhir.git - - - - scm-publish - site-deploy - - publish-scm - - - - - -
    -
    - - - - - - - org.apache.maven.plugins - maven-changes-plugin - 2.12.1 - false - - - - changes-report - - - - - atom_1.0 - - https://github.com/jamesagnew/hapi-fhir/issues/%ISSUE% - - false - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.19.1 - - - - failsafe-report-only - - - - - - ${project.basedir}/hapi-fhir-base/target/surefire-reports/ - ${project.basedir}/hapi-fhir-structures-dstu/target/surefire-reports/ - ${project.basedir}/hapi-fhir-structures-dstu2/target/surefire-reports/ - ${project.basedir}/hapi-fhir-jpaserver-base/target/surefire-reports/ - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.8.1 - false - - - - project-team - issue-tracking - license - scm - - - - - - - - - - - DIST - - hapi-fhir-osgi-core - - - - ROOT - - - - - - - - - - - - - - SIGN_ARTIFACTS - - - gpg.passphrase - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - - SITE - - hapi-fhir-base - hapi-fhir-structures-dstu - hapi-fhir-structures-dstu2 - hapi-fhir-structures-dstu3 - hapi-fhir-jpaserver-base - hapi-fhir-jaxrsserver-base - - examples - - - - - org.codehaus.mojo - findbugs-maven-plugin - 3.0.3 - - ./hapi-fhir-base/target/classes - - - - - findbugs - - - - - - - - - ALLMODULES - - true - - - hapi-deployable-pom - hapi-fhir-base - hapi-fhir-base-test-mindeps-client - hapi-fhir-base-test-mindeps-server - hapi-tinder-plugin - hapi-tinder-test - - hapi-fhir-validation-resources-dstu2 - hapi-fhir-validation-resources-dstu2.1 - hapi-fhir-validation-resources-dstu3 - hapi-fhir-structures-dstu - hapi-fhir-structures-dstu2 - hapi-fhir-structures-hl7org-dstu2 - hapi-fhir-structures-dstu2.1 - hapi-fhir-structures-dstu3 - hapi-fhir-jaxrsserver-base - hapi-fhir-jaxrsserver-example - hapi-fhir-jpaserver-base - hapi-fhir-jpaserver-example - restful-server-example - restful-server-example-test - hapi-fhir-testpage-overlay - hapi-fhir-jpaserver-uhnfhirtest - hapi-fhir-client-okhttp - hapi-fhir-android - hapi-fhir-converter - hapi-fhir-cli - hapi-fhir-dist - examples - example-projects/hapi-fhir-base-example-embedded-ws - example-projects/hapi-fhir-standalone-overlay-example - hapi-fhir-jacoco - - - - NOPARALLEL - - - - org.apache.maven.plugins - maven-surefire-plugin - - 1 - - - - - - - ERRORPRONE - - - - org.apache.maven.plugins - maven-compiler-plugin - - javac-with-errorprone - - - - - - - - - -
    diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom.lastUpdated b/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom.lastUpdated deleted file mode 100644 index 9e012f0b3ab..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom.lastUpdated +++ /dev/null @@ -1,11 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Fri Jul 21 10:23:09 EDT 2017 -http\://oscarmcmaster.sourceforge.net/m2/.error= -http\://hl7api.sourceforge.net/m2/.lastUpdated=1500646989118 -http\://te.marc-hi.ca/mvn/.error= -file\:///home/marc/workspaces/born/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1500646989378 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1500646989208 -http\://te.marc-hi.ca/mvn/.lastUpdated=1500646989240 -file\:///home/marc/workspaces/born/oscar/local_repo/.lastUpdated=1500646989035 -http\://hl7api.sourceforge.net/m2/.error= diff --git a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom.sha1 b/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom.sha1 deleted file mode 100644 index c237dc7d2b8..00000000000 --- a/local_repo/ca/uhn/hapi/fhir/hapi-fhir/2.5/hapi-fhir-2.5.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -0565db5e033b8540bf76c3e7cfdc1ccb55381e90 \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/_remote.repositories b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/_remote.repositories deleted file mode 100644 index 5f3ebbb03f3..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:48 EDT 2017 -hapi-examples-1.0.1.jar>hapi-sf= -hapi-examples-1.0.1.pom>hapi-sf= diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar deleted file mode 100644 index 63fd420a754..00000000000 Binary files a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar and /dev/null differ diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar.lastUpdated b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar.lastUpdated deleted file mode 100644 index 23271f00d88..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar.lastUpdated +++ /dev/null @@ -1,5 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:48 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629548414 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490629546982 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar.sha1 b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar.sha1 deleted file mode 100644 index b2d7c3cf274..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d9f1ec926f177a556dadc9942fa20010eb995f2a \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom deleted file mode 100644 index 5388ac589d7..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom +++ /dev/null @@ -1,127 +0,0 @@ - - - - hapi - ca.uhn.hapi - 1.0.1 - ../pom.xml - - - 4.0.0 - - ca.uhn.hapi - hapi-examples - HAPI - 05 - Examples - - jar - - - - ca.uhn.hapi - hapi-base - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v21 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v22 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v23 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v231 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v24 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v25 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v251 - ${hapi.version} - - - ca.uhn.hapi - hapi-structures-v26 - ${hapi.version} - - - javax.mail - mail - 1.4.1 - - - - - - - maven-antrun-plugin - - - site - - - - - - - - run - - - - - - ca.uhn.hapi - hapi-sourcegen - ${hapi.version} - - - generate-sources - - confgen - - - ${basedir}/target/generated-sources/confgen - ${basedir}/src/main/resources/example_ack.xml - com.foo - - - - - - - - src/main/resources - true - - - - - diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom.lastUpdated b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom.lastUpdated deleted file mode 100644 index 49b45bdd8ed..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom.lastUpdated +++ /dev/null @@ -1,5 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:40 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629540626 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490629540364 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= diff --git a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom.sha1 b/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom.sha1 deleted file mode 100644 index 71803ee66ba..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-examples/1.0.1/hapi-examples-1.0.1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -524e9fe70435b28a813a2bd22d61fe1a076e303c \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/_remote.repositories b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/_remote.repositories deleted file mode 100644 index 895470ba2a2..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:48 EDT 2017 -hapi-structures-v251-1.0.1.jar>hapi-sf= -hapi-structures-v251-1.0.1.pom>hapi-sf= diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar deleted file mode 100644 index 447b98dcf29..00000000000 Binary files a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar and /dev/null differ diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar.lastUpdated b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar.lastUpdated deleted file mode 100644 index 91052e56cb0..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar.lastUpdated +++ /dev/null @@ -1,5 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:48 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629548416 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490629546983 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar.sha1 b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar.sha1 deleted file mode 100644 index 8749549aa91..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -da84eb0b7c9d5ee219c53d2a160511a6e517229a \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom deleted file mode 100644 index 55aa139e66b..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom +++ /dev/null @@ -1,138 +0,0 @@ - - - - hapi - ca.uhn.hapi - 1.0.1 - ../pom.xml - - - 4.0.0 - - ca.uhn.hapi - hapi-structures-v251 - HAPI - 04 - Generated Structures v2.5.1 - - jar - - - - ca.uhn.hapi - hapi-base - ${hapi.version} - - - - - false - 2.5.1 - v251 - ${sourcegen.jdbcUrl.new} - - - - - - ca.uhn.hapi - hapi-sourcegen - - - ${gen.version} - generate-sources - - sourcegen - - true - - 2.5.1 - ${sourcegen.jdbcUrl} - ${sourcegen.jdbcUser.old} - ${sourcegen.jdbcPassword.old} - ${basedir}/target/generated-sources/sourcegen - ${basedir}/target/generated-sources/resourcegen - - - - - - maven-antrun-plugin - - - site - true - - - - - - - - - - - - run - - - - - - maven-assembly-plugin - - - make-assembly - package - - single - - true - - - ../src/assembly/structures-source.xml - - - - - - - org.codehaus.mojo - retrotranslator-maven-plugin - 1.0-alpha-4 - - - - translate-project - - - true - - - - - - - - ${basedir}/target/generated-sources/resourcegen - false - - - - - - - - maven-javadoc-plugin - 2.5 - true - - 128m - 1g - true - - - - - - - diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom.lastUpdated b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom.lastUpdated deleted file mode 100644 index 54c119c4654..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom.lastUpdated +++ /dev/null @@ -1,5 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:41 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629541030 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490629540921 -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom.sha1 b/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom.sha1 deleted file mode 100644 index bd12f348c7e..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/1.0.1/hapi-structures-v251-1.0.1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -9b73533bd50d39802f79b0cb7be68c9e03803689 \ No newline at end of file diff --git a/local_repo/ca/uhn/hapi/hapi-structures-v251/maven-metadata-local.xml b/local_repo/ca/uhn/hapi/hapi-structures-v251/maven-metadata-local.xml deleted file mode 100644 index a1199f037bf..00000000000 --- a/local_repo/ca/uhn/hapi/hapi-structures-v251/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - ca.uhn.hapi - hapi-structures-v251 - - 1.0.1 - - 1.0.1 - - 20250124143354 - - diff --git a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar b/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar deleted file mode 100644 index d22843a2af8..00000000000 Binary files a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar and /dev/null differ diff --git a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar.md5 b/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar.md5 deleted file mode 100644 index d87ad642707..00000000000 --- a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -35a8671bad47a16934d81bcc2a5a501b \ No newline at end of file diff --git a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar.sha1 b/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar.sha1 deleted file mode 100644 index 74daddb7ce0..00000000000 --- a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -09c9dc104be5d0374ac6f76c876ba82c74a7b8b2 \ No newline at end of file diff --git a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom b/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom deleted file mode 100644 index 82b53f9916f..00000000000 --- a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - com.cbi.ws - cbi_ws_client - 1.1 - POM was created from install:install-file - diff --git a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom.md5 b/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom.md5 deleted file mode 100644 index f95846d1847..00000000000 --- a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -247d393eb84bb680fde7bc19a0a0c890 \ No newline at end of file diff --git a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom.sha1 b/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom.sha1 deleted file mode 100644 index c0988eb9cc1..00000000000 --- a/local_repo/com/cbi/ws/cbi_ws_client/1.1/cbi_ws_client-1.1.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -20832710e58c9700521dbca3edf3b19416c4c4c4 \ No newline at end of file diff --git a/local_repo/com/cbi/ws/cbi_ws_client/maven-metadata-local_repo.xml b/local_repo/com/cbi/ws/cbi_ws_client/maven-metadata-local_repo.xml deleted file mode 100644 index 5df10a6ba21..00000000000 --- a/local_repo/com/cbi/ws/cbi_ws_client/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - com.cbi.ws - cbi_ws_client - 1.1 - - - 1.1 - - 20131207151749 - - diff --git a/local_repo/com/medseek/PatientService/20161213/PatientService-20161213.jar b/local_repo/com/medseek/PatientService/20161213/PatientService-20161213.jar deleted file mode 100644 index d8e5f2e33d0..00000000000 Binary files a/local_repo/com/medseek/PatientService/20161213/PatientService-20161213.jar and /dev/null differ diff --git a/local_repo/com/medseek/PatientService/20161213/PatientService-20161213.pom b/local_repo/com/medseek/PatientService/20161213/PatientService-20161213.pom deleted file mode 100644 index 6ff0c46275f..00000000000 --- a/local_repo/com/medseek/PatientService/20161213/PatientService-20161213.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - com.medseek - PatientService - 20161213 - Patient Service for Single Sign on to clinical connect - diff --git a/local_repo/com/medseek/PatientService/20161213/_maven.repositories b/local_repo/com/medseek/PatientService/20161213/_maven.repositories deleted file mode 100644 index 7d4e9a87f9a..00000000000 --- a/local_repo/com/medseek/PatientService/20161213/_maven.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an internal implementation file, its format can be changed without prior notice. -#Tue Dec 13 11:02:19 EST 2016 -PatientService-20161213.pom>= -PatientService-20161213.jar>= diff --git a/local_repo/com/medseek/PatientService/maven-metadata-local.xml b/local_repo/com/medseek/PatientService/maven-metadata-local.xml deleted file mode 100644 index cd554fffc9d..00000000000 --- a/local_repo/com/medseek/PatientService/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - com.medseek - PatientService - - 20161213 - - 20161213 - - 20161213160219 - - diff --git a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/SSOClinicalConnect-20171101.jar b/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/SSOClinicalConnect-20171101.jar deleted file mode 100644 index 6724e846008..00000000000 Binary files a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/SSOClinicalConnect-20171101.jar and /dev/null differ diff --git a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/SSOClinicalConnect-20171101.pom b/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/SSOClinicalConnect-20171101.pom deleted file mode 100644 index dfa623571ff..00000000000 --- a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/SSOClinicalConnect-20171101.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - com.medseek.clinical.service - SSOClinicalConnect - 20171101 - POM was created from install:install-file - diff --git a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/_maven.repositories b/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/_maven.repositories deleted file mode 100644 index 7a159585073..00000000000 --- a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/20171101/_maven.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an internal implementation file, its format can be changed without prior notice. -#Fri Nov 03 11:11:07 EDT 2017 -SSOClinicalConnect-20171101.jar>= -SSOClinicalConnect-20171101.pom>= diff --git a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/maven-metadata-local.xml b/local_repo/com/medseek/clinical/service/SSOClinicalConnect/maven-metadata-local.xml deleted file mode 100644 index 418274740e4..00000000000 --- a/local_repo/com/medseek/clinical/service/SSOClinicalConnect/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - com.medseek.clinical.service - SSOClinicalConnect - - 20171101 - - 20171101 - - 20171103151107 - - diff --git a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar b/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar deleted file mode 100644 index b1b48c7a4c5..00000000000 Binary files a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar and /dev/null differ diff --git a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar.md5 b/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar.md5 deleted file mode 100644 index 026ed194f3d..00000000000 --- a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -ad4237b99e2f61238af54c75f032505a \ No newline at end of file diff --git a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar.sha1 b/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar.sha1 deleted file mode 100644 index 5e4fa86892f..00000000000 --- a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8e9dc492b6f3d726a115970b1e57bda5a99a98bd \ No newline at end of file diff --git a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom b/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom deleted file mode 100644 index 73dc3ed2076..00000000000 --- a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - hsfo - hsfo - 2007-02-12 - POM was created from install:install-file - diff --git a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom.md5 b/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom.md5 deleted file mode 100644 index a4844134aeb..00000000000 --- a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -54da36f4a049fd39041b99ced6ae4c6a \ No newline at end of file diff --git a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom.sha1 b/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom.sha1 deleted file mode 100644 index 46e2ad38786..00000000000 --- a/local_repo/hsfo/hsfo/2007-02-12/hsfo-2007-02-12.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -2dd20dc85cb02ec77054d47bdab3775a6191c1e6 \ No newline at end of file diff --git a/local_repo/hsfo/hsfo/maven-metadata-local_repo.xml b/local_repo/hsfo/hsfo/maven-metadata-local_repo.xml deleted file mode 100644 index 559c30cede1..00000000000 --- a/local_repo/hsfo/hsfo/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - hsfo - hsfo - 2007-02-12 - - - 2007-02-12 - - 20110209052037 - - diff --git a/local_repo/hsfo2/hsfo2/2.0/hsfo2-2.0.jar b/local_repo/hsfo2/hsfo2/2.0/hsfo2-2.0.jar deleted file mode 100644 index 518a13576ba..00000000000 Binary files a/local_repo/hsfo2/hsfo2/2.0/hsfo2-2.0.jar and /dev/null differ diff --git a/local_repo/hsfo2/hsfo2/2.0/hsfo2-2.0.pom b/local_repo/hsfo2/hsfo2/2.0/hsfo2-2.0.pom deleted file mode 100644 index 08ade710955..00000000000 --- a/local_repo/hsfo2/hsfo2/2.0/hsfo2-2.0.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - hsfo2 - hsfo2 - 2.0 - POM was created from install:install-file - diff --git a/local_repo/hsfo2/hsfo2/maven-metadata-local.xml b/local_repo/hsfo2/hsfo2/maven-metadata-local.xml deleted file mode 100644 index 3e1fbe2b3d6..00000000000 --- a/local_repo/hsfo2/hsfo2/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - hsfo2 - hsfo2 - 2.0 - - - 2.0 - - 20120404190418 - - diff --git a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar b/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar deleted file mode 100644 index f45ba1a467b..00000000000 Binary files a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar.md5 b/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar.md5 deleted file mode 100644 index 38eda6f8752..00000000000 --- a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -d70014f6c25b0bc113623ecf3b3e76ff \ No newline at end of file diff --git a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar.sha1 b/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar.sha1 deleted file mode 100644 index b6eaad0e99c..00000000000 --- a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7e838dd99ba628a1da4a8b332020f39aa4867e84 \ No newline at end of file diff --git a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom b/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom deleted file mode 100644 index 36a8f2acff4..00000000000 --- a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - javax.xml - jaxm-api - UNKNOWN - POM was created from install:install-file - diff --git a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom.md5 b/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom.md5 deleted file mode 100644 index 70fe022a42b..00000000000 --- a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -c1804c1e93e133cf600232aa22b7a24f \ No newline at end of file diff --git a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom.sha1 b/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom.sha1 deleted file mode 100644 index 82e88b07737..00000000000 --- a/local_repo/javax/xml/jaxm-api/UNKNOWN/jaxm-api-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -809be45a1b66ff18f58be8d0b8df2ec2fc4a5514 \ No newline at end of file diff --git a/local_repo/javax/xml/jaxm-api/maven-metadata-local_repo.xml b/local_repo/javax/xml/jaxm-api/maven-metadata-local_repo.xml deleted file mode 100644 index f139f5d1a99..00000000000 --- a/local_repo/javax/xml/jaxm-api/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - javax.xml - jaxm-api - UNKNOWN - - - UNKNOWN - - 20110209052056 - - diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar b/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar deleted file mode 100644 index 54a2dc096ed..00000000000 Binary files a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar and /dev/null differ diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar.md5 b/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar.md5 deleted file mode 100644 index 80f8aa87b9e..00000000000 --- a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -13927d8077c991e7ebcd8cb284746a7a \ No newline at end of file diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar.sha1 b/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar.sha1 deleted file mode 100644 index 59e34344892..00000000000 --- a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -496f4515d4eae91a43bde1bc7a965fba500acbbc \ No newline at end of file diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom b/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom deleted file mode 100644 index 590a86c39bf..00000000000 --- a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - net.sf.jcharts - krysalis-jCharts - 0.7.5 - POM was created from install:install-file - diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom.md5 b/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom.md5 deleted file mode 100644 index cda89c7e915..00000000000 --- a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -35bc2df96c3de4f97e29dbab4e5513a8 \ No newline at end of file diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom.sha1 b/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom.sha1 deleted file mode 100644 index 1ff4c43ab9f..00000000000 --- a/local_repo/net/sf/jcharts/krysalis-jCharts/0.7.5/krysalis-jCharts-0.7.5.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -e4a5ea54797a3a977260ac952f7021bcccdb0bde \ No newline at end of file diff --git a/local_repo/net/sf/jcharts/krysalis-jCharts/maven-metadata-local_repo.xml b/local_repo/net/sf/jcharts/krysalis-jCharts/maven-metadata-local_repo.xml deleted file mode 100644 index 7115031d9ec..00000000000 --- a/local_repo/net/sf/jcharts/krysalis-jCharts/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - net.sf.jcharts - krysalis-jCharts - 0.7.5 - - - 0.7.5 - - 20110209052027 - - diff --git a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar b/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar deleted file mode 100644 index 67cb05c8dd8..00000000000 Binary files a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar.md5 b/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar.md5 deleted file mode 100644 index 7f86badcf22..00000000000 --- a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -18f01c03c4d1e9238de5b522b4c0ca0f \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar.sha1 b/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar.sha1 deleted file mode 100644 index efa4a217ed4..00000000000 --- a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -9d2b143945ccd06cdb0af21c216a6859ba6ea0b4 \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom b/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom deleted file mode 100644 index 900ed072a28..00000000000 --- a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - ocan - ocan-iar-consent - UNKNOWN - diff --git a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom.md5 b/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom.md5 deleted file mode 100644 index feb7c15a9d9..00000000000 --- a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -388da1cf05aab718cdd6e0efd8bff66d \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom.sha1 b/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom.sha1 deleted file mode 100644 index 1686c6e1aa1..00000000000 --- a/local_repo/ocan/ocan-iar-consent/UNKNOWN/ocan-iar-consent-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -3ae731f731a1326309d1a745d4015031c13cf14b \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar-consent/maven-metadata.xml b/local_repo/ocan/ocan-iar-consent/maven-metadata.xml deleted file mode 100644 index 61b42c46832..00000000000 --- a/local_repo/ocan/ocan-iar-consent/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - ocan - ocan-iar-consent - UNKNOWN - - - UNKNOWN - - 20120207204920 - - diff --git a/local_repo/ocan/ocan-iar-consent/maven-metadata.xml.md5 b/local_repo/ocan/ocan-iar-consent/maven-metadata.xml.md5 deleted file mode 100644 index 1ee6f7abf15..00000000000 --- a/local_repo/ocan/ocan-iar-consent/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -9ff441eccf7e4361ac929f5005c80c76 \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar-consent/maven-metadata.xml.sha1 b/local_repo/ocan/ocan-iar-consent/maven-metadata.xml.sha1 deleted file mode 100644 index 2cfd8f8018f..00000000000 --- a/local_repo/ocan/ocan-iar-consent/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -43585a5f538f488ebcbce62d6e55ab7bbd1edd0a \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar b/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar deleted file mode 100644 index 5630400c0b5..00000000000 Binary files a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar and /dev/null differ diff --git a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar.md5 b/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar.md5 deleted file mode 100644 index d80eec144fa..00000000000 --- a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -4c30445376eac6a66446aaf22ef3956f \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar.sha1 b/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar.sha1 deleted file mode 100644 index c34110b7d96..00000000000 --- a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c994b99d8b9e6c737dd6e555f290ccef45c8327b \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom b/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom deleted file mode 100644 index 082a3bea093..00000000000 --- a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - ocan - ocan-iar - 3.0 - diff --git a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom.md5 b/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom.md5 deleted file mode 100644 index 6648b0e256b..00000000000 --- a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -318b3c30e1ce996b230bbba4481548e9 \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom.sha1 b/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom.sha1 deleted file mode 100644 index c1d9da01928..00000000000 --- a/local_repo/ocan/ocan-iar/3.0/ocan-iar-3.0.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -fffe0ba0c98de6fe36ceaee145cae0509d57b609 \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar/maven-metadata.xml b/local_repo/ocan/ocan-iar/maven-metadata.xml deleted file mode 100644 index 5e2b0ea27f4..00000000000 --- a/local_repo/ocan/ocan-iar/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - ocan - ocan-iar - 3.0 - - - 3.0 - - 20120207205520 - - diff --git a/local_repo/ocan/ocan-iar/maven-metadata.xml.md5 b/local_repo/ocan/ocan-iar/maven-metadata.xml.md5 deleted file mode 100644 index 42f2cab906a..00000000000 --- a/local_repo/ocan/ocan-iar/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -8164874b83c1042ae380d8f69c530da2 \ No newline at end of file diff --git a/local_repo/ocan/ocan-iar/maven-metadata.xml.sha1 b/local_repo/ocan/ocan-iar/maven-metadata.xml.sha1 deleted file mode 100644 index af365b3bbb5..00000000000 --- a/local_repo/ocan/ocan-iar/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -607da3a53e8ffb83fda94003a1a0bce44f17c9cb \ No newline at end of file diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/maven-metadata-local_repo.xml b/local_repo/ocan/ocan/0.0-SNAPSHOT/maven-metadata-local_repo.xml deleted file mode 100644 index bf99d2fe86a..00000000000 --- a/local_repo/ocan/ocan/0.0-SNAPSHOT/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - ocan - ocan - 0.0-SNAPSHOT - - - true - - 20110209052120 - - diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar b/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar deleted file mode 100644 index c1e34021630..00000000000 Binary files a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar and /dev/null differ diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar.md5 b/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar.md5 deleted file mode 100644 index f7dab64a980..00000000000 --- a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -6e2c924380f293e49d019c5cc7e638cc \ No newline at end of file diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar.sha1 b/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar.sha1 deleted file mode 100644 index d288f5e9cc2..00000000000 --- a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c0320c0fad565c37d278327bd21f2ca5bc1be67e \ No newline at end of file diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom b/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom deleted file mode 100644 index 425a6229b94..00000000000 --- a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - ocan - ocan - 0.0-SNAPSHOT - POM was created from install:install-file - diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom.md5 b/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom.md5 deleted file mode 100644 index 5fbb94d2265..00000000000 --- a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -596a44c54bd49eca99df9dbf86a2f1a0 \ No newline at end of file diff --git a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom.sha1 b/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom.sha1 deleted file mode 100644 index 8e6c97e6428..00000000000 --- a/local_repo/ocan/ocan/0.0-SNAPSHOT/ocan-0.0-SNAPSHOT.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -873a5a293215e024ecc2de1276019c2e09046ca1 \ No newline at end of file diff --git a/local_repo/ocan/ocan/maven-metadata-local_repo.xml b/local_repo/ocan/ocan/maven-metadata-local_repo.xml deleted file mode 100644 index 7298ef9333a..00000000000 --- a/local_repo/ocan/ocan/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - ocan - ocan - 0.0-SNAPSHOT - - - 0.0-SNAPSHOT - - 20110209052120 - - diff --git a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar b/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar deleted file mode 100644 index 541f62431b5..00000000000 Binary files a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar.md5 b/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar.md5 deleted file mode 100644 index e64fd5c367a..00000000000 --- a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -96267229ebe70ed4cbfd3d787e5e55c4 \ No newline at end of file diff --git a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar.sha1 b/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar.sha1 deleted file mode 100644 index f1478a23658..00000000000 --- a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a4eee8e41fdedad770d5de86f86451bab4a368c3 \ No newline at end of file diff --git a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom b/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom deleted file mode 100644 index 06ab8d0d770..00000000000 --- a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.chip.ping - oscar-ping - UNKNOWN - POM was created from install:install-file - diff --git a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom.md5 b/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom.md5 deleted file mode 100644 index 4f461b2ce17..00000000000 --- a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -d55b7eeb92dd0d0ef0ce5f14ea83a733 \ No newline at end of file diff --git a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom.sha1 b/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom.sha1 deleted file mode 100644 index f9585dd372e..00000000000 --- a/local_repo/org/chip/ping/oscar-ping/UNKNOWN/oscar-ping-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -a3435c7dd53313adab9d150d10e44c981af86100 \ No newline at end of file diff --git a/local_repo/org/chip/ping/oscar-ping/maven-metadata-local_repo.xml b/local_repo/org/chip/ping/oscar-ping/maven-metadata-local_repo.xml deleted file mode 100644 index 4295045bd17..00000000000 --- a/local_repo/org/chip/ping/oscar-ping/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.chip.ping - oscar-ping - UNKNOWN - - - UNKNOWN - - 20110209052133 - - diff --git a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar b/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar deleted file mode 100644 index e22dee191e4..00000000000 Binary files a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar.md5 b/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar.md5 deleted file mode 100644 index d480c27e3d1..00000000000 --- a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -b2f9c73c42b6999d901ca4930c392b25 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar.sha1 b/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar.sha1 deleted file mode 100644 index cc1d79e2f4d..00000000000 --- a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ad0ceefaebcde5f27840d2762af636d207c7ead7 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom b/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom deleted file mode 100644 index 91a71600ea2..00000000000 --- a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.chip.ping - ping-client - UNKNOWN - POM was created from install:install-file - diff --git a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom.md5 b/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom.md5 deleted file mode 100644 index 897cb9eba85..00000000000 --- a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -d707ad806129671cc6845af1d85bf8e9 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom.sha1 b/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom.sha1 deleted file mode 100644 index cd5e45c25d1..00000000000 --- a/local_repo/org/chip/ping/ping-client/UNKNOWN/ping-client-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -e7c330916e67597456aaf7ebe0723621c475be8c \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-client/maven-metadata-local_repo.xml b/local_repo/org/chip/ping/ping-client/maven-metadata-local_repo.xml deleted file mode 100644 index b10f09f3117..00000000000 --- a/local_repo/org/chip/ping/ping-client/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.chip.ping - ping-client - UNKNOWN - - - UNKNOWN - - 20110209052137 - - diff --git a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar b/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar deleted file mode 100644 index 6f0d9532430..00000000000 Binary files a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar.md5 b/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar.md5 deleted file mode 100644 index c952b743a32..00000000000 --- a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -d9e6b0697ab4f431b7a17ed96ca95989 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar.sha1 b/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar.sha1 deleted file mode 100644 index 79ccc5405cd..00000000000 --- a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7d36cb4e70c7f20f63e91b8c94d24a5347014687 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom b/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom deleted file mode 100644 index e331aa896f9..00000000000 --- a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.chip.ping - ping-core - UNKNOWN - POM was created from install:install-file - diff --git a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom.md5 b/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom.md5 deleted file mode 100644 index 12978c0f42c..00000000000 --- a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -ade152f59e56961b09af2ed53f7aaaa1 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom.sha1 b/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom.sha1 deleted file mode 100644 index bd74c0eab0c..00000000000 --- a/local_repo/org/chip/ping/ping-core/UNKNOWN/ping-core-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -225e555c6bc88427e58889b19dbb51fe096a50db \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-core/maven-metadata-local_repo.xml b/local_repo/org/chip/ping/ping-core/maven-metadata-local_repo.xml deleted file mode 100644 index 9092ad5bcb5..00000000000 --- a/local_repo/org/chip/ping/ping-core/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.chip.ping - ping-core - UNKNOWN - - - UNKNOWN - - 20110209052141 - - diff --git a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar b/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar deleted file mode 100644 index 60afbe04bb1..00000000000 Binary files a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar.md5 b/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar.md5 deleted file mode 100644 index 8ba61fa9ca6..00000000000 --- a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -d6f2736b711854ef735535a9b19d6ded \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar.sha1 b/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar.sha1 deleted file mode 100644 index ef54aae411d..00000000000 --- a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7827e462b96fdbe98a1e4254709f4786c764625f \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom b/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom deleted file mode 100644 index 3ddb0efd42a..00000000000 --- a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.chip.ping - ping-server - UNKNOWN - POM was created from install:install-file - diff --git a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom.md5 b/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom.md5 deleted file mode 100644 index 7a3f898968d..00000000000 --- a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -6b6c967ba756e8564322a67511e81695 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom.sha1 b/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom.sha1 deleted file mode 100644 index 17f39a040fe..00000000000 --- a/local_repo/org/chip/ping/ping-server/UNKNOWN/ping-server-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -4723fafbeace754309b1c36e84f358b8f315a1e3 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-server/maven-metadata-local_repo.xml b/local_repo/org/chip/ping/ping-server/maven-metadata-local_repo.xml deleted file mode 100644 index cd860d90946..00000000000 --- a/local_repo/org/chip/ping/ping-server/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.chip.ping - ping-server - UNKNOWN - - - UNKNOWN - - 20110209052145 - - diff --git a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar b/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar deleted file mode 100644 index 927d14f2e6c..00000000000 Binary files a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar and /dev/null differ diff --git a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar.md5 b/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar.md5 deleted file mode 100644 index 3020f8c44f9..00000000000 --- a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -0f4da83bc896791050dab4be8d29ca8b \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar.sha1 b/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar.sha1 deleted file mode 100644 index f60c854c640..00000000000 --- a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -639967d8c5588863e19b49d9f4bfff6bcf0a9ef2 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom b/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom deleted file mode 100644 index 20dc269515f..00000000000 --- a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org.chip.ping - ping-xml - UNKNOWN - POM was created from install:install-file - diff --git a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom.md5 b/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom.md5 deleted file mode 100644 index dcf39946677..00000000000 --- a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -d26107fbd46f81de108c19d0e06fc4f1 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom.sha1 b/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom.sha1 deleted file mode 100644 index c75f3a6b064..00000000000 --- a/local_repo/org/chip/ping/ping-xml/UNKNOWN/ping-xml-UNKNOWN.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -ffb8b1a11a6eaaf7c741469429f621fb45102c57 \ No newline at end of file diff --git a/local_repo/org/chip/ping/ping-xml/maven-metadata-local_repo.xml b/local_repo/org/chip/ping/ping-xml/maven-metadata-local_repo.xml deleted file mode 100644 index a716fc56cfa..00000000000 --- a/local_repo/org/chip/ping/ping-xml/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.chip.ping - ping-xml - UNKNOWN - - - UNKNOWN - - 20110209052149 - - diff --git a/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar b/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar deleted file mode 100644 index 54285b67822..00000000000 Binary files a/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar and /dev/null differ diff --git a/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar.md5 b/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar.md5 deleted file mode 100644 index e719da6c53c..00000000000 --- a/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -a037d2b613434f50abee1f4535284dd0 diff --git a/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar.sha1 b/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar.sha1 deleted file mode 100644 index 83ba5b1cb76..00000000000 --- a/local_repo/org/jpedal/lgpl/jpedal-lgpl.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8f9a0d39d03025399f925616ebcd243e58fd633e diff --git a/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom b/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom deleted file mode 100644 index 95ceac02d35..00000000000 --- a/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - org - jpedal - lgpl - POM was created from install:install-file - diff --git a/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom.md5 b/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom.md5 deleted file mode 100644 index 0098f53f85a..00000000000 --- a/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -6c17908a8f5bd3a31a7948eda6e7decd diff --git a/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom.sha1 b/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom.sha1 deleted file mode 100644 index 92edeac04a6..00000000000 --- a/local_repo/org/jpedal/lgpl/jpedal-lgpl.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -3f2ac3d6e0b03ac62c76a5fbc4417e72ea9b0826 diff --git a/local_repo/org/marc/everest/everest-core/1.1.0/_remote.repositories b/local_repo/org/marc/everest/everest-core/1.1.0/_remote.repositories deleted file mode 100644 index 9f5c2558586..00000000000 --- a/local_repo/org/marc/everest/everest-core/1.1.0/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:37 EDT 2017 -everest-core-1.1.0.pom>marc-te-main= -everest-core-1.1.0.jar>marc-te-main= diff --git a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.jar b/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.jar deleted file mode 100644 index d00cca594a9..00000000000 Binary files a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.jar and /dev/null differ diff --git a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.jar.lastUpdated b/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.jar.lastUpdated deleted file mode 100644 index d252ffa7c9c..00000000000 --- a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125629 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -@default-hapi-sf-http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -http\://hl7api.sourceforge.net/m2/.error=Could not transfer artifact org.marc.everest\:everest-core\:jar\:1.1.0 from/to hapi-sf (http\://hl7api.sourceforge.net/m2)\: Connection reset -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.pom b/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.pom deleted file mode 100644 index 78a30e9a4b0..00000000000 --- a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.pom +++ /dev/null @@ -1,75 +0,0 @@ - - 4.0.0 - org.marc.everest - everest-core - 1.1.0 - org.marc.everest - MARC-HI Everest Framework 1.1 - - http://te.marc-hi.ca/issue/default.aspx?project=6e2de429beae44359a1b23975a90a71b - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - http://docs.oracle.com/javase/6/docs/api/ - - - - - - - - - junit - junit - 4.11 - test - - - - - - https://fisheye.marc-hi.ca/svn/jEverest/tags/1.1.0/org.marc.everest - - - - marc-te-main - http://te.marc-hi.ca/mvn - - - - Mohawk College of Applied Arts and Technology - http://everest.marc-hi.ca - - - - marc-te-main-doc-distro - file://M:/org/marc/everest/everest-core - - - marc-te-main-distro - file://M:/ - - - - - \ No newline at end of file diff --git a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.pom.lastUpdated b/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.pom.lastUpdated deleted file mode 100644 index a7f55a146c5..00000000000 --- a/local_repo/org/marc/everest/everest-core/1.1.0/everest-core-1.1.0.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:37 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629537144 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010762094 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629537304 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248147876 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629537220 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677494884 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794676603 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920772822 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481230663 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276442481 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815749765 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374064 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772663 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974545 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170857186 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786137662 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481231296 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393000966 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491833 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173555 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172086432 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859274686 diff --git a/local_repo/org/marc/everest/everest-core/maven-metadata-local.xml b/local_repo/org/marc/everest/everest-core/maven-metadata-local.xml deleted file mode 100644 index 61789b69cfb..00000000000 --- a/local_repo/org/marc/everest/everest-core/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.marc.everest - everest-core - - 1.1.0 - - 1.1.0 - - 20250124143351 - - diff --git a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/_remote.repositories b/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/_remote.repositories deleted file mode 100644 index f5159c80ae8..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:38 EDT 2017 -everest-formatters-xml-dt-r1-1.1.0.pom>marc-te-main= -everest-formatters-xml-dt-r1-1.1.0.jar>marc-te-main= diff --git a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.jar b/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.jar deleted file mode 100644 index 78015dd442c..00000000000 Binary files a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.jar and /dev/null differ diff --git a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.jar.lastUpdated b/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.jar.lastUpdated deleted file mode 100644 index 8c6e663a5d3..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125630 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -@default-hapi-sf-http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -http\://hl7api.sourceforge.net/m2/.error=Could not transfer artifact org.marc.everest\:everest-formatters-xml-dt-r1\:jar\:1.1.0 from/to hapi-sf (http\://hl7api.sourceforge.net/m2)\: Connection reset -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.pom b/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.pom deleted file mode 100644 index d57da9d6d2d..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.pom +++ /dev/null @@ -1,72 +0,0 @@ - - 4.0.0 - org.marc.everest - everest-formatters-xml-dt-r1 - 1.1.0 - org.marc.everest.formatters.xml.dt.r1 - XML Datatypes R1 - - - org.marc.everest - everest-core - 1.1.0 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - http://docs.oracle.com/javase/6/docs/api/ - http://te.marc-hi.ca/library/en/jdoc/jev/ - - - - - - - http://te.marc-hi.ca/issue/default.aspx?project=6e2de429beae44359a1b23975a90a71b - - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - - - https://fisheye.marc-hi.ca/svn/jEverest/tags/1.1.0/org.marc.everest.formatters.xml.dt.r1 - - - - marc-te-main - http://te.marc-hi.ca/mvn - - - - Mohawk College of Applied Arts and Technology - http://everest.marc-hi.ca - - - - marc-te-main-doc-distro - file://M:/org/marc/everest/everest-formatters-xml-dt-r1 - - - marc-te-main-distro - file://M:/ - - - \ No newline at end of file diff --git a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.pom.lastUpdated b/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.pom.lastUpdated deleted file mode 100644 index 21f48f3d406..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-dt-r1/1.1.0/everest-formatters-xml-dt-r1-1.1.0.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:38 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629538089 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010763477 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629538241 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248149425 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629538164 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677496259 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794676958 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920774406 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481231979 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276443826 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815750958 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374083 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772711 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974570 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170858867 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786139061 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481232203 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393002666 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491848 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173572 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172087946 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859275987 diff --git a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/_remote.repositories b/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/_remote.repositories deleted file mode 100644 index 421ee024cd5..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:38 EDT 2017 -everest-formatters-xml-its1-1.1.0.pom>marc-te-main= -everest-formatters-xml-its1-1.1.0.jar>marc-te-main= diff --git a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.jar b/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.jar deleted file mode 100644 index 64846fbe038..00000000000 Binary files a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.jar and /dev/null differ diff --git a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.jar.lastUpdated b/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.jar.lastUpdated deleted file mode 100644 index 8b903691134..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125630 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -@default-hapi-sf-http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -http\://hl7api.sourceforge.net/m2/.error=Could not transfer artifact org.marc.everest\:everest-formatters-xml-its1\:jar\:1.1.0 from/to hapi-sf (http\://hl7api.sourceforge.net/m2)\: Connection reset -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.pom b/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.pom deleted file mode 100644 index 966e775b82f..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.pom +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - org.marc.everest - everest-formatters-xml-its1 - 1.1.0 - org.marc.everest.formatters.xml.its1 - XML ITS1 Formatter - - - org.marc.everest - everest-core - 1.1.0 - - - junit - junit - 4.11 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - http://docs.oracle.com/javase/6/docs/api/ - http://te.marc-hi.ca/library/en/jdoc/jev/ - - - - - - - http://te.marc-hi.ca/issue/default.aspx?project=6e2de429beae44359a1b23975a90a71b - - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - - - https://fisheye.marc-hi.ca/svn/jEverest/tags/1.1.0/org.marc.everest.formatters.xml.its1 - - - - marc-te-main - http://te.marc-hi.ca/mvn - - - - Mohawk College of Applied Arts and Technology - http://everest.marc-hi.ca - - - - marc-te-main-doc-distro - file://M:/org/marc/everest/everest-formatters-xml-its1 - - - marc-te-main-distro - file://M:/ - - - - \ No newline at end of file diff --git a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.pom.lastUpdated b/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.pom.lastUpdated deleted file mode 100644 index 8e1e48ae061..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-its1/1.1.0/everest-formatters-xml-its1-1.1.0.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:38 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629537858 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010763250 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629538013 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248149136 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629537932 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677495953 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794676869 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920774161 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481231753 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276443591 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815750731 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374081 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772705 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974565 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170858575 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786138844 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481231975 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393002355 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491846 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173569 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172087698 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859275754 diff --git a/local_repo/org/marc/everest/everest-formatters-xml-its1/maven-metadata-local.xml b/local_repo/org/marc/everest/everest-formatters-xml-its1/maven-metadata-local.xml deleted file mode 100644 index 7514f0af486..00000000000 --- a/local_repo/org/marc/everest/everest-formatters-xml-its1/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.marc.everest - everest-formatters-xml-its1 - - 1.1.0 - - 1.1.0 - - 20250124143352 - - diff --git a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/_remote.repositories b/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/_remote.repositories deleted file mode 100644 index bc236a5bfdb..00000000000 --- a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:37 EDT 2017 -everest-rmim-uv-cdar2-1.1.0.pom>marc-te-main= -everest-rmim-uv-cdar2-1.1.0.jar>marc-te-main= diff --git a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.jar b/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.jar deleted file mode 100644 index 1dd130243f0..00000000000 Binary files a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.jar and /dev/null differ diff --git a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.jar.lastUpdated b/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.jar.lastUpdated deleted file mode 100644 index be94e1b34fe..00000000000 --- a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125629 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -@default-hapi-sf-http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -http\://hl7api.sourceforge.net/m2/.error=Could not transfer artifact org.marc.everest\:everest-rmim-uv-cdar2\:jar\:1.1.0 from/to hapi-sf (http\://hl7api.sourceforge.net/m2)\: Connection reset -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.pom b/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.pom deleted file mode 100644 index 9559643167d..00000000000 --- a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.pom +++ /dev/null @@ -1,65 +0,0 @@ - - 4.0.0 - org.marc.everest - everest-rmim-uv-cdar2 - 1.1.0 - org.marc.everest.rmim.uv.cdar2 - HL7 Version 3 Clinical Document Architecture Release 2 Message Structures. Autogenerated by GPMR 1.1.4909.19766 - - UTF-8 - - - - - org.marc.everest - everest-core - 1.1.0 - - - - Mohawk College of Applied Arts and Technology. Based on models Copyright (C) Health Level 7 International - - - https://fisheye.marc-hi.ca/svn/jEverest/branches/1.1.0/org.marc.everest.rmim.uv.cdar2 - - - - marc-te-main - http://te.marc-hi.ca/mvn - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - utf8 - - http://docs.oracle.com/javase/6/docs/api/ - http://te.marc-hi.ca/library/en/jdoc/jev/ - - - - - - - - marc-te-main-doc-distro - file://M:/org/marc/everest/everest-rmim-uv-cdar2 - - - marc-te-main-distro - file://M:/ - - - - \ No newline at end of file diff --git a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.pom.lastUpdated b/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.pom.lastUpdated deleted file mode 100644 index 2ec6be04cc1..00000000000 --- a/local_repo/org/marc/everest/everest-rmim-uv-cdar2/1.1.0/everest-rmim-uv-cdar2-1.1.0.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:37 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629537624 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010763021 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629537783 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248148851 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629537701 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677495728 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794676779 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920773870 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481231528 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276443375 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815750499 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374078 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772698 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974561 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170858278 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786138632 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481231750 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393002027 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491843 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173566 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172087456 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859275522 diff --git a/local_repo/org/marc/shic/shic-atna/1.0.8/_remote.repositories b/local_repo/org/marc/shic/shic-atna/1.0.8/_remote.repositories deleted file mode 100644 index 8b90c643c46..00000000000 --- a/local_repo/org/marc/shic/shic-atna/1.0.8/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:40 EDT 2017 -shic-atna-1.0.8.jar>marc-te-main= -shic-atna-1.0.8.pom>marc-te-main= diff --git a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.jar b/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.jar deleted file mode 100644 index a16491412ac..00000000000 Binary files a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.jar and /dev/null differ diff --git a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.jar.lastUpdated b/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.jar.lastUpdated deleted file mode 100644 index 28d85977281..00000000000 --- a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125630 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.pom b/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.pom deleted file mode 100644 index 81bb42cef69..00000000000 --- a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.pom +++ /dev/null @@ -1,125 +0,0 @@ - - 4.0.0 - org.marc.shic - shic-atna - 1.0.8 - jar - org.marc.shic.atna - SHIC - Audit Trail and Node Authentication (ATNA) - A library that handles all IHE ATNA Profile interactions. - - Mohawk College of Applied Arts and Technology - http://te.marc-hi.ca - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - ${project.version} - - - jira - http://jira.marc-hi.ca/browse/SHC - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - Paul Brown - Mohawk College of Applied Arts and Technology - paul_dot_brown9_at_mohawkcollege_dot_ca - - - Garrett Tyler - Mohawk College of Applied Arts and Technology - garrett_dot_tyler_at_mohawkcollege_dot_ca - - - Mohamed Ibrahim - Mohawk College of Applied Arts and Technology - mohamed_dot_ibrahim1_at_mohawkcollege_dot_ca - - - - - marc-te-main-shic-doc-distro - file://O:/org/marc/shic/shic-atna - - - marc-te-main-distro - file://O:/ - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - - - - generate - - - - jaxb/AuditMessage/*.xsd - - ${project.build.directory}/generated-sources/xjc/META-INF/jaxb-AuditMessage.episode - org.marc.shic.atna.bindings - - jaxb-generate-AuditMessage - - - - src/main/resources/jaxb/catalog.xml - org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver - true - ${project.build.directory}/generated-sources/xjc - true - - - - - - UTF-8 - - - - marc-te-main - MARC-HI Technology Exchange Private Maven Repository - http://te.marc-hi.ca/mvn - - - - - junit - junit - 4.10 - test - jar - - - ${project.groupId} - shic-core - ${project.version} - - - diff --git a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.pom.lastUpdated b/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.pom.lastUpdated deleted file mode 100644 index 0dca6084c60..00000000000 --- a/local_repo/org/marc/shic/shic-atna/1.0.8/shic-atna-1.0.8.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:40 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629540173 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010764175 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629540349 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248150384 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629540247 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677496946 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794677224 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920775127 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481232652 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276444546 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815751718 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374091 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772737 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974582 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170859811 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786139725 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481232874 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393003564 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491857 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173581 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172088677 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859276684 diff --git a/local_repo/org/marc/shic/shic-atna/maven-metadata-local.xml b/local_repo/org/marc/shic/shic-atna/maven-metadata-local.xml deleted file mode 100644 index 50163fd9be9..00000000000 --- a/local_repo/org/marc/shic/shic-atna/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.marc.shic - shic-atna - - 1.0.8 - - 1.0.8 - - 20250124143352 - - diff --git a/local_repo/org/marc/shic/shic-cda/1.0.8/_remote.repositories b/local_repo/org/marc/shic/shic-cda/1.0.8/_remote.repositories deleted file mode 100644 index f21335580cf..00000000000 --- a/local_repo/org/marc/shic/shic-cda/1.0.8/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:45 EDT 2017 -shic-cda-1.0.8.pom>marc-te-main= -shic-cda-1.0.8.jar>marc-te-main= diff --git a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.jar b/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.jar deleted file mode 100644 index 0ec12ebdc36..00000000000 Binary files a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.jar and /dev/null differ diff --git a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.jar.lastUpdated b/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.jar.lastUpdated deleted file mode 100644 index 4dcfb77a9ce..00000000000 --- a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125631 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111253 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.pom b/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.pom deleted file mode 100644 index ce6bac0512c..00000000000 --- a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.pom +++ /dev/null @@ -1,117 +0,0 @@ - - 4.0.0 - org.marc.shic - shic-cda - 1.0.8 - jar - org.marc.shic.cda - SHIC - Clinical Document Architecture (CDA) - A library that handles the generation and parsing of CDA documents using The Everest Framework. - - Mohawk College of Applied Arts and Technology - http://te.marc-hi.ca - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - ${project.version} - - - jira - http://jira.marc-hi.ca/browse/SHC - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - Paul Brown - Mohawk College of Applied Arts and Technology - paul_dot_brown9_at_mohawkcollege_dot_ca - - - Garrett Tyler - Mohawk College of Applied Arts and Technology - garrett_dot_tyler_at_mohawkcollege_dot_ca - - - Mohamed Ibrahim - Mohawk College of Applied Arts and Technology - mohamed_dot_ibrahim1_at_mohawkcollege_dot_ca - - - - - marc-te-main-shic-doc-distro - file://O:/org/marc/shic/shic-cda - - - marc-te-main-distro - file://O:/ - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - - - UTF-8 - - - - marc-te-main - MARC-HI Technology Exchange Private Maven Repository - http://te.marc-hi.ca/mvn - - - - - junit - junit - 4.10 - test - jar - - - ${project.groupId} - shic-xds - ${project.version} - - - org.marc.shic - shic-core - ${project.version} - jar - - - org.apache.xmlgraphics - batik-ext - 1.7 - test - jar - - - org.reflections - reflections - 0.9.9-RC1 - - - diff --git a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.pom.lastUpdated b/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.pom.lastUpdated deleted file mode 100644 index 4198e8c17d0..00000000000 --- a/local_repo/org/marc/shic/shic-cda/1.0.8/shic-cda-1.0.8.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:45 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629545842 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010764849 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629545993 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248151341 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629545915 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677497661 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794677490 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920775858 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481233382 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276445246 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815752377 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374100 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772760 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974591 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170860727 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786140419 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481233598 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393004483 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491867 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173590 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172089537 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859277388 diff --git a/local_repo/org/marc/shic/shic-core/1.0.8/META-INF/MANIFEST.MF b/local_repo/org/marc/shic/shic-core/1.0.8/META-INF/MANIFEST.MF deleted file mode 100644 index a54473a869b..00000000000 --- a/local_repo/org/marc/shic/shic-core/1.0.8/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Manifest-Version: 1.0 -Archiver-Version: Plexus Archiver -Created-By: Apache Maven -Built-By: ibrahimm -Build-Jdk: 1.6.0_45 - diff --git a/local_repo/org/marc/shic/shic-core/1.0.8/_remote.repositories b/local_repo/org/marc/shic/shic-core/1.0.8/_remote.repositories deleted file mode 100644 index 8aeb2b57b3b..00000000000 --- a/local_repo/org/marc/shic/shic-core/1.0.8/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:38 EDT 2017 -shic-core-1.0.8.pom>marc-te-main= -shic-core-1.0.8.jar>marc-te-main= diff --git a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.jar b/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.jar deleted file mode 100644 index 1ead615d51a..00000000000 Binary files a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.jar and /dev/null differ diff --git a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.jar.lastUpdated b/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.jar.lastUpdated deleted file mode 100644 index 28d85977281..00000000000 --- a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125630 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.pom b/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.pom deleted file mode 100644 index 56c466f6205..00000000000 --- a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.pom +++ /dev/null @@ -1,140 +0,0 @@ - - 4.0.0 - org.marc.shic - shic-core - 1.0.8 - jar - org.marc.shic - The MARC-HI Shared Health Integration Components (SHIC) Library - A general purpose library for the generation, parsing and exchange of IHE profile interactions and CDA. - - Mohawk College of Applied Arts and Technology - http://te.marc-hi.ca - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - ${project.version} - - - jira - http://jira.marc-hi.ca/browse/SHC - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - Paul Brown - Mohawk College of Applied Arts and Technology - paul_dot_brown9_at_mohawkcollege_dot_ca - - - Garrett Tyler - Mohawk College of Applied Arts and Technology - garrett_dot_tyler_at_mohawkcollege_dot_ca - - - Mohamed Ibrahim - Mohawk College of Applied Arts and Technology - mohamed_dot_ibrahim1_at_mohawkcollege_dot_ca - - - - - marc-te-main-shic-doc-distro - file://O:/org/marc/shic/shic-core - - - marc-te-main-distro - file://O:/ - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - - - UTF-8 - - - - marc-te-main - MARC-HI Technology Exchange Private Maven Repository - http://te.marc-hi.ca/mvn - - - - - junit - junit - 4.10 - test - jar - - - log4j - log4j - 1.2.14 - - - org.marc.everest - everest-core - 1.1.0 - jar - - - org.marc.everest - everest-rmim-uv-cdar2 - 1.1.0 - jar - - - org.marc.everest - everest-formatters-xml-its1 - 1.1.0 - jar - - - org.marc.everest - everest-formatters-xml-dt-r1 - 1.1.0 - jar - - - commons-net - commons-net - 2.0 - - - org.bouncycastle - bcpkix-jdk15on - 1.51 - jar - - - org.apache.cxf - apache-cxf - 2.7.4 - pom - - - diff --git a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.pom.lastUpdated b/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.pom.lastUpdated deleted file mode 100644 index c95ce3fc833..00000000000 --- a/local_repo/org/marc/shic/shic-core/1.0.8/shic-core-1.0.8.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:38 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629538316 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010763716 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629538477 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248149727 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629538389 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677496484 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794677053 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920774642 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481232207 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276444041 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815751180 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374086 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772722 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974575 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170859203 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786139285 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481232428 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393002976 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491851 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173575 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172088203 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859276207 diff --git a/local_repo/org/marc/shic/shic-core/maven-metadata-local.xml b/local_repo/org/marc/shic/shic-core/maven-metadata-local.xml deleted file mode 100644 index 8e50d48bc94..00000000000 --- a/local_repo/org/marc/shic/shic-core/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.marc.shic - shic-core - - 1.0.8 - - 1.0.8 - - 20250124143350 - - diff --git a/local_repo/org/marc/shic/shic-pix/1.0.8/_remote.repositories b/local_repo/org/marc/shic/shic-pix/1.0.8/_remote.repositories deleted file mode 100644 index beb14662243..00000000000 --- a/local_repo/org/marc/shic/shic-pix/1.0.8/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:40 EDT 2017 -shic-pix-1.0.8.pom>marc-te-main= -shic-pix-1.0.8.jar>marc-te-main= diff --git a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.jar b/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.jar deleted file mode 100644 index 1011bb6d037..00000000000 Binary files a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.jar and /dev/null differ diff --git a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.jar.lastUpdated b/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.jar.lastUpdated deleted file mode 100644 index 28d85977281..00000000000 --- a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125630 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.pom b/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.pom deleted file mode 100644 index 82e7f071a16..00000000000 --- a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.pom +++ /dev/null @@ -1,128 +0,0 @@ - - 4.0.0 - org.marc.shic - shic-pix - 1.0.8 - jar - org.marc.shic.pix - SHIC - Patient Identifier Cross-Referencing (PIX) - A library that handles all IHE PIX Profile interactions. - - Mohawk College of Applied Arts and Technology - http://te.marc-hi.ca - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - ${project.version} - - - jira - http://jira.marc-hi.ca/browse/SHC - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - Paul Brown - Mohawk College of Applied Arts and Technology - paul_dot_brown9_at_mohawkcollege_dot_ca - - - Garrett Tyler - Mohawk College of Applied Arts and Technology - garrett_dot_tyler_at_mohawkcollege_dot_ca - - - Mohamed Ibrahim - Mohawk College of Applied Arts and Technology - mohamed_dot_ibrahim1_at_mohawkcollege_dot_ca - - - - - marc-te-main-shic-doc-distro - file://O:/org/marc/shic/shic-pix - - - marc-te-main-distro - file://O:/ - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - - - UTF-8 - - - - hapi-sf - HAPI Sourceforge Repository - http://hl7api.sourceforge.net/m2 - - - marc-te-main - MARC-HI Technology Exchange Private Maven Repository - http://te.marc-hi.ca/mvn - - - - - junit - junit - 4.10 - test - jar - - - ${project.groupId} - shic-atna - ${project.version} - - - ca.uhn.hapi - hapi-base - 1.0.1 - jar - - - ca.uhn.hapi - hapi-structures-v231 - 1.0.1 - jar - - - ca.uhn.hapi - hapi-structures-v25 - 1.0.1 - jar - - - ca.uhn.hapi - hapi-examples - 1.0.1 - jar - - - diff --git a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.pom.lastUpdated b/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.pom.lastUpdated deleted file mode 100644 index d292786e62c..00000000000 --- a/local_repo/org/marc/shic/shic-pix/1.0.8/shic-pix-1.0.8.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:40 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629539585 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010764403 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629540096 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248150705 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629539667 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677497204 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794677314 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920775373 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481232879 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276444780 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815751938 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374094 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772745 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974585 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170860149 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786139947 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481233094 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393003870 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491861 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173585 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172089029 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859276908 diff --git a/local_repo/org/marc/shic/shic-xds/1.0.8/_remote.repositories b/local_repo/org/marc/shic/shic-xds/1.0.8/_remote.repositories deleted file mode 100644 index a6495968dfe..00000000000 --- a/local_repo/org/marc/shic/shic-xds/1.0.8/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:39 EDT 2017 -shic-xds-1.0.8.pom>marc-te-main= -shic-xds-1.0.8.jar>marc-te-main= diff --git a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.jar b/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.jar deleted file mode 100644 index 56f254e9727..00000000000 Binary files a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.jar and /dev/null differ diff --git a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.jar.lastUpdated b/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.jar.lastUpdated deleted file mode 100644 index 28d85977281..00000000000 --- a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.jar.lastUpdated +++ /dev/null @@ -1,9 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Sat Dec 10 12:15:25 EST 2016 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1481390120581 -http\://te.marc-hi.ca/mvn/.lastUpdated=1481390125630 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1481390111252 -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1481390101473 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= diff --git a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.pom b/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.pom deleted file mode 100644 index b0c550ff983..00000000000 --- a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.pom +++ /dev/null @@ -1,205 +0,0 @@ - - 4.0.0 - org.marc.shic - shic-xds - 1.0.8 - jar - org.marc.shic.xds - SHIC - Cross-Enterprise Document Sharing (XDS) - A library that handles all IHE XDS Profile interactions. - - Mohawk College of Applied Arts and Technology - http://te.marc-hi.ca - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - scm:git:http://fisheye.marc-hi.ca/git/SharedHealthComponents.git - ${project.version} - - - jira - http://jira.marc-hi.ca/browse/SHC - - - - Justin Fyfe - Mohawk College of Applied Arts and Technology - justin_dot_fyfe1_at_mohawkcollege_dot_ca - - - Paul Brown - Mohawk College of Applied Arts and Technology - paul_dot_brown9_at_mohawkcollege_dot_ca - - - Garrett Tyler - Mohawk College of Applied Arts and Technology - garrett_dot_tyler_at_mohawkcollege_dot_ca - - - Mohamed Ibrahim - Mohawk College of Applied Arts and Technology - mohamed_dot_ibrahim1_at_mohawkcollege_dot_ca - - - - - marc-te-main-shic-doc-distro - file://O:/org/marc/shic/shic-xds - - - marc-te-main-distro - file://O:/ - - - - - - META-INF - src - - jax-ws-catalog.xml - wsdl/** - schema/** - - - - src/main/resources - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - ${basedir}/src/main/resources/endorsed - - - - - org.jvnet.jax-ws-commons - jaxws-maven-plugin - 2.2.1 - - - - wsimport - - - - XDS.b_DocumentRegistry.wsdl - - org.marc.shic.xds.registry - src/main/resources/ihe/wsdl - META-INF/wsdl/XDS.b_DocumentRegistry.wsdl - - wsimport-generate-XDS.b_DocumentRegistry - generate-sources - - - - wsimport - - - - XDS.b_DocumentRepository.wsdl - - org.marc.shic.xds.repository - src/main/resources/ihe/wsdl - META-INF/wsdl/XDS.b_DocumentRepository.wsdl - - wsimport-generate-XDS.b_DocumentRepository - generate-sources - - - - - javax.xml - webservices-api - 2.0 - - - - ${project.build.directory}/generated-sources/jaxws-wsimport - true - true - true - ${basedir}/src/jax-ws-catalog.xml - - - - org.apache.maven.plugins - maven-war-plugin - 2.0.2 - - - - src - WEB-INF - - jax-ws-catalog.xml - wsdl/** - schema/** - - - - - - - - - UTF-8 - - - - marc-te-main - MARC-HI Technology Exchange Private Maven Repository - http://te.marc-hi.ca/mvn - - - shibboleth-opensaml - Shibboleth - https://build.shibboleth.net/nexus/content/repositories/releases - - - - - junit - junit - 4.10 - test - jar - - - ${project.groupId} - shic-pix - ${project.version} - - - org.opensaml - opensaml - 2.6.1 - - - org.slf4j - slf4j-simple - 1.7.6 - - - org.codehaus.woodstox - wstx-asl - 4.0.6 - - - diff --git a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.pom.lastUpdated b/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.pom.lastUpdated deleted file mode 100644 index e40ac670e68..00000000000 --- a/local_repo/org/marc/shic/shic-xds/1.0.8/shic-xds-1.0.8.pom.lastUpdated +++ /dev/null @@ -1,45 +0,0 @@ -#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. -#Mon Mar 27 11:45:39 EDT 2017 -http\://hl7api.sourceforge.net/m2/.lastUpdated=1490629539327 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.error= -file\:///home/marc/workspaces/jwt/oscar/local_repo/.lastUpdated=1489010763940 -file\:///home/marc/workspaces/rebase/oscar/local_repo/.error= -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.error= -http\://te.marc-hi.ca/mvn/.lastUpdated=1490629539504 -file\:///home/marc/workspaces/cds/oscar/local_repo/.lastUpdated=1482248150055 -http\://oscarmcmaster.sourceforge.net/m2/.lastUpdated=1490629539401 -file\:///home/marc/workspaces/cds/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.error= -file\:///home/marc/workspaces/contacts/oscar/local_repo/.lastUpdated=1489677496707 -http\://smartbearsoftware.com/repository/maven2/.lastUpdated=1485794677138 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.lastUpdated=1484920774885 -file\:///home/marc/workspaces/BITBUCKET/oscar/local_repo/.lastUpdated=1490481232432 -file\:///home/marc/workspaces/hrm/oscar/local_repo/.error= -file\:///home/marc/workspaces/rebase/oscar/local_repo/.lastUpdated=1490276444258 -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.error= -file\:///home/marc/workspaces/dashboard/oscar/local_repo/.lastUpdated=1488815751402 -file\:///home/marc/workspaces/bitbucket/2/oscar-emr/local_repo/.lastUpdated=1485955374088 -file\:///home/marc/workspaces/sha2/oscar/local_repo/.error= -file\:///home/marc/workspaces/BITBUCKET/stable/oscar/local_repo/.lastUpdated=1490628772730 -file\:///home/marc/workspaces/hph/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.error= -http\://oscarmcmaster.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/sha2/oscar/local_repo/.lastUpdated=1481569974579 -file\:///home/marc/workspaces/jwt/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.lastUpdated=1487170859498 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.lastUpdated=1487786139502 -file\:///home/marc/workspaces/bitbucket/oscar-master/local_repo/.error= -http\://smartbearsoftware.com/repository/maven2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.error= -https\://repo.maven.apache.org/maven2/.lastUpdated=1490481232648 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.lastUpdated=1486393003272 -file\:///home/marc/workspaces/bitbucket/3/oscar-emr/local_repo/.error= -file\:///home/marc/workspaces/code_review/oscar/local_repo/.error= -file\:///home/marc/workspaces/hrm/oscar/local_repo/.lastUpdated=1486478491854 -file\:///home/marc/workspaces/hph/oscar/local_repo/.lastUpdated=1487863173577 -http\://hl7api.sourceforge.net/m2/.error= -file\:///home/marc/workspaces/integrator/oscar/local_repo/.lastUpdated=1488172088439 -file\:///home/marc/workspaces/code_review2/oscar/local_repo/.error= -file\:///home/marc/workspaces/code_review5/oscar/local_repo/.lastUpdated=1487859276430 diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/_remote.repositories b/local_repo/org/oscarehr/ckd/ckd/1.0/_remote.repositories deleted file mode 100644 index 004024a1652..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/1.0/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. -#Fri Jan 24 09:33:47 EST 2025 -ckd-1.0.jar>= -ckd-1.0.pom>= diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar b/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar deleted file mode 100644 index 5ae72b28258..00000000000 Binary files a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar and /dev/null differ diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar.md5 b/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar.md5 deleted file mode 100644 index 10ee7d87f3e..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -13242137bdc25c75f58110fc0a0dd03e \ No newline at end of file diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar.sha1 b/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar.sha1 deleted file mode 100644 index 6c2c52aaafc..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1fab7361d95515171dceb8c9c1de07e5a33a82d2 \ No newline at end of file diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom b/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom deleted file mode 100644 index eb141910c3e..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom +++ /dev/null @@ -1,93 +0,0 @@ - - 4.0.0 - org.oscarehr.ckd - ckd - jar - 1.0 - ckd - http://www.oscarmcmaster.org - - UTF-8 - - - - - local_repo - Repository Name - - file:///home/marc/workspaces/orn/oscar/local_repo - - - - - - - org.apache.xmlbeans - xmlbeans - 2.4.0 - - - - junit - junit - 3.8.1 - test - - - - - - - org.codehaus.mojo - xmlbeans-maven-plugin - 2.3.3 - - - - xmlbeans - - - - true - - src/main/resources - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.codehaus.mojo - - xmlbeans-maven-plugin - - - [2.3.3,) - - - xmlbeans - - - - - - - - - - - - - - diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom.md5 b/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom.md5 deleted file mode 100644 index fc30e575d5f..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -936e27554fd55c3b916d16d4e64e7e21 \ No newline at end of file diff --git a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom.sha1 b/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom.sha1 deleted file mode 100644 index 5d01b0bddf6..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/1.0/ckd-1.0.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -f7b2e88b5968e312c32d30f8c369f3cf201f4799 \ No newline at end of file diff --git a/local_repo/org/oscarehr/ckd/ckd/maven-metadata-local.xml b/local_repo/org/oscarehr/ckd/ckd/maven-metadata-local.xml deleted file mode 100644 index 91a86b71d3c..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/maven-metadata-local.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.oscarehr.ckd - ckd - - 1.0 - - 1.0 - - 20250124143347 - - diff --git a/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml b/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml deleted file mode 100644 index d032a83656b..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.oscarehr.ckd - ckd - - 1.0 - - 1.0 - - 20170302195550 - - diff --git a/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml.md5 b/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml.md5 deleted file mode 100644 index 072251bff85..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -5119bb386a7f3538982faf7b6d39b22d \ No newline at end of file diff --git a/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml.sha1 b/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml.sha1 deleted file mode 100644 index e57b2b1e5b2..00000000000 --- a/local_repo/org/oscarehr/ckd/ckd/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -5cc46fbeeb1ff96df17de7c16f7ae05eb33c3d7d \ No newline at end of file diff --git a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar b/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar deleted file mode 100644 index 4d69a821670..00000000000 Binary files a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar and /dev/null differ diff --git a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar.md5 b/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar.md5 deleted file mode 100644 index 31388f00b76..00000000000 --- a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -303ab991d1973228be4fcae882d40198 \ No newline at end of file diff --git a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar.sha1 b/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar.sha1 deleted file mode 100644 index 86d8ec95fe6..00000000000 --- a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -21a6673f231161a15f4677a1ad8949cd0b08de5d \ No newline at end of file diff --git a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom b/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom deleted file mode 100644 index 8874f6e9b6c..00000000000 --- a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom +++ /dev/null @@ -1,8 +0,0 @@ - - - 4.0.0 - org.oscarehr - flowsheets - 1.0 - diff --git a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom.md5 b/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom.md5 deleted file mode 100644 index 00fb556dc27..00000000000 --- a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -f0a6d1fdc6a45441fcddbdfa42b998cb \ No newline at end of file diff --git a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom.sha1 b/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom.sha1 deleted file mode 100644 index 7a71f909bbd..00000000000 --- a/local_repo/org/oscarehr/flowsheets/1.0/flowsheets-1.0.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -6ea31278a31bfd8cb1fd5ae0f5371594702f817b \ No newline at end of file diff --git a/local_repo/org/oscarehr/flowsheets/maven-metadata.xml b/local_repo/org/oscarehr/flowsheets/maven-metadata.xml deleted file mode 100644 index 2648b4b4eaa..00000000000 --- a/local_repo/org/oscarehr/flowsheets/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.oscarehr - flowsheets - - 1.0 - - 1.0 - - 20181128153758 - - diff --git a/local_repo/org/oscarehr/flowsheets/maven-metadata.xml.md5 b/local_repo/org/oscarehr/flowsheets/maven-metadata.xml.md5 deleted file mode 100644 index 80a3f083706..00000000000 --- a/local_repo/org/oscarehr/flowsheets/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -a016abf2f229532ab3622ffa1ff5037a \ No newline at end of file diff --git a/local_repo/org/oscarehr/flowsheets/maven-metadata.xml.sha1 b/local_repo/org/oscarehr/flowsheets/maven-metadata.xml.sha1 deleted file mode 100644 index 4a783824d56..00000000000 --- a/local_repo/org/oscarehr/flowsheets/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -31e42bba53ab6077a6f363c42b6e0862828b6e5f \ No newline at end of file diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar b/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar deleted file mode 100644 index 06de0ca0b21..00000000000 Binary files a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar and /dev/null differ diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar.md5 b/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar.md5 deleted file mode 100644 index 5136a5fcf6a..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -2b844fddefab7096492ddd40e66023f8 \ No newline at end of file diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar.sha1 b/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar.sha1 deleted file mode 100644 index 0a1c0cb86d0..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -01347981d7c2b1b48c410fc2a74c7124d842fcfe \ No newline at end of file diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom b/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom deleted file mode 100644 index 669e5e9518e..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.oscarehr.hrm - hrm-jaxb - 4.1a - HRM 4.1a - JAXB of HRM schema - - - - local_repo - Repository Name - file:///home/marc/workspaces/review/oscar/local_repo - - - - - - - - - - com.sun.tools.xjc.maven2 - maven-jaxb-plugin - - - - generate - - - - - org.oscarehr.hospitalReportManager.xsd - ${basedir}/src/main/resources - - report_manager_cds.xsd - report_manager_dt.xsd - - true - true - - - - - - diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom.md5 b/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom.md5 deleted file mode 100644 index b9dde8073f3..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -2e1df238cfebabeadc87d85d519305bd \ No newline at end of file diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom.sha1 b/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom.sha1 deleted file mode 100644 index 411fc50c72b..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/4.1a/hrm-jaxb-4.1a.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -e8745a851af497447979b48ca7501e7a2d5a3671 \ No newline at end of file diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml b/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml deleted file mode 100644 index 692a0758797..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - org.oscarehr.hrm - hrm-jaxb - - 4.1a - - 4.1a - - 20130912145858 - - diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml.md5 b/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml.md5 deleted file mode 100644 index ffec9621a43..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -bffef043cb85d2094683bbb9ff095d0d \ No newline at end of file diff --git a/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml.sha1 b/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml.sha1 deleted file mode 100644 index a61b9d34c16..00000000000 --- a/local_repo/org/oscarehr/hrm/hrm-jaxb/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -188d4a351b51ac31c08b7fe85494fba67386dddd \ No newline at end of file diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/maven-metadata-local_repo.xml b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/maven-metadata-local_repo.xml deleted file mode 100644 index 449f9e7c09e..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - patientSiteVisit - patientSiteVisit - 0.0-SNAPSHOT - - - true - - 20110209052051 - - diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar deleted file mode 100644 index 4f594026bef..00000000000 Binary files a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar and /dev/null differ diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar.md5 b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar.md5 deleted file mode 100644 index 1cb9689ec09..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -65d7c91fa749aaaf683943e308947fe2 \ No newline at end of file diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar.sha1 b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar.sha1 deleted file mode 100644 index f68ac1c0c79..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f01c2043afae3c0ed76c87c9c4c55bacf4d4cb54 \ No newline at end of file diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom deleted file mode 100644 index 876d5a016d0..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom +++ /dev/null @@ -1,9 +0,0 @@ - - - 4.0.0 - patientSiteVisit - patientSiteVisit - 0.0-SNAPSHOT - POM was created from install:install-file - diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom.md5 b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom.md5 deleted file mode 100644 index be96f18d907..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom.md5 +++ /dev/null @@ -1 +0,0 @@ -1e7115a4ba6c6824f533b49914c01944 \ No newline at end of file diff --git a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom.sha1 b/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom.sha1 deleted file mode 100644 index a98bdcfba04..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/0.0-SNAPSHOT/patientSiteVisit-0.0-SNAPSHOT.pom.sha1 +++ /dev/null @@ -1 +0,0 @@ -9aff9d59a5a4124e3895c998c90b2900a05708fb \ No newline at end of file diff --git a/local_repo/patientSiteVisit/patientSiteVisit/maven-metadata-local_repo.xml b/local_repo/patientSiteVisit/patientSiteVisit/maven-metadata-local_repo.xml deleted file mode 100644 index f4d0f1a3f57..00000000000 --- a/local_repo/patientSiteVisit/patientSiteVisit/maven-metadata-local_repo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - patientSiteVisit - patientSiteVisit - 0.0-SNAPSHOT - - - 0.0-SNAPSHOT - - 20110209052051 - - diff --git a/pom.xml b/pom.xml index ab27ed7876b..666409fe3cc 100644 --- a/pom.xml +++ b/pom.xml @@ -24,14 +24,22 @@ UTF-8 UTF-8 + + openo-beta1 2.25.3 2.0.17 - 6.4.0 + 6.10.5 + + 6.4.0 - 3.5.11 + 3.6.9 + + 4.1.129.Final + + 2.21.1 false false @@ -88,6 +96,12 @@ jaxb-core 2.3.0.1 + + + xerces + xercesImpl + 2.12.2 + org.springframework @@ -108,6 +122,38 @@ mina-core 2.1.10 + + + + ca.uhn.hapi.fhir + org.hl7.fhir.utilities + ${hl7.fhir.core.version} + + + ca.uhn.hapi.fhir + org.hl7.fhir.dstu3 + ${hl7.fhir.core.version} + + + + io.netty + netty-bom + ${netty.version} + pom + import + + + + + + org.apache.james + apache-mime4j-core + 0.8.10 + @@ -244,13 +290,12 @@ commons-collections 3.2.2 - + - commons-digester - commons-digester - 1.8 + org.apache.commons + commons-digester3 + 3.2 - commons-beanutils commons-beanutils @@ -273,13 +318,7 @@ commons-lang3 3.18.0 - - - - commons-beanutils - commons-beanutils - 1.11.0 - + @@ -298,7 +337,7 @@ org.apache.httpcomponents httpmime - 4.5.6 + 4.5.14 @@ -431,6 +470,13 @@ org.springframework.integration spring-integration-sftp 5.5.20 + + + + com.jcraft + jsch + + @@ -447,6 +493,18 @@ org.springframework spring-aop 5.3.39 + + + cglib + cglib + + + + + + cglib + cglib-nodep + 3.3.0 @@ -487,9 +545,9 @@ - commons-dbcp - commons-dbcp - 1.4 + org.apache.commons + commons-dbcp2 + 2.14.0 @@ -505,13 +563,6 @@ 5.6.15.Final - - - org - jpedal - lgpl - - org.apache.pdfbox @@ -524,10 +575,11 @@ 3.12.0 + - taglibs - standard - 1.1.2 + org.glassfish.web + javax.servlet.jsp.jstl + 1.2.5 @@ -536,12 +588,12 @@ com.itextpdf itextpdf - 5.5.13.4 + 5.5.13.5 com.itextpdf.tool xmlworker - 5.5.13.4 + 5.5.13.5 @@ -576,7 +628,7 @@ net.sf.jasperreports jasperreports - 6.20.1 + 6.21.5 bouncycastle @@ -618,17 +670,38 @@ com.fasterxml.jackson.core jackson-databind - 2.19.2 + ${jackson.version} + + + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson.version} + + + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + ${jackson.version} + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson.version} - + - net.sf.jcharts - krysalis-jCharts + jcharts + jcharts 0.7.5 @@ -680,19 +753,6 @@ 3.1.0 - - - org.quartz-scheduler - quartz - 1.8.5 - - - org.slf4j - slf4j-api - - - - com.sun.mail @@ -704,7 +764,7 @@ org.jfree jfreechart - 1.5.4 + 1.5.6 @@ -715,32 +775,12 @@ - - - - patientSiteVisit - patientSiteVisit - 0.0-SNAPSHOT - - - - - - javax.xml - jaxm-api - UNKNOWN - org.apache.poi poi - 5.0.0 + 5.5.1 org.slf4j @@ -758,83 +798,54 @@ 1.4.3 - - - + + + - displaytag + com.github.hazendaz displaytag - 1.2 + 2.9.0 + org.slf4j slf4j-api + org.slf4j - jcl104-over-slf4j - - - org.slf4j - slf4j-log4j12 - - - - commons-beanutils - commons-beanutils - - - commons-lang - commons-lang - - - - - com.lowagie - itext + jcl-over-slf4j - zxing - zxing-core - 1.5 + com.google.zxing + core + 3.5.3 - zxing - zxing-j2se - 1.5 + com.google.zxing + javase + 3.5.3 - - - com.github.jtidy - jtidy - 1.0.5 - - org.jsoup jsoup 1.17.2 - - - xerces - xercesImpl - 2.12.2 - - - - + + + + + janino janino @@ -843,9 +854,9 @@ - com.jcraft + com.github.mwiede jsch - 0.1.54 + 0.2.19 @@ -862,21 +873,6 @@ 1.79 - - - - org.glassfish.jersey.core - jersey-client - 2.46 - - - - jakarta.ws.rs - jakarta.ws.rs-api - - - - - - org.apache.velocity - velocity - 1.7 - org.apache.velocity velocity-engine-core @@ -1089,6 +1080,21 @@ org.apache.cxf cxf-rt-rs-extension-providers + + + org.apache.cxf + cxf-rt-transports-jms + + + + org.apache.cxf + cxf-rt-frontend-js + + + + org.apache.cxf + cxf-rt-transports-http-jetty + @@ -1154,16 +1160,9 @@ - com.atlassian.commonmark + org.commonmark commonmark - 0.10.0 - - - - - org.ccil.cowan.tagsoup - tagsoup - 1.2.1 + 0.23.0 @@ -1175,7 +1174,7 @@ com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.15.2 + ${jackson.version} @@ -1212,31 +1211,16 @@ - - - com.medseek.clinical.service - SSOClinicalConnect - 20171101 - - - - - com.medseek - PatientService - 20161213 - - org.jasypt jasypt 1.9.3 - org.apache.commons commons-exec - 1.3 + 1.4.0 @@ -1246,14 +1230,6 @@ 1.5.4 - - - - org.dom4j - dom4j - 2.1.4 - - org.jetbrains annotations @@ -1267,31 +1243,32 @@ org.seleniumhq.selenium selenium-java - 3.141.59 + 4.40.0 test - + - com.squareup.okio - okio + org.seleniumhq.selenium + selenium-devtools-v142 - - - - - - io.github.bonigarcia - webdrivermanager - 6.1.0 - test - - - io.netty - netty-common + org.seleniumhq.selenium + selenium-devtools-v143 + + + org.seleniumhq.selenium + selenium-devtools-v144 + + + + io.opentelemetry + * + + + org.testng @@ -1362,7 +1339,7 @@ org.xhtmlrenderer flying-saucer-pdf - 9.4.1 + 9.13.3 @@ -1372,7 +1349,7 @@ org.apache.openjpa openjpa - 3.0.0 + 3.2.2 @@ -1426,6 +1403,13 @@ javax.annotation-api 1.3.2 + + + + javax.inject + javax.inject + 1 + javax.servlet.jsp @@ -1433,19 +1417,17 @@ 2.3.3 provided - - - - com.sun.xml.bind - jaxb-impl - 2.3.3 - + + + - javax.servlet - jstl - 1.2 + org.glassfish.jaxb + jaxb-runtime + + + org.apache.struts struts2-core @@ -1751,6 +1733,7 @@ **/test/**/*Test.java **/test/**/*Tests.java **/tickler/**/*Test.java + **/managers/**/*Test.java diff --git a/src/main/java/ca/ontario/health/edt/EDTDelegateImpl.java b/src/main/java/ca/ontario/health/edt/EDTDelegateImpl.java index f82bae7786e..ec574d50ad2 100644 --- a/src/main/java/ca/ontario/health/edt/EDTDelegateImpl.java +++ b/src/main/java/ca/ontario/health/edt/EDTDelegateImpl.java @@ -5,11 +5,49 @@ import java.util.logging.Logger; import javax.jws.WebService; +/** + * Implementation of the EDT (Electronic Data Transfer) web service delegate for Ontario healthcare integration. + * + *

    This service provides the implementation for MCEDT (Medical Certificate Electronic Data Transfer) operations, + * enabling electronic submission and management of medical certificates and related healthcare documents to Ontario's + * Ministry of Health (OHIP). The service follows the SOAP web service specification defined by the Ontario eHealth system.

    + * + *

    The EDT service supports the following core operations:

    + *
      + *
    • Resource submission and upload to OHIP
    • + *
    • Resource information retrieval and listing
    • + *
    • Resource download from OHIP
    • + *
    • Resource updates and deletion
    • + *
    • Type list retrieval for valid resource types
    • + *
    + * + *

    Note: This is currently a stub implementation that logs operations but returns null results. + * Production implementation requires integration with Ontario's eHealth EDT infrastructure.

    + * + * @see EDTDelegate + * @see ResourceResult + * @see DownloadResult + * @see Detail + * @see TypeListResult + * @since 2026-01-24 + */ @WebService(serviceName = "EDTService", portName = "EDTPort", targetNamespace = "http://edt.health.ontario.ca/", wsdlLocation = "file:/home/oscara/mcedt/edt-stubs/src/main/resources/from_ohip_web_site/EDTService.wsdl", endpointInterface = "ca.ontario.health.edt.EDTDelegate") public class EDTDelegateImpl implements EDTDelegate { private static final Logger LOG; + /** + * Submits previously uploaded resources to OHIP for processing. + * + *

    This operation submits one or more resources that have been previously uploaded to the EDT system, + * making them available for OHIP processing and review. Resources must be in an uploaded state before + * they can be submitted.

    + * + * @param resourceIDs List of BigInteger resource identifiers to submit to OHIP + * @return ResourceResult containing the submission status and outcome for each resource + * @throws Faultexception if the submission operation fails due to invalid resource IDs, + * system errors, or OHIP connectivity issues + */ @Override public ResourceResult submit(final List resourceIDs) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation submit"); @@ -24,6 +62,19 @@ public ResourceResult submit(final List resourceIDs) throws Faultexc } } + /** + * Uploads medical certificate data and related healthcare documents to the EDT system. + * + *

    This operation uploads one or more resources containing medical certificate information, + * supporting documents, and metadata to the EDT system. Uploaded resources are stored but not + * yet submitted to OHIP for processing. The submit operation must be called separately to + * finalize the submission.

    + * + * @param upload List of UploadData objects containing the resource data, metadata, and document content + * @return ResourceResult containing the upload status and assigned resource IDs for each uploaded item + * @throws Faultexception if the upload operation fails due to invalid data format, + * size limitations, or system errors + */ @Override public ResourceResult upload(final List upload) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation upload"); @@ -38,6 +89,19 @@ public ResourceResult upload(final List upload) throws Faultexceptio } } + /** + * Retrieves detailed information for specific resources by their identifiers. + * + *

    This operation queries the EDT system for comprehensive details about one or more resources, + * including their current status, metadata, submission history, and any processing results from OHIP. + * This is useful for tracking the lifecycle and current state of submitted medical certificates.

    + * + * @param resourceIDs List of BigInteger resource identifiers to retrieve information for + * @return Detail object containing comprehensive information about the requested resources, + * including status, metadata, and processing history + * @throws Faultexception if the info retrieval fails due to invalid resource IDs, + * authorization issues, or system errors + */ @Override public Detail info(final List resourceIDs) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation info"); @@ -52,6 +116,19 @@ public Detail info(final List resourceIDs) throws Faultexception { } } + /** + * Deletes resources from the EDT system. + * + *

    This operation removes one or more resources from the EDT system. Resources can typically only + * be deleted if they have not yet been submitted to OHIP, or if they are in a state that allows + * deletion according to OHIP business rules. Submitted resources that are in processing may not be + * deletable.

    + * + * @param resourceIDs List of BigInteger resource identifiers to delete + * @return ResourceResult containing the deletion status and outcome for each resource + * @throws Faultexception if the deletion fails due to invalid resource IDs, + * resources in non-deletable states, authorization issues, or system errors + */ @Override public ResourceResult delete(final List resourceIDs) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation delete"); @@ -66,6 +143,19 @@ public ResourceResult delete(final List resourceIDs) throws Faultexc } } + /** + * Downloads processed results and associated documents from OHIP for specified resources. + * + *

    This operation retrieves the processed results, status updates, and any response documents + * from OHIP for previously submitted resources. This is typically used to obtain confirmation receipts, + * processing results, or rejection notices from the Ministry of Health.

    + * + * @param resourceIDs List of BigInteger resource identifiers to download results for + * @return DownloadResult containing the processed data, documents, and status information + * for each requested resource + * @throws Faultexception if the download fails due to invalid resource IDs, resources not yet processed, + * authorization issues, or system errors + */ @Override public DownloadResult download(final List resourceIDs) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation download"); @@ -80,6 +170,19 @@ public DownloadResult download(final List resourceIDs) throws Faulte } } + /** + * Updates existing resources in the EDT system with new data or metadata. + * + *

    This operation modifies one or more existing resources with updated information. Resources can + * typically only be updated if they have not yet been submitted to OHIP, or if they are in a state + * that allows modification according to OHIP business rules. Changes to submitted resources may be + * restricted depending on their processing status.

    + * + * @param updates List of UpdateRequest objects containing the resource IDs and updated data + * @return ResourceResult containing the update status and outcome for each resource + * @throws Faultexception if the update fails due to invalid resource IDs, resources in non-updatable states, + * invalid update data, authorization issues, or system errors + */ @Override public ResourceResult update(final List updates) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation update"); @@ -94,6 +197,19 @@ public ResourceResult update(final List updates) throws Faultexce } } + /** + * Retrieves the list of valid resource types supported by the EDT system. + * + *

    This operation queries the EDT system for the current list of medical certificate types + * and document categories that can be submitted through the electronic data transfer system. + * The type list defines what kinds of medical certificates and healthcare documents are + * accepted by OHIP for electronic submission.

    + * + * @return TypeListResult containing the complete list of valid resource types, + * their codes, descriptions, and submission requirements + * @throws Faultexception if the type list retrieval fails due to system errors + * or connectivity issues + */ @Override public TypeListResult getTypeList() throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation getTypeList"); @@ -107,6 +223,23 @@ public TypeListResult getTypeList() throws Faultexception { } } + /** + * Retrieves a paginated list of resources filtered by type and status. + * + *

    This operation queries the EDT system for resources matching specified criteria, supporting + * pagination for large result sets. This is useful for browsing submitted medical certificates, + * monitoring submission status, and managing large volumes of healthcare documents.

    + * + * @param resourceType String specifying the type of resources to retrieve (must match a valid type + * from getTypeList) + * @param status ResourceStatus enumeration value filtering resources by their current processing status + * (e.g., uploaded, submitted, processed, rejected) + * @param pageNo BigInteger page number for pagination (typically starting from 1) + * @return Detail object containing the list of matching resources for the requested page, + * along with pagination metadata and total result count + * @throws Faultexception if the list operation fails due to invalid resource type, invalid page number, + * authorization issues, or system errors + */ @Override public Detail list(final String resourceType, final ResourceStatus status, final BigInteger pageNo) throws Faultexception { EDTDelegateImpl.LOG.info("Executing operation list"); diff --git a/src/main/java/ca/ontario/health/edt/EDTService.java b/src/main/java/ca/ontario/health/edt/EDTService.java index 35d99c767fd..c6a6c69e07f 100644 --- a/src/main/java/ca/ontario/health/edt/EDTService.java +++ b/src/main/java/ca/ontario/health/edt/EDTService.java @@ -10,30 +10,135 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS web service client for Ontario's Electronic Data Transfer (EDT) system. + * + * This service provides access to Ontario's Medical Certificate Electronic Data Transfer (MCEDT) + * system, which enables secure electronic submission of medical certificates and related healthcare + * documentation to the Ontario Health Insurance Plan (OHIP). The EDT system is part of Ontario's + * provincial healthcare integration infrastructure for healthcare providers. + * + * The service acts as a SOAP client wrapper around the EDT web service endpoint, handling the + * communication protocol and message formatting required for MCEDT submissions. It provides + * multiple constructor options for different initialization scenarios and supports JAX-WS features + * for advanced web service configuration. + * + *

    Healthcare Context: EDT is used by healthcare providers in Ontario to + * electronically submit various medical certificates including disability certificates, return-to-work + * certificates, and other healthcare documentation required by employers, insurance companies, and + * government agencies. This integration ensures compliance with Ontario's healthcare data exchange + * standards.

    + * + *

    Security: All EDT communications must be conducted over secure channels with + * appropriate authentication credentials as mandated by Ontario Health privacy regulations.

    + * + * @see EDTDelegate + * @see javax.xml.ws.Service + * @since 2026-01-24 + */ @WebServiceClient(name = "EDTService", wsdlLocation = "file:/home/oscara/mcedt/edt-stubs/src/main/resources/from_ohip_web_site/EDTService.wsdl", targetNamespace = "http://edt.health.ontario.ca/") public class EDTService extends Service { + /** + * The default WSDL location for the EDT service endpoint. + * Initialized from the OHIP web site WSDL definition. + */ public static final URL WSDL_LOCATION; + + /** + * The qualified name (QName) for the EDT web service. + * Namespace: http://edt.health.ontario.ca/ + */ public static final QName SERVICE; + + /** + * The qualified name (QName) for the EDT service port. + * Used to identify the specific endpoint for EDT operations. + */ public static final QName EDTPort; - + + /** + * Constructs an EDTService client with a custom WSDL location. + * + * This constructor allows overriding the default WSDL location, which is useful for + * testing environments or when connecting to alternative EDT service endpoints. + * The service name is fixed to the standard EDT service QName. + * + * @param wsdlLocation URL the URL pointing to the WSDL definition for the EDT service. + * Must be a valid URL pointing to an accessible WSDL document. + */ public EDTService(final URL wsdlLocation) { super(wsdlLocation, EDTService.SERVICE); } + /** + * Constructs an EDTService client with custom WSDL location and service name. + * + * This constructor provides maximum flexibility for configuring the EDT service client, + * allowing both the WSDL location and service qualified name to be customized. This is + * primarily used for advanced integration scenarios or when working with non-standard + * EDT service configurations. + * + * @param wsdlLocation URL the URL pointing to the WSDL definition for the EDT service. + * Must be a valid URL pointing to an accessible WSDL document. + * @param serviceName QName the qualified name identifying the specific web service. + * Must match the service name defined in the WSDL document. + */ public EDTService(final URL wsdlLocation, final QName serviceName) { super(wsdlLocation, serviceName); } + /** + * Constructs an EDTService client with default WSDL location and service name. + * + * This is the standard constructor for EDT service integration, using the default + * WSDL location obtained from OHIP's web site and the standard EDT service QName. + * This constructor should be used for normal production EDT operations in Ontario. + * + * The WSDL location is initialized from a static URL pointing to the official + * EDT service definition provided by Ontario Health. + */ public EDTService() { super(EDTService.WSDL_LOCATION, EDTService.SERVICE); } + /** + * Retrieves the EDT service port for executing electronic data transfer operations. + * + * This method returns a proxy object implementing the EDTDelegate interface, which provides + * access to all EDT web service operations for submitting medical certificates and related + * healthcare documentation to Ontario's MCEDT system. + * + * The returned delegate can be used to invoke EDT operations such as certificate submission, + * status queries, and document retrieval according to Ontario Health's EDT specifications. + * + * @return EDTDelegate a proxy instance for invoking EDT web service operations. + * The delegate is configured with the default endpoint and service settings. + */ @WebEndpoint(name = "EDTPort") public EDTDelegate getEDTPort() { return (EDTDelegate)super.getPort(EDTService.EDTPort, (Class)EDTDelegate.class); } + /** + * Retrieves the EDT service port with custom JAX-WS features enabled. + * + * This method returns a proxy object implementing the EDTDelegate interface with additional + * JAX-WS features configured. Features can include WS-Security settings, MTOM (Message + * Transmission Optimization Mechanism) for attachments, WS-Addressing, or other advanced + * SOAP web service capabilities required for specific EDT integration scenarios. + * + * Common use cases include enabling message-level security for PHI (Protected Health Information) + * transmission, configuring custom timeout values, or enabling specialized logging features + * for audit compliance in healthcare environments. + * + * @param features WebServiceFeature... variable-length array of JAX-WS features to enable + * on the service port. Features are applied in the order provided and affect + * all subsequent web service operations through this port. + * @return EDTDelegate a proxy instance for invoking EDT web service operations with the + * specified features enabled. The delegate is configured with the provided features + * in addition to default endpoint settings. + */ @WebEndpoint(name = "EDTPort") public EDTDelegate getEDTPort(final WebServiceFeature... features) { return (EDTDelegate)super.getPort(EDTService.EDTPort, (Class)EDTDelegate.class, features); diff --git a/src/main/java/ca/ontario/health/edt/ObjectFactory.java b/src/main/java/ca/ontario/health/edt/ObjectFactory.java index 9ffe65f3593..e284d5728f0 100644 --- a/src/main/java/ca/ontario/health/edt/ObjectFactory.java +++ b/src/main/java/ca/ontario/health/edt/ObjectFactory.java @@ -5,6 +5,26 @@ import javax.xml.namespace.QName; import javax.xml.bind.annotation.XmlRegistry; +/** + * JAXB ObjectFactory for Ontario Health EDT (Electronic Data Transfer) web service client. + * + *

    This factory class provides factory methods for creating instances of EDT schema-derived classes + * and JAXBElement-wrapped objects for XML marshalling and unmarshalling operations. The EDT service + * facilitates electronic data transfer for Ontario healthcare providers, supporting operations such as + * document upload, download, submission, listing, updating, and deletion.

    + * + *

    The factory creates both standalone object instances (via create* methods) and JAXBElement-wrapped + * instances for XML element declarations defined in the Ontario Health EDT namespace + * (http://edt.health.ontario.ca/).

    + * + *

    Healthcare Context: This class supports integration with Ontario's Electronic Data + * Transfer system, which is used for submitting and managing healthcare-related documents and data + * between EMR systems and Ontario Health services.

    + * + * @see javax.xml.bind.annotation.XmlRegistry + * @see JAXBElement + * @since 2026-01-24 + */ @XmlRegistry public class ObjectFactory { @@ -24,194 +44,478 @@ public class ObjectFactory private static final QName _Delete_QNAME; private static final QName _UpdateResponse_QNAME; private static final QName _DeleteResponse_QNAME; - + + /** + * Creates a new UploadResponse instance. + * + * @return UploadResponse a new instance for handling upload operation responses + */ public UploadResponse createUploadResponse() { return new UploadResponse(); } - + + /** + * Creates a new Upload instance. + * + * @return Upload a new instance for upload request operations + */ public Upload createUpload() { return new Upload(); } - + + /** + * Creates a new List instance. + * + * @return List a new instance for list request operations + */ public List createList() { return new List(); } - + + /** + * Creates a new ResponseResult instance. + * + * @return ResponseResult a new instance containing response result data + */ public ResponseResult createResponseResult() { return new ResponseResult(); } - + + /** + * Creates a new SubmitResponse instance. + * + * @return SubmitResponse a new instance for handling submit operation responses + */ public SubmitResponse createSubmitResponse() { return new SubmitResponse(); } - + + /** + * Creates a new GetTypeList instance. + * + * @return GetTypeList a new instance for retrieving available document types + */ public GetTypeList createGetTypeList() { return new GetTypeList(); } - + + /** + * Creates a new ResourceResult instance. + * + * @return ResourceResult a new instance containing resource result data + */ public ResourceResult createResourceResult() { return new ResourceResult(); } - + + /** + * Creates a new Detail instance. + * + * @return Detail a new instance for detail request operations + */ public Detail createDetail() { return new Detail(); } - + + /** + * Creates a new UploadData instance. + * + * @return UploadData a new instance containing upload data payload + */ public UploadData createUploadData() { return new UploadData(); } - + + /** + * Creates a new Delete instance. + * + * @return Delete a new instance for delete request operations + */ public Delete createDelete() { return new Delete(); } - + + /** + * Creates a new GetTypeListResponse instance. + * + * @return GetTypeListResponse a new instance for handling type list responses + */ public GetTypeListResponse createGetTypeListResponse() { return new GetTypeListResponse(); } - + + /** + * Creates a new Download instance. + * + * @return Download a new instance for download request operations + */ public Download createDownload() { return new Download(); } - + + /** + * Creates a new CsnData instance. + * + * @return CsnData a new instance containing CSN (Case Submission Number) data + */ public CsnData createCsnData() { return new CsnData(); } - + + /** + * Creates a new DownloadResponse instance. + * + * @return DownloadResponse a new instance for handling download operation responses + */ public DownloadResponse createDownloadResponse() { return new DownloadResponse(); } - + + /** + * Creates a new Info instance. + * + * @return Info a new instance for info request operations + */ public Info createInfo() { return new Info(); } - + + /** + * Creates a new InfoResponse instance. + * + * @return InfoResponse a new instance for handling info operation responses + */ public InfoResponse createInfoResponse() { return new InfoResponse(); } - + + /** + * Creates a new DetailData instance. + * + * @return DetailData a new instance containing detail data payload + */ public DetailData createDetailData() { return new DetailData(); } - + + /** + * Creates a new Update instance. + * + * @return Update a new instance for update request operations + */ public Update createUpdate() { return new Update(); } - + + /** + * Creates a new CommonResult instance. + * + * @return CommonResult a new instance containing common result data + */ public CommonResult createCommonResult() { return new CommonResult(); } - + + /** + * Creates a new DownloadResult instance. + * + * @return DownloadResult a new instance containing download result data + */ public DownloadResult createDownloadResult() { return new DownloadResult(); } - + + /** + * Creates a new TypeListData instance. + * + * @return TypeListData a new instance containing type list data payload + */ public TypeListData createTypeListData() { return new TypeListData(); } - + + /** + * Creates a new UpdateRequest instance. + * + * @return UpdateRequest a new instance for update request operations + */ public UpdateRequest createUpdateRequest() { return new UpdateRequest(); } - + + /** + * Creates a new TypeListResult instance. + * + * @return TypeListResult a new instance containing type list result data + */ public TypeListResult createTypeListResult() { return new TypeListResult(); } - + + /** + * Creates a new UpdateResponse instance. + * + * @return UpdateResponse a new instance for handling update operation responses + */ public UpdateResponse createUpdateResponse() { return new UpdateResponse(); } - + + /** + * Creates a new ListResponse instance. + * + * @return ListResponse a new instance for handling list operation responses + */ public ListResponse createListResponse() { return new ListResponse(); } - + + /** + * Creates a new DownloadData instance. + * + * @return DownloadData a new instance containing download data payload + */ public DownloadData createDownloadData() { return new DownloadData(); } - + + /** + * Creates a new Submit instance. + * + * @return Submit a new instance for submit request operations + */ public Submit createSubmit() { return new Submit(); } - + + /** + * Creates a new DeleteResponse instance. + * + * @return DeleteResponse a new instance for handling delete operation responses + */ public DeleteResponse createDeleteResponse() { return new DeleteResponse(); } - + + /** + * Creates a JAXBElement wrapper for an Info instance. + * + *

    This method creates a JAXBElement with the XML element name "info" in the EDT namespace, + * wrapping the provided Info object for XML marshalling operations.

    + * + * @param value Info the Info instance to wrap + * @return JAXBElement<Info> a JAXBElement wrapping the Info instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "info") public JAXBElement createInfo(final Info value) { return (JAXBElement)new JAXBElement(ObjectFactory._Info_QNAME, (Class)Info.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for an Upload instance. + * + *

    This method creates a JAXBElement with the XML element name "upload" in the EDT namespace, + * wrapping the provided Upload object for XML marshalling operations.

    + * + * @param value Upload the Upload instance to wrap + * @return JAXBElement<Upload> a JAXBElement wrapping the Upload instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "upload") public JAXBElement createUpload(final Upload value) { return (JAXBElement)new JAXBElement(ObjectFactory._Upload_QNAME, (Class)Upload.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a DownloadResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "downloadResponse" in the EDT namespace, + * wrapping the provided DownloadResponse object for XML marshalling operations.

    + * + * @param value DownloadResponse the DownloadResponse instance to wrap + * @return JAXBElement<DownloadResponse> a JAXBElement wrapping the DownloadResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "downloadResponse") public JAXBElement createDownloadResponse(final DownloadResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._DownloadResponse_QNAME, (Class)DownloadResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a Download instance. + * + *

    This method creates a JAXBElement with the XML element name "download" in the EDT namespace, + * wrapping the provided Download object for XML marshalling operations.

    + * + * @param value Download the Download instance to wrap + * @return JAXBElement<Download> a JAXBElement wrapping the Download instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "download") public JAXBElement createDownload(final Download value) { return (JAXBElement)new JAXBElement(ObjectFactory._Download_QNAME, (Class)Download.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a List instance. + * + *

    This method creates a JAXBElement with the XML element name "list" in the EDT namespace, + * wrapping the provided List object for XML marshalling operations.

    + * + * @param value List the List instance to wrap + * @return JAXBElement<List> a JAXBElement wrapping the List instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "list") public JAXBElement createList(final List value) { return (JAXBElement)new JAXBElement(ObjectFactory._List_QNAME, (Class)List.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a Submit instance. + * + *

    This method creates a JAXBElement with the XML element name "submit" in the EDT namespace, + * wrapping the provided Submit object for XML marshalling operations.

    + * + * @param value Submit the Submit instance to wrap + * @return JAXBElement<Submit> a JAXBElement wrapping the Submit instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "submit") public JAXBElement createSubmit(final Submit value) { return (JAXBElement)new JAXBElement(ObjectFactory._Submit_QNAME, (Class)Submit.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for an Update instance. + * + *

    This method creates a JAXBElement with the XML element name "update" in the EDT namespace, + * wrapping the provided Update object for XML marshalling operations.

    + * + * @param value Update the Update instance to wrap + * @return JAXBElement<Update> a JAXBElement wrapping the Update instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "update") public JAXBElement createUpdate(final Update value) { return (JAXBElement)new JAXBElement(ObjectFactory._Update_QNAME, (Class)Update.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for an InfoResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "infoResponse" in the EDT namespace, + * wrapping the provided InfoResponse object for XML marshalling operations.

    + * + * @param value InfoResponse the InfoResponse instance to wrap + * @return JAXBElement<InfoResponse> a JAXBElement wrapping the InfoResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "infoResponse") public JAXBElement createInfoResponse(final InfoResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._InfoResponse_QNAME, (Class)InfoResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a GetTypeList instance. + * + *

    This method creates a JAXBElement with the XML element name "getTypeList" in the EDT namespace, + * wrapping the provided GetTypeList object for XML marshalling operations.

    + * + * @param value GetTypeList the GetTypeList instance to wrap + * @return JAXBElement<GetTypeList> a JAXBElement wrapping the GetTypeList instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "getTypeList") public JAXBElement createGetTypeList(final GetTypeList value) { return (JAXBElement)new JAXBElement(ObjectFactory._GetTypeList_QNAME, (Class)GetTypeList.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for an UploadResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "uploadResponse" in the EDT namespace, + * wrapping the provided UploadResponse object for XML marshalling operations.

    + * + * @param value UploadResponse the UploadResponse instance to wrap + * @return JAXBElement<UploadResponse> a JAXBElement wrapping the UploadResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "uploadResponse") public JAXBElement createUploadResponse(final UploadResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._UploadResponse_QNAME, (Class)UploadResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a SubmitResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "submitResponse" in the EDT namespace, + * wrapping the provided SubmitResponse object for XML marshalling operations.

    + * + * @param value SubmitResponse the SubmitResponse instance to wrap + * @return JAXBElement<SubmitResponse> a JAXBElement wrapping the SubmitResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "submitResponse") public JAXBElement createSubmitResponse(final SubmitResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._SubmitResponse_QNAME, (Class)SubmitResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a GetTypeListResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "getTypeListResponse" in the EDT namespace, + * wrapping the provided GetTypeListResponse object for XML marshalling operations.

    + * + * @param value GetTypeListResponse the GetTypeListResponse instance to wrap + * @return JAXBElement<GetTypeListResponse> a JAXBElement wrapping the GetTypeListResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "getTypeListResponse") public JAXBElement createGetTypeListResponse(final GetTypeListResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._GetTypeListResponse_QNAME, (Class)GetTypeListResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a ListResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "listResponse" in the EDT namespace, + * wrapping the provided ListResponse object for XML marshalling operations.

    + * + * @param value ListResponse the ListResponse instance to wrap + * @return JAXBElement<ListResponse> a JAXBElement wrapping the ListResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "listResponse") public JAXBElement createListResponse(final ListResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._ListResponse_QNAME, (Class)ListResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a Delete instance. + * + *

    This method creates a JAXBElement with the XML element name "delete" in the EDT namespace, + * wrapping the provided Delete object for XML marshalling operations.

    + * + * @param value Delete the Delete instance to wrap + * @return JAXBElement<Delete> a JAXBElement wrapping the Delete instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "delete") public JAXBElement createDelete(final Delete value) { return (JAXBElement)new JAXBElement(ObjectFactory._Delete_QNAME, (Class)Delete.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for an UpdateResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "updateResponse" in the EDT namespace, + * wrapping the provided UpdateResponse object for XML marshalling operations.

    + * + * @param value UpdateResponse the UpdateResponse instance to wrap + * @return JAXBElement<UpdateResponse> a JAXBElement wrapping the UpdateResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "updateResponse") public JAXBElement createUpdateResponse(final UpdateResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._UpdateResponse_QNAME, (Class)UpdateResponse.class, (Class)null, (Object)value); } - + + /** + * Creates a JAXBElement wrapper for a DeleteResponse instance. + * + *

    This method creates a JAXBElement with the XML element name "deleteResponse" in the EDT namespace, + * wrapping the provided DeleteResponse object for XML marshalling operations.

    + * + * @param value DeleteResponse the DeleteResponse instance to wrap + * @return JAXBElement<DeleteResponse> a JAXBElement wrapping the DeleteResponse instance + */ @XmlElementDecl(namespace = "http://edt.health.ontario.ca/", name = "deleteResponse") public JAXBElement createDeleteResponse(final DeleteResponse value) { return (JAXBElement)new JAXBElement(ObjectFactory._DeleteResponse_QNAME, (Class)DeleteResponse.class, (Class)null, (Object)value); diff --git a/src/main/java/ca/ontario/health/hcv/HCValidationImpl.java b/src/main/java/ca/ontario/health/hcv/HCValidationImpl.java index d9f28c0241e..9d74539499a 100644 --- a/src/main/java/ca/ontario/health/hcv/HCValidationImpl.java +++ b/src/main/java/ca/ontario/health/hcv/HCValidationImpl.java @@ -3,11 +3,95 @@ import java.util.logging.Logger; import javax.jws.WebService; +/** + * Implementation of the Health Card Validation (HCV) web service for Ontario. + * + *

    This class provides the SOAP web service implementation for validating Ontario health card + * numbers (Health Insurance Numbers - HINs) through the Ministry of Health and Long-Term Care's + * HCV service. The service validates health card information in real-time by communicating with + * Ontario's provincial health insurance database.

    + * + *

    The HCV service is part of Ontario's Medical Certificate Electronic Data Transfer (MCEDT) + * initiative, which enables healthcare providers to electronically verify patient health card + * validity, demographics, and coverage status. This helps reduce billing errors and ensures + * accurate patient identification.

    + * + *

    Healthcare Context:

    + *
      + *
    • Validates Ontario Health Insurance Plan (OHIP) health card numbers
    • + *
    • Verifies patient eligibility and coverage status
    • + *
    • Returns validation results including patient demographics when authorized
    • + *
    • Supports bilingual validation (English and French) via locale parameter
    • + *
    + * + *

    Web Service Configuration:

    + *
      + *
    • Service Name: HCValidationService
    • + *
    • Port Name: HCValidationPort.1
    • + *
    • Namespace: http://hcv.health.ontario.ca/
    • + *
    • Protocol: SOAP 1.1/1.2
    • + *
    + * + * @see HCValidation + * @see HCValidationService + * @see ca.openosp.openo.integration.mchcv.HCValidationFactory + * @since 2026-01-24 + */ @WebService(serviceName = "HCValidationService", portName = "HCValidationPort.1", targetNamespace = "http://hcv.health.ontario.ca/", wsdlLocation = "file:/home/oscara/mcedt/hcv-stubs/src/main/resources/from_ohip_web_site/HCValidationService.wsdl", endpointInterface = "ca.ontario.health.hcv.HCValidation") public class HCValidationImpl implements HCValidation { private static final Logger LOG; - + + /** + * Validates Ontario health card information through the provincial HCV service. + * + *

    This method processes health card validation requests by communicating with Ontario's + * Ministry of Health and Long-Term Care database. It verifies health card numbers (HINs), + * checks patient eligibility, and returns validation results including demographic information + * when the healthcare provider is authorized to access such data.

    + * + *

    Validation Process:

    + *
      + *
    1. Receives health card validation request(s) from the client system
    2. + *
    3. Logs the validation operation for audit purposes
    4. + *
    5. Communicates with Ontario's HCV service endpoint
    6. + *
    7. Returns validation results including status codes and messages
    8. + *
    + * + *

    Request Information:

    + *
      + *
    • Health card number (10-digit HIN)
    • + *
    • Version code (2-character code)
    • + *
    • Healthcare provider credentials
    • + *
    • Optional: Patient date of birth for enhanced validation
    • + *
    + * + *

    Response Information:

    + *
      + *
    • Validation status (valid, invalid, expired, etc.)
    • + *
    • Coverage status and effective dates
    • + *
    • Patient demographics (when authorized)
    • + *
    • Error codes and messages for troubleshooting
    • + *
    + * + *

    Security and Privacy:

    + *

    This service handles Protected Health Information (PHI) and must comply with Ontario's + * Personal Health Information Protection Act (PHIPA). Access is restricted to authorized + * healthcare providers with valid credentials. All validation requests are logged for + * audit purposes.

    + * + * @param requests {@link Requests} object containing one or more health card validation requests + * with HIN, version code, and provider credentials + * @param locale {@link String} language preference for validation messages ("en" for English, + * "fr" for French); determines the language of error messages and status text + * returned in the validation results + * @return {@link HcvResults} object containing validation outcomes for each request, including + * validation status, coverage information, patient demographics (when authorized), + * and any error or warning messages + * @throws Faultexception if the validation service encounters an error such as invalid + * credentials, service unavailability, malformed requests, or + * communication failures with the provincial HCV endpoint + */ @Override public HcvResults validate(final Requests requests, final String locale) throws Faultexception { HCValidationImpl.LOG.info("Executing operation validate"); diff --git a/src/main/java/ca/ontario/health/hcv/HCValidationService.java b/src/main/java/ca/ontario/health/hcv/HCValidationService.java index b564c021749..fd592945630 100644 --- a/src/main/java/ca/ontario/health/hcv/HCValidationService.java +++ b/src/main/java/ca/ontario/health/hcv/HCValidationService.java @@ -10,6 +10,31 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS client service for Ontario Health Card (HC) Validation. + * + *

    This service provides integration with the Ontario Health Insurance Plan (OHIP) + * Health Card Validation web service. It enables real-time validation of Ontario + * health card numbers to verify patient eligibility and coverage status.

    + * + *

    The service supports multiple endpoint versions (Port.0 and Port.1) to maintain + * backward compatibility with different versions of the OHIP validation service.

    + * + *

    Healthcare Context: This service is critical for verifying patient + * eligibility before providing medical services in Ontario. It helps ensure that:

    + *
      + *
    • Health Insurance Numbers (HINs) are valid and active
    • + *
    • Patient coverage is current and not expired
    • + *
    • Billing can be processed correctly through Ontario's healthcare system
    • + *
    + * + *

    Provincial Integration: This is an Ontario-specific service that + * integrates with provincial healthcare infrastructure. It is part of the Medical + * Certificate Electronic Data Transfer (MCEDT) system.

    + * + * @see HCValidation + * @since 2026-01-24 + */ @WebServiceClient(name = "HCValidationService", wsdlLocation = "file:/home/oscara/mcedt/hcv-stubs/src/main/resources/from_ohip_web_site/HCValidationService.wsdl", targetNamespace = "http://hcv.health.ontario.ca/") public class HCValidationService extends Service { @@ -17,34 +42,114 @@ public class HCValidationService extends Service public static final QName SERVICE; public static final QName HCValidationPort1; public static final QName HCValidationPort0; - + + /** + * Constructs a new HCValidationService with a custom WSDL location. + * + *

    This constructor allows specifying a custom location for the WSDL file, + * which can be useful for testing or when the WSDL is hosted at a different + * location than the default.

    + * + * @param wsdlLocation URL the location of the WSDL file describing the service + */ public HCValidationService(final URL wsdlLocation) { super(wsdlLocation, HCValidationService.SERVICE); } - + + /** + * Constructs a new HCValidationService with custom WSDL location and service name. + * + *

    This constructor provides full control over both the WSDL location and the + * qualified service name, allowing for maximum flexibility in service configuration.

    + * + * @param wsdlLocation URL the location of the WSDL file describing the service + * @param serviceName QName the qualified name of the service + */ public HCValidationService(final URL wsdlLocation, final QName serviceName) { super(wsdlLocation, serviceName); } - + + /** + * Constructs a new HCValidationService with default WSDL location and service name. + * + *

    This is the recommended constructor for normal usage. It uses the default + * WSDL location configured for the Ontario OHIP Health Card Validation Service.

    + * + *

    The default WSDL location is loaded from the static initializer and points to + * the official OHIP web service endpoint.

    + */ public HCValidationService() { super(HCValidationService.WSDL_LOCATION, HCValidationService.SERVICE); } - + + /** + * Retrieves the Health Card Validation endpoint (version 1). + * + *

    This method returns a proxy to the HCValidation web service endpoint, + * configured for version 1 of the service port. This port represents the + * current/newer version of the validation service API.

    + * + *

    Usage: Call methods on the returned HCValidation interface + * to validate health card numbers against the OHIP database.

    + * + * @return HCValidation a proxy instance for the Health Card Validation service endpoint + */ @WebEndpoint(name = "HCValidationPort.1") public HCValidation getHCValidationPort1() { return (HCValidation)super.getPort(HCValidationService.HCValidationPort1, (Class)HCValidation.class); } - + + /** + * Retrieves the Health Card Validation endpoint (version 1) with custom web service features. + * + *

    This method returns a proxy to the HCValidation web service endpoint with + * additional JAX-WS features enabled. Features can include MTOM (Message Transmission + * Optimization Mechanism), addressing, or other WS-* specifications.

    + * + *

    Advanced Usage: This overloaded method allows fine-grained + * control over the web service client configuration.

    + * + * @param features WebServiceFeature[] variable-length array of JAX-WS features to enable + * @return HCValidation a proxy instance for the Health Card Validation service endpoint + */ @WebEndpoint(name = "HCValidationPort.1") public HCValidation getHCValidationPort1(final WebServiceFeature... features) { return (HCValidation)super.getPort(HCValidationService.HCValidationPort1, (Class)HCValidation.class, features); } - + + /** + * Retrieves the Health Card Validation endpoint (version 0). + * + *

    This method returns a proxy to the HCValidation web service endpoint, + * configured for version 0 of the service port. This port represents the + * legacy/older version of the validation service API maintained for backward + * compatibility.

    + * + *

    Note: Use this method only when integration with older + * OHIP validation service versions is required. New implementations should + * prefer {@link #getHCValidationPort1()}.

    + * + * @return HCValidation a proxy instance for the Health Card Validation service endpoint + */ @WebEndpoint(name = "HCValidationPort.0") public HCValidation getHCValidationPort0() { return (HCValidation)super.getPort(HCValidationService.HCValidationPort0, (Class)HCValidation.class); } - + + /** + * Retrieves the Health Card Validation endpoint (version 0) with custom web service features. + * + *

    This method returns a proxy to the HCValidation web service endpoint with + * additional JAX-WS features enabled. This is the legacy service port with + * customizable features for advanced configuration.

    + * + *

    Note: Use this method only when integration with older + * OHIP validation service versions is required and custom JAX-WS features are + * needed. New implementations should prefer {@link #getHCValidationPort1(WebServiceFeature...)}.

    + * + * @param features WebServiceFeature[] variable-length array of JAX-WS features to enable + * @return HCValidation a proxy instance for the Health Card Validation service endpoint + */ @WebEndpoint(name = "HCValidationPort.0") public HCValidation getHCValidationPort0(final WebServiceFeature... features) { return (HCValidation)super.getPort(HCValidationService.HCValidationPort0, (Class)HCValidation.class, features); diff --git a/src/main/java/ca/openosp/openo/PMmodule/service/ProgramProviderService.java b/src/main/java/ca/openosp/openo/PMmodule/service/ProgramProviderService.java index a4775e9909d..c0158ca0a66 100644 --- a/src/main/java/ca/openosp/openo/PMmodule/service/ProgramProviderService.java +++ b/src/main/java/ca/openosp/openo/PMmodule/service/ProgramProviderService.java @@ -5,11 +5,36 @@ import org.springframework.transaction.annotation.Transactional; import ca.openosp.openo.PMmodule.dao.ProgramProviderDAO; +/** + * Service layer for managing program provider associations in the OpenO EMR Program Management module. + * + *

    This service provides transactional business logic for program provider operations, acting as an + * intermediary between the web layer and the data access layer. Program providers represent healthcare + * providers who are associated with specific programs within the healthcare facility, enabling program-based + * access control and workflow management.

    + * + *

    The service ensures proper transaction management for program provider operations and delegates + * data access to the {@link ProgramProviderDAO}.

    + * + * @see ProgramProviderDAO + * @see ca.openosp.openo.PMmodule.model.ProgramProvider + * @since 2026-01-24 + */ @Service public class ProgramProviderService { @Autowired private ProgramProviderDAO programProviderDao; + /** + * Deletes a program provider association by its unique identifier. + * + *

    This method removes a provider's association with a specific program. The operation is + * executed within a write transaction to ensure data consistency. This is typically used when + * a healthcare provider is being removed from a program or when cleaning up program assignments.

    + * + * @param id Long the unique identifier of the program provider association to delete + * @throws org.springframework.dao.DataAccessException if the database operation fails + */ @Transactional(readOnly = false) public void deleteProgramProvider(Long id) { programProviderDao.deleteProgramProvider(id); diff --git a/src/main/java/ca/openosp/openo/PMmodule/web/ClientManager2Action.java b/src/main/java/ca/openosp/openo/PMmodule/web/ClientManager2Action.java index 85ca135b5ab..b1daf6e33fe 100644 --- a/src/main/java/ca/openosp/openo/PMmodule/web/ClientManager2Action.java +++ b/src/main/java/ca/openosp/openo/PMmodule/web/ClientManager2Action.java @@ -44,7 +44,7 @@ import ca.openosp.openo.commn.model.*; import ca.openosp.openo.util.DateUtils; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; @@ -559,7 +559,7 @@ else if (r.getRemoteFacilityId() != null && r.getRemoteProgramId() != null) { p.setName(cachedProgram.getName()); Program program = new Program(); - BeanUtils.copyProperties(program, cachedProgram); + BeanUtils.copyProperties(cachedProgram, program); request.setAttribute("program", program); } catch (Exception e) { @@ -602,7 +602,7 @@ else if (r.getRemoteFacilityId() != null && r.getRemoteProgramId() != null) { p.setName(cachedProgram.getName()); Program program = new Program(); - BeanUtils.copyProperties(program, cachedProgram); + BeanUtils.copyProperties(cachedProgram, program); request.setAttribute("program", program); } catch (Exception e) { diff --git a/src/main/java/ca/openosp/openo/PMmodule/web/reports/custom/UCRConfigurationManager.java b/src/main/java/ca/openosp/openo/PMmodule/web/reports/custom/UCRConfigurationManager.java index 4262cac2924..fe057905e10 100644 --- a/src/main/java/ca/openosp/openo/PMmodule/web/reports/custom/UCRConfigurationManager.java +++ b/src/main/java/ca/openosp/openo/PMmodule/web/reports/custom/UCRConfigurationManager.java @@ -25,7 +25,7 @@ import java.io.File; -import org.apache.commons.digester.Digester; +import org.apache.commons.digester3.Digester; import org.apache.logging.log4j.Logger; import ca.openosp.openo.utility.MiscUtils; diff --git a/src/main/java/ca/openosp/openo/appt/status/service/impl/AppointmentStatusMgrImpl.java b/src/main/java/ca/openosp/openo/appt/status/service/impl/AppointmentStatusMgrImpl.java index fdfc06e23cb..9563c8616a2 100644 --- a/src/main/java/ca/openosp/openo/appt/status/service/impl/AppointmentStatusMgrImpl.java +++ b/src/main/java/ca/openosp/openo/appt/status/service/impl/AppointmentStatusMgrImpl.java @@ -24,9 +24,9 @@ package ca.openosp.openo.appt.status.service.impl; import java.util.Collections; +import java.util.Comparator; import java.util.List; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.commn.dao.AppointmentStatusDao; import ca.openosp.openo.commn.model.AppointmentStatus; import ca.openosp.openo.utility.SpringUtils; @@ -53,7 +53,7 @@ public static List getCachedActiveStatuses() { @SuppressWarnings("unchecked") public static synchronized void setCachedActiveStatuses(List cachedActiveStatuses) { - Collections.sort(cachedActiveStatuses, new BeanComparator("id")); + Collections.sort(cachedActiveStatuses, Comparator.comparing(AppointmentStatus::getId)); AppointmentStatusMgrImpl.cachedActiveStatuses = cachedActiveStatuses; } diff --git a/src/main/java/ca/openosp/openo/ar2005/AR1.java b/src/main/java/ca/openosp/openo/ar2005/AR1.java index bbb9ac66952..84c06975218 100644 --- a/src/main/java/ca/openosp/openo/ar2005/AR1.java +++ b/src/main/java/ca/openosp/openo/ar2005/AR1.java @@ -20,216 +20,748 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * AR1 (Antenatal Record 1) - British Columbia Antenatal Record form interface. + * + * This interface represents the primary antenatal record (BCAR) form used in British Columbia + * for comprehensive pregnancy care documentation. It extends XmlObject to provide XML-based + * serialization and deserialization capabilities for storing and exchanging antenatal care data. + * + * The AR1 form captures critical pregnancy information including: + *
      + *
    • Patient demographic and identification information
    • + *
    • Partner information for family history and support tracking
    • + *
    • Healthcare practitioner details and care provider assignments
    • + *
    • Complete pregnancy history including previous pregnancies and outcomes
    • + *
    • Obstetrical history with previous delivery and complication records
    • + *
    • Comprehensive medical history and physical examination findings
    • + *
    • Initial laboratory investigations and diagnostic test results
    • + *
    • Clinical comments and additional documentation notes
    • + *
    • Provider signatures for regulatory compliance and audit trails
    • + *
    + * + * This form is part of the standardized medical forms used across BC healthcare facilities + * to ensure consistent, high-quality prenatal care documentation. All data is stored in + * compliance with PIPEDA privacy regulations for protected health information (PHI). + * + * @see PatientInformation + * @see PartnerInformation + * @see PractitionerInformation + * @see PregnancyHistory + * @see ObstetricalHistory + * @see MedicalHistoryAndPhysicalExam + * @see InitialLaboratoryInvestigations + * @see SignatureType + * + * @since 2026-01-24 + */ public interface AR1 extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(AR1.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("ar15fa5type"); - + + /** + * Gets the unique identifier for this AR1 form record. + * + * @return int the unique form identifier + */ int getId(); - + + /** + * Gets the unique identifier as an XmlInt object for XML serialization. + * + * @return XmlInt the form identifier as XML integer type + */ XmlInt xgetId(); - + + /** + * Sets the unique identifier for this AR1 form record. + * + * @param p0 int the unique form identifier to set + */ void setId(final int p0); - + + /** + * Sets the unique identifier using an XmlInt object for XML deserialization. + * + * @param p0 XmlInt the form identifier as XML integer type + */ void xsetId(final XmlInt p0); - + + /** + * Gets the version identifier for form revision tracking. + * Used to track different versions of the same AR1 record across edits. + * + * @return int the version identifier + */ int getVersionID(); - + + /** + * Gets the version identifier as an XmlInt object for XML serialization. + * + * @return XmlInt the version identifier as XML integer type + */ XmlInt xgetVersionID(); - + + /** + * Sets the version identifier for form revision tracking. + * + * @param p0 int the version identifier to set + */ void setVersionID(final int p0); - + + /** + * Sets the version identifier using an XmlInt object for XML deserialization. + * + * @param p0 XmlInt the version identifier as XML integer type + */ void xsetVersionID(final XmlInt p0); - + + /** + * Gets the episode identifier linking this form to a specific care episode. + * Episodes group related encounters and forms for continuity of care tracking. + * + * @return int the episode identifier + */ int getEpisodeId(); - + + /** + * Gets the episode identifier as an XmlInt object for XML serialization. + * + * @return XmlInt the episode identifier as XML integer type + */ XmlInt xgetEpisodeId(); - + + /** + * Sets the episode identifier linking this form to a specific care episode. + * + * @param p0 int the episode identifier to set + */ void setEpisodeId(final int p0); - + + /** + * Sets the episode identifier using an XmlInt object for XML deserialization. + * + * @param p0 XmlInt the episode identifier as XML integer type + */ void xsetEpisodeId(final XmlInt p0); - + + /** + * Gets the demographic number (patient identifier) for the pregnant patient. + * This links the antenatal record to the patient's demographic information. + * + * @return int the patient's demographic number + */ int getDemographicNo(); - + + /** + * Gets the demographic number as an XmlInt object for XML serialization. + * + * @return XmlInt the demographic number as XML integer type + */ XmlInt xgetDemographicNo(); - + + /** + * Sets the demographic number (patient identifier) for the pregnant patient. + * + * @param p0 int the patient's demographic number to set + */ void setDemographicNo(final int p0); - + + /** + * Sets the demographic number using an XmlInt object for XML deserialization. + * + * @param p0 XmlInt the demographic number as XML integer type + */ void xsetDemographicNo(final XmlInt p0); - + + /** + * Gets the provider number identifying the healthcare practitioner responsible for this record. + * + * @return String the provider's unique identifier + */ String getProviderNo(); - + + /** + * Gets the provider number as an XmlString object for XML serialization. + * + * @return XmlString the provider number as XML string type + */ XmlString xgetProviderNo(); - + + /** + * Sets the provider number identifying the healthcare practitioner. + * + * @param p0 String the provider's unique identifier to set + */ void setProviderNo(final String p0); - + + /** + * Sets the provider number using an XmlString object for XML deserialization. + * + * @param p0 XmlString the provider number as XML string type + */ void xsetProviderNo(final XmlString p0); - + + /** + * Gets the date and time when this AR1 form was originally created. + * + * @return Calendar the form creation timestamp + */ Calendar getFormCreated(); - + + /** + * Gets the form creation date as an XmlDate object for XML serialization. + * + * @return XmlDate the creation date as XML date type + */ XmlDate xgetFormCreated(); - + + /** + * Sets the date and time when this AR1 form was originally created. + * + * @param p0 Calendar the form creation timestamp to set + */ void setFormCreated(final Calendar p0); - + + /** + * Sets the form creation date using an XmlDate object for XML deserialization. + * + * @param p0 XmlDate the creation date as XML date type + */ void xsetFormCreated(final XmlDate p0); - + + /** + * Gets the date and time of the most recent edit to this AR1 form. + * Used for audit trails and tracking form modifications. + * + * @return Calendar the last edit timestamp + */ Calendar getFormEdited(); - + + /** + * Gets the last edit timestamp as an XmlDateTime object for XML serialization. + * + * @return XmlDateTime the edit timestamp as XML datetime type + */ XmlDateTime xgetFormEdited(); - + + /** + * Sets the date and time of the most recent edit to this AR1 form. + * + * @param p0 Calendar the last edit timestamp to set + */ void setFormEdited(final Calendar p0); - + + /** + * Sets the last edit timestamp using an XmlDateTime object for XML deserialization. + * + * @param p0 XmlDateTime the edit timestamp as XML datetime type + */ void xsetFormEdited(final XmlDateTime p0); - + + /** + * Gets the patient information section containing demographic and contact details. + * This includes the pregnant patient's name, date of birth, address, and other + * identifying information required for the antenatal record. + * + * @return PatientInformation the patient information section + */ PatientInformation getPatientInformation(); - + + /** + * Sets the patient information section. + * + * @param p0 PatientInformation the patient information section to set + */ void setPatientInformation(final PatientInformation p0); - + + /** + * Creates and adds a new patient information section to this AR1 form. + * + * @return PatientInformation the newly created patient information section + */ PatientInformation addNewPatientInformation(); - + + /** + * Gets the partner information section containing details about the patient's partner. + * This includes partner's name, contact information, and relevant family history + * for genetic counseling and support planning. + * + * @return PartnerInformation the partner information section + */ PartnerInformation getPartnerInformation(); - + + /** + * Sets the partner information section. + * + * @param p0 PartnerInformation the partner information section to set + */ void setPartnerInformation(final PartnerInformation p0); - + + /** + * Creates and adds a new partner information section to this AR1 form. + * + * @return PartnerInformation the newly created partner information section + */ PartnerInformation addNewPartnerInformation(); - + + /** + * Gets the practitioner information section containing healthcare provider details. + * This includes the primary care provider, obstetrician, and other healthcare + * professionals involved in the patient's antenatal care. + * + * @return PractitionerInformation the practitioner information section + */ PractitionerInformation getPractitionerInformation(); - + + /** + * Sets the practitioner information section. + * + * @param p0 PractitionerInformation the practitioner information section to set + */ void setPractitionerInformation(final PractitionerInformation p0); - + + /** + * Creates and adds a new practitioner information section to this AR1 form. + * + * @return PractitionerInformation the newly created practitioner information section + */ PractitionerInformation addNewPractitionerInformation(); - + + /** + * Gets the pregnancy history section containing information about current pregnancy. + * This includes estimated due date, dating methods, pregnancy symptoms, and + * current pregnancy progression details. + * + * @return PregnancyHistory the pregnancy history section + */ PregnancyHistory getPregnancyHistory(); - + + /** + * Sets the pregnancy history section. + * + * @param p0 PregnancyHistory the pregnancy history section to set + */ void setPregnancyHistory(final PregnancyHistory p0); - + + /** + * Creates and adds a new pregnancy history section to this AR1 form. + * + * @return PregnancyHistory the newly created pregnancy history section + */ PregnancyHistory addNewPregnancyHistory(); - + + /** + * Gets the obstetrical history section containing past pregnancy and delivery records. + * This includes gravida/para status, previous pregnancy outcomes, complications, + * delivery methods, and birth weights for risk assessment. + * + * @return ObstetricalHistory the obstetrical history section + */ ObstetricalHistory getObstetricalHistory(); - + + /** + * Sets the obstetrical history section. + * + * @param p0 ObstetricalHistory the obstetrical history section to set + */ void setObstetricalHistory(final ObstetricalHistory p0); - + + /** + * Creates and adds a new obstetrical history section to this AR1 form. + * + * @return ObstetricalHistory the newly created obstetrical history section + */ ObstetricalHistory addNewObstetricalHistory(); - + + /** + * Gets the medical history and physical examination section. + * This includes comprehensive medical history, current medications, allergies, + * family history, physical examination findings, and baseline vital signs. + * + * @return MedicalHistoryAndPhysicalExam the medical history and physical exam section + */ MedicalHistoryAndPhysicalExam getMedicalHistoryAndPhysicalExam(); - + + /** + * Sets the medical history and physical examination section. + * + * @param p0 MedicalHistoryAndPhysicalExam the medical history and physical exam section to set + */ void setMedicalHistoryAndPhysicalExam(final MedicalHistoryAndPhysicalExam p0); - + + /** + * Creates and adds a new medical history and physical examination section to this AR1 form. + * + * @return MedicalHistoryAndPhysicalExam the newly created medical history and physical exam section + */ MedicalHistoryAndPhysicalExam addNewMedicalHistoryAndPhysicalExam(); - + + /** + * Gets the initial laboratory investigations section containing baseline test results. + * This includes blood type, Rh factor, antibody screens, infectious disease screening, + * genetic testing results, and other routine prenatal laboratory investigations. + * + * @return InitialLaboratoryInvestigations the initial laboratory investigations section + */ InitialLaboratoryInvestigations getInitialLaboratoryInvestigations(); - + + /** + * Sets the initial laboratory investigations section. + * + * @param p0 InitialLaboratoryInvestigations the initial laboratory investigations section to set + */ void setInitialLaboratoryInvestigations(final InitialLaboratoryInvestigations p0); - + + /** + * Creates and adds a new initial laboratory investigations section to this AR1 form. + * + * @return InitialLaboratoryInvestigations the newly created initial laboratory investigations section + */ InitialLaboratoryInvestigations addNewInitialLaboratoryInvestigations(); - + + /** + * Gets the primary comments field for clinical notes and observations. + * This field is used for documenting additional clinical information, care plans, + * and other notes relevant to the patient's antenatal care. + * + * @return String the clinical comments text + */ String getComments(); - + + /** + * Gets the comments as an XmlString object for XML serialization. + * + * @return XmlString the comments as XML string type + */ XmlString xgetComments(); - + + /** + * Sets the primary comments field for clinical notes. + * + * @param p0 String the clinical comments text to set + */ void setComments(final String p0); - + + /** + * Sets the comments using an XmlString object for XML deserialization. + * + * @param p0 XmlString the comments as XML string type + */ void xsetComments(final XmlString p0); - + + /** + * Gets the extra comments field for supplementary clinical documentation. + * This field provides additional space for extended notes beyond the primary + * comments section when more detailed documentation is required. + * + * @return String the extra comments text + */ String getExtraComments(); - + + /** + * Gets the extra comments as an XmlString object for XML serialization. + * + * @return XmlString the extra comments as XML string type + */ XmlString xgetExtraComments(); - + + /** + * Sets the extra comments field for supplementary documentation. + * + * @param p0 String the extra comments text to set + */ void setExtraComments(final String p0); - + + /** + * Sets the extra comments using an XmlString object for XML deserialization. + * + * @param p0 XmlString the extra comments as XML string type + */ void xsetExtraComments(final XmlString p0); - + + /** + * Gets the signatures section containing provider signatures for regulatory compliance. + * This includes electronic or digital signatures from healthcare providers who + * reviewed and approved the antenatal record for audit trail purposes. + * + * @return SignatureType the signatures section + */ SignatureType getSignatures(); - + + /** + * Sets the signatures section. + * + * @param p0 SignatureType the signatures section to set + */ void setSignatures(final SignatureType p0); - + + /** + * Creates and adds a new signatures section to this AR1 form. + * + * @return SignatureType the newly created signatures section + */ SignatureType addNewSignatures(); - + + /** + * Factory class for creating and parsing AR1 instances. + * + * This factory provides static methods for instantiating new AR1 objects and + * parsing AR1 data from various XML sources including strings, files, streams, + * and DOM nodes. All parsing methods support optional XmlOptions for customizing + * XML processing behavior such as validation, namespace handling, and error reporting. + */ public static final class Factory { + /** + * Creates a new empty AR1 instance with default XML options. + * + * @return AR1 a new AR1 instance + */ public static AR1 newInstance() { return (AR1)XmlBeans.getContextTypeLoader().newInstance(AR1.type, (XmlOptions)null); } - + + /** + * Creates a new empty AR1 instance with custom XML options. + * + * @param options XmlOptions for customizing XML processing behavior + * @return AR1 a new AR1 instance + */ public static AR1 newInstance(final XmlOptions options) { return (AR1)XmlBeans.getContextTypeLoader().newInstance(AR1.type, options); } - + + /** + * Parses an AR1 instance from an XML string with default options. + * + * @param xmlAsString String containing the XML representation of an AR1 form + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AR1 parse(final String xmlAsString) throws XmlException { return (AR1)XmlBeans.getContextTypeLoader().parse(xmlAsString, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from an XML string with custom options. + * + * @param xmlAsString String containing the XML representation of an AR1 form + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AR1 parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (AR1)XmlBeans.getContextTypeLoader().parse(xmlAsString, AR1.type, options); } - + + /** + * Parses an AR1 instance from an XML file with default options. + * + * @param file File containing the XML representation of an AR1 form + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading the file + */ public static AR1 parse(final File file) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(file, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from an XML file with custom options. + * + * @param file File containing the XML representation of an AR1 form + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading the file + */ public static AR1 parse(final File file, final XmlOptions options) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(file, AR1.type, options); } - + + /** + * Parses an AR1 instance from a URL with default options. + * + * @param u URL pointing to the XML representation of an AR1 form + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error accessing the URL + */ public static AR1 parse(final URL u) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(u, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from a URL with custom options. + * + * @param u URL pointing to the XML representation of an AR1 form + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error accessing the URL + */ public static AR1 parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(u, AR1.type, options); } - + + /** + * Parses an AR1 instance from an input stream with default options. + * + * @param is InputStream containing the XML representation of an AR1 form + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading the stream + */ public static AR1 parse(final InputStream is) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(is, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from an input stream with custom options. + * + * @param is InputStream containing the XML representation of an AR1 form + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading the stream + */ public static AR1 parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(is, AR1.type, options); } - + + /** + * Parses an AR1 instance from a character reader with default options. + * + * @param r Reader containing the XML representation of an AR1 form + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the reader + */ public static AR1 parse(final Reader r) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(r, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from a character reader with custom options. + * + * @param r Reader containing the XML representation of an AR1 form + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the reader + */ public static AR1 parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (AR1)XmlBeans.getContextTypeLoader().parse(r, AR1.type, options); } - + + /** + * Parses an AR1 instance from an XML stream reader with default options. + * + * @param sr XMLStreamReader positioned at the AR1 XML content + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AR1 parse(final XMLStreamReader sr) throws XmlException { return (AR1)XmlBeans.getContextTypeLoader().parse(sr, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from an XML stream reader with custom options. + * + * @param sr XMLStreamReader positioned at the AR1 XML content + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AR1 parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (AR1)XmlBeans.getContextTypeLoader().parse(sr, AR1.type, options); } - + + /** + * Parses an AR1 instance from a DOM node with default options. + * + * @param node Node containing the AR1 XML document or element + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AR1 parse(final Node node) throws XmlException { return (AR1)XmlBeans.getContextTypeLoader().parse(node, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from a DOM node with custom options. + * + * @param node Node containing the AR1 XML document or element + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AR1 parse(final Node node, final XmlOptions options) throws XmlException { return (AR1)XmlBeans.getContextTypeLoader().parse(node, AR1.type, options); } - + + /** + * Parses an AR1 instance from an XMLInputStream with default options. + * + * @deprecated Use {@link #parse(InputStream)} or {@link #parse(XMLStreamReader)} instead + * @param xis XMLInputStream containing the AR1 XML content + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error processing the XML stream + */ @Deprecated public static AR1 parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (AR1)XmlBeans.getContextTypeLoader().parse(xis, AR1.type, (XmlOptions)null); } - + + /** + * Parses an AR1 instance from an XMLInputStream with custom options. + * + * @deprecated Use {@link #parse(InputStream, XmlOptions)} or {@link #parse(XMLStreamReader, XmlOptions)} instead + * @param xis XMLInputStream containing the AR1 XML content + * @param options XmlOptions for customizing XML parsing behavior + * @return AR1 the parsed AR1 instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error processing the XML stream + */ @Deprecated public static AR1 parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (AR1)XmlBeans.getContextTypeLoader().parse(xis, AR1.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with default options. + * + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + * @param xis XMLInputStream to validate + * @return XMLInputStream a validating stream wrapper + * @throws XmlException if validation setup fails + * @throws XMLStreamException if there is an error processing the XML stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, AR1.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with custom options. + * + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + * @param xis XMLInputStream to validate + * @param options XmlOptions for customizing validation behavior + * @return XMLInputStream a validating stream wrapper + * @throws XmlException if validation setup fails + * @throws XMLStreamException if there is an error processing the XML stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, AR1.type, options); } - + + /** + * Private constructor to prevent instantiation of this factory class. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/AR2.java b/src/main/java/ca/openosp/openo/ar2005/AR2.java index caa9241b1ac..3b87f33d084 100644 --- a/src/main/java/ca/openosp/openo/ar2005/AR2.java +++ b/src/main/java/ca/openosp/openo/ar2005/AR2.java @@ -15,163 +15,550 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XMLBeans interface for the British Columbia Antenatal Record 2005 (AR2) form. + * + *

    This interface provides programmatic access to the AR2 form data structure, which is used + * in British Columbia for standardized antenatal care documentation. The AR2 form captures + * comprehensive pregnancy-related information including risk factors, immunoprophylaxis + * recommendations, subsequent visit records, ultrasound results, laboratory investigations, + * and discussion topics with patients.

    + * + *

    This interface is generated from an XML Schema Definition (XSD) and provides type-safe + * access to all elements and attributes defined in the AR2 schema. It extends XmlObject to + * provide standard XMLBeans functionality for parsing, validation, and serialization.

    + * + *

    Healthcare providers use this interface to programmatically read and write AR2 form data, + * ensuring compliance with BC provincial antenatal care documentation standards.

    + * + * @see RiskFactorItemType + * @see RecommendedImmunoprophylaxisType + * @see SubsequentVisitItemType + * @see UltrasoundType + * @see AdditionalLabInvestigationsType + * @see DiscussionTopicsType + * @see SignatureType + * @since 2026-01-24 + */ public interface AR2 extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(AR2.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("ar23326type"); - + + /** + * Retrieves the complete array of pregnancy risk factors. + * + * @return RiskFactorItemType array containing all documented risk factors for the pregnancy + */ RiskFactorItemType[] getRiskFactorListArray(); - + + /** + * Retrieves a specific risk factor item by index position. + * + * @param p0 int the zero-based index of the risk factor to retrieve + * @return RiskFactorItemType the risk factor at the specified index + */ RiskFactorItemType getRiskFactorListArray(final int p0); - + + /** + * Returns the number of risk factor items in the list. + * + * @return int the total count of risk factors documented + */ int sizeOfRiskFactorListArray(); - + + /** + * Replaces the entire risk factor list with a new array. + * + * @param p0 RiskFactorItemType array the new risk factor list to set + */ void setRiskFactorListArray(final RiskFactorItemType[] p0); - + + /** + * Replaces a specific risk factor item at the given index. + * + * @param p0 int the zero-based index where the risk factor should be set + * @param p1 RiskFactorItemType the risk factor item to set at the specified position + */ void setRiskFactorListArray(final int p0, final RiskFactorItemType p1); - + + /** + * Inserts a new risk factor item at the specified index position. + * + * @param p0 int the zero-based index where the new risk factor should be inserted + * @return RiskFactorItemType the newly created risk factor item + */ RiskFactorItemType insertNewRiskFactorList(final int p0); - + + /** + * Appends a new risk factor item to the end of the list. + * + * @return RiskFactorItemType the newly created risk factor item + */ RiskFactorItemType addNewRiskFactorList(); - + + /** + * Removes the risk factor item at the specified index position. + * + * @param p0 int the zero-based index of the risk factor to remove + */ void removeRiskFactorList(final int p0); - + + /** + * Retrieves the recommended immunoprophylaxis information for the pregnancy. + * + * @return RecommendedImmunoprophylaxisType the immunization and prophylaxis recommendations + */ RecommendedImmunoprophylaxisType getRecommendedImmunoprophylaxis(); - + + /** + * Sets the recommended immunoprophylaxis information. + * + * @param p0 RecommendedImmunoprophylaxisType the immunization and prophylaxis recommendations to set + */ void setRecommendedImmunoprophylaxis(final RecommendedImmunoprophylaxisType p0); - + + /** + * Creates and adds a new recommended immunoprophylaxis element. + * + * @return RecommendedImmunoprophylaxisType the newly created immunoprophylaxis element + */ RecommendedImmunoprophylaxisType addNewRecommendedImmunoprophylaxis(); - + + /** + * Retrieves the complete array of subsequent antenatal visit records. + * + * @return SubsequentVisitItemType array containing all documented follow-up visits + */ SubsequentVisitItemType[] getSubsequentVisitListArray(); - + + /** + * Retrieves a specific subsequent visit record by index position. + * + * @param p0 int the zero-based index of the visit record to retrieve + * @return SubsequentVisitItemType the visit record at the specified index + */ SubsequentVisitItemType getSubsequentVisitListArray(final int p0); - + + /** + * Returns the number of subsequent visit records in the list. + * + * @return int the total count of documented follow-up visits + */ int sizeOfSubsequentVisitListArray(); - + + /** + * Replaces the entire subsequent visit list with a new array. + * + * @param p0 SubsequentVisitItemType array the new visit list to set + */ void setSubsequentVisitListArray(final SubsequentVisitItemType[] p0); - + + /** + * Replaces a specific subsequent visit record at the given index. + * + * @param p0 int the zero-based index where the visit record should be set + * @param p1 SubsequentVisitItemType the visit record to set at the specified position + */ void setSubsequentVisitListArray(final int p0, final SubsequentVisitItemType p1); - + + /** + * Inserts a new subsequent visit record at the specified index position. + * + * @param p0 int the zero-based index where the new visit record should be inserted + * @return SubsequentVisitItemType the newly created visit record + */ SubsequentVisitItemType insertNewSubsequentVisitList(final int p0); - + + /** + * Appends a new subsequent visit record to the end of the list. + * + * @return SubsequentVisitItemType the newly created visit record + */ SubsequentVisitItemType addNewSubsequentVisitList(); - + + /** + * Removes the subsequent visit record at the specified index position. + * + * @param p0 int the zero-based index of the visit record to remove + */ void removeSubsequentVisitList(final int p0); - + + /** + * Retrieves the complete array of ultrasound examination records. + * + * @return UltrasoundType array containing all documented ultrasound results + */ UltrasoundType[] getUltrasoundArray(); - + + /** + * Retrieves a specific ultrasound examination record by index position. + * + * @param p0 int the zero-based index of the ultrasound record to retrieve + * @return UltrasoundType the ultrasound record at the specified index + */ UltrasoundType getUltrasoundArray(final int p0); - + + /** + * Returns the number of ultrasound examination records in the array. + * + * @return int the total count of documented ultrasound examinations + */ int sizeOfUltrasoundArray(); - + + /** + * Replaces the entire ultrasound examination array with a new array. + * + * @param p0 UltrasoundType array the new ultrasound records to set + */ void setUltrasoundArray(final UltrasoundType[] p0); - + + /** + * Replaces a specific ultrasound examination record at the given index. + * + * @param p0 int the zero-based index where the ultrasound record should be set + * @param p1 UltrasoundType the ultrasound record to set at the specified position + */ void setUltrasoundArray(final int p0, final UltrasoundType p1); - + + /** + * Inserts a new ultrasound examination record at the specified index position. + * + * @param p0 int the zero-based index where the new ultrasound record should be inserted + * @return UltrasoundType the newly created ultrasound record + */ UltrasoundType insertNewUltrasound(final int p0); - + + /** + * Appends a new ultrasound examination record to the end of the array. + * + * @return UltrasoundType the newly created ultrasound record + */ UltrasoundType addNewUltrasound(); - + + /** + * Removes the ultrasound examination record at the specified index position. + * + * @param p0 int the zero-based index of the ultrasound record to remove + */ void removeUltrasound(final int p0); - + + /** + * Retrieves the additional laboratory investigations section. + * + * @return AdditionalLabInvestigationsType the laboratory test results and investigations + */ AdditionalLabInvestigationsType getAdditionalLabInvestigations(); - + + /** + * Sets the additional laboratory investigations section. + * + * @param p0 AdditionalLabInvestigationsType the laboratory test results to set + */ void setAdditionalLabInvestigations(final AdditionalLabInvestigationsType p0); - + + /** + * Creates and adds a new additional laboratory investigations element. + * + * @return AdditionalLabInvestigationsType the newly created laboratory investigations element + */ AdditionalLabInvestigationsType addNewAdditionalLabInvestigations(); - + + /** + * Retrieves the discussion topics section documenting patient education and counseling. + * + * @return DiscussionTopicsType the topics discussed with the patient during antenatal visits + */ DiscussionTopicsType getDiscussionTopics(); - + + /** + * Sets the discussion topics section for patient education documentation. + * + * @param p0 DiscussionTopicsType the discussion topics to set + */ void setDiscussionTopics(final DiscussionTopicsType p0); - + + /** + * Creates and adds a new discussion topics element. + * + * @return DiscussionTopicsType the newly created discussion topics element + */ DiscussionTopicsType addNewDiscussionTopics(); - + + /** + * Retrieves the signatures section containing healthcare provider authorization. + * + * @return SignatureType the provider signatures and authentication information + */ SignatureType getSignatures(); - + + /** + * Sets the signatures section for healthcare provider authorization. + * + * @param p0 SignatureType the signature information to set + */ void setSignatures(final SignatureType p0); - + + /** + * Creates and adds a new signatures element. + * + * @return SignatureType the newly created signatures element + */ SignatureType addNewSignatures(); - + + /** + * Factory class providing static methods for creating and parsing AR2 instances. + * + *

    This factory provides various methods to instantiate AR2 objects from different sources + * including XML strings, files, URLs, input streams, readers, DOM nodes, and XML stream readers. + * It uses XMLBeans context type loader to handle parsing and validation according to the + * AR2 schema definition.

    + * + *

    Healthcare applications should use these factory methods to load existing AR2 form data + * from XML sources or create new blank AR2 instances for data entry.

    + */ public static final class Factory { + /** + * Creates a new empty AR2 instance with default options. + * + * @return AR2 a new AR2 instance ready for data population + */ public static AR2 newInstance() { return (AR2)XmlBeans.getContextTypeLoader().newInstance(AR2.type, (XmlOptions)null); } - + + /** + * Creates a new empty AR2 instance with specified XML options. + * + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 a new AR2 instance ready for data population + */ public static AR2 newInstance(final XmlOptions options) { return (AR2)XmlBeans.getContextTypeLoader().newInstance(AR2.type, options); } - + + /** + * Parses an AR2 instance from an XML string representation. + * + * @param xmlAsString String the XML string containing AR2 form data + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + */ public static AR2 parse(final String xmlAsString) throws XmlException { return (AR2)XmlBeans.getContextTypeLoader().parse(xmlAsString, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from an XML string with specified parsing options. + * + * @param xmlAsString String the XML string containing AR2 form data + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + */ public static AR2 parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (AR2)XmlBeans.getContextTypeLoader().parse(xmlAsString, AR2.type, options); } - + + /** + * Parses an AR2 instance from an XML file. + * + * @param file File the file containing AR2 form data in XML format + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading the file + */ public static AR2 parse(final File file) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(file, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from an XML file with specified parsing options. + * + * @param file File the file containing AR2 form data in XML format + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading the file + */ public static AR2 parse(final File file, final XmlOptions options) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(file, AR2.type, options); } - + + /** + * Parses an AR2 instance from a URL pointing to an XML resource. + * + * @param u URL the URL pointing to AR2 form data in XML format + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading from the URL + */ public static AR2 parse(final URL u) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(u, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from a URL with specified parsing options. + * + * @param u URL the URL pointing to AR2 form data in XML format + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading from the URL + */ public static AR2 parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(u, AR2.type, options); } - + + /** + * Parses an AR2 instance from an input stream containing XML data. + * + * @param is InputStream the input stream containing AR2 form data in XML format + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static AR2 parse(final InputStream is) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(is, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from an input stream with specified parsing options. + * + * @param is InputStream the input stream containing AR2 form data in XML format + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static AR2 parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(is, AR2.type, options); } - + + /** + * Parses an AR2 instance from a character reader containing XML data. + * + * @param r Reader the character reader containing AR2 form data in XML format + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static AR2 parse(final Reader r) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(r, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from a character reader with specified parsing options. + * + * @param r Reader the character reader containing AR2 form data in XML format + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static AR2 parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (AR2)XmlBeans.getContextTypeLoader().parse(r, AR2.type, options); } - + + /** + * Parses an AR2 instance from an XML stream reader. + * + * @param sr XMLStreamReader the XML stream reader positioned at AR2 form data + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + */ public static AR2 parse(final XMLStreamReader sr) throws XmlException { return (AR2)XmlBeans.getContextTypeLoader().parse(sr, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from an XML stream reader with specified parsing options. + * + * @param sr XMLStreamReader the XML stream reader positioned at AR2 form data + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + */ public static AR2 parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (AR2)XmlBeans.getContextTypeLoader().parse(sr, AR2.type, options); } - + + /** + * Parses an AR2 instance from a W3C DOM node. + * + * @param node Node the DOM node containing AR2 form data + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + */ public static AR2 parse(final Node node) throws XmlException { return (AR2)XmlBeans.getContextTypeLoader().parse(node, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from a W3C DOM node with specified parsing options. + * + * @param node Node the DOM node containing AR2 form data + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + */ public static AR2 parse(final Node node, final XmlOptions options) throws XmlException { return (AR2)XmlBeans.getContextTypeLoader().parse(node, AR2.type, options); } - + + /** + * Parses an AR2 instance from a deprecated XMLInputStream. + * + * @param xis XMLInputStream the XML input stream containing AR2 form data + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated; use InputStream or XMLStreamReader instead + */ @Deprecated public static AR2 parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (AR2)XmlBeans.getContextTypeLoader().parse(xis, AR2.type, (XmlOptions)null); } - + + /** + * Parses an AR2 instance from a deprecated XMLInputStream with specified parsing options. + * + * @param xis XMLInputStream the XML input stream containing AR2 form data + * @param options XmlOptions the XML parsing and validation options to apply + * @return AR2 the parsed AR2 instance + * @throws XmlException if the XML is malformed or does not conform to the AR2 schema + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated; use InputStream or XMLStreamReader instead + */ @Deprecated public static AR2 parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (AR2)XmlBeans.getContextTypeLoader().parse(xis, AR2.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper around the provided stream. + * + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream a validating stream wrapper + * @throws XmlException if validation setup fails + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated; use XMLStreamReader validation instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, AR2.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper with specified validation options. + * + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions the XML parsing and validation options to apply + * @return XMLInputStream a validating stream wrapper + * @throws XmlException if validation setup fails + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated; use XMLStreamReader validation instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, AR2.type, options); diff --git a/src/main/java/ca/openosp/openo/ar2005/AdditionalLabInvestigationsType.java b/src/main/java/ca/openosp/openo/ar2005/AdditionalLabInvestigationsType.java index 8830268b262..77673282c32 100644 --- a/src/main/java/ca/openosp/openo/ar2005/AdditionalLabInvestigationsType.java +++ b/src/main/java/ca/openosp/openo/ar2005/AdditionalLabInvestigationsType.java @@ -17,90 +17,330 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XML interface for additional laboratory investigations in antenatal care records. + * + *

    This interface represents the additional laboratory tests and investigations performed + * during pregnancy as part of the British Columbia Antenatal Record (BCAR) AR2005 form. + * It provides type-safe access to common prenatal laboratory values including hemoglobin, + * blood typing, glucose testing, and Group B Streptococcus screening.

    + * + *

    The interface supports both standard Java getters/setters and XMLBeans-specific + * xget/xset methods for direct XML manipulation. Custom laboratory tests can be recorded + * using four configurable custom lab slots.

    + * + *

    This is an Apache XMLBeans-generated interface bound to the AR2005 antenatal record + * XML schema, providing automatic XML serialization/deserialization and type safety for + * healthcare data exchange.

    + * + * @since 2026-01-24 + * @see CustomLab + * @see XmlObject + */ public interface AdditionalLabInvestigationsType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(AdditionalLabInvestigationsType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("additionallabinvestigationstypef776type"); - + + /** + * Gets the hemoglobin (Hb) laboratory value. + * + * @return String the hemoglobin value, typically measured in g/L or g/dL + */ String getHb(); - + + /** + * Gets the hemoglobin value as an XMLBeans XmlString for direct XML manipulation. + * + * @return XmlString the hemoglobin value wrapped in an XmlString object + */ XmlString xgetHb(); - + + /** + * Sets the hemoglobin (Hb) laboratory value. + * + * @param p0 String the hemoglobin value to set, typically measured in g/L or g/dL + */ void setHb(final String p0); - + + /** + * Sets the hemoglobin value using an XMLBeans XmlString for direct XML manipulation. + * + * @param p0 XmlString the hemoglobin value to set as an XmlString object + */ void xsetHb(final XmlString p0); - + + /** + * Gets the patient's blood group type (ABO system). + * + * @return BloodGroup.Enum the blood group enumeration value (A, B, AB, O, UN, or ND) + */ BloodGroup.Enum getBloodGroup(); - + + /** + * Gets the blood group as an XMLBeans type for direct XML manipulation. + * + * @return BloodGroup the blood group wrapped in an XMLBeans type + */ BloodGroup xgetBloodGroup(); - + + /** + * Sets the patient's blood group type (ABO system). + * + * @param p0 BloodGroup.Enum the blood group enumeration value to set (A, B, AB, O, UN, or ND) + */ void setBloodGroup(final BloodGroup.Enum p0); - + + /** + * Sets the blood group using an XMLBeans type for direct XML manipulation. + * + * @param p0 BloodGroup the blood group to set as an XMLBeans type + */ void xsetBloodGroup(final BloodGroup p0); - + + /** + * Gets the patient's Rh factor (Rhesus blood group system). + * + * @return Rh.Enum the Rh factor enumeration value (POS, WPOS, NEG, NDONE, or UNK) + */ Rh.Enum getRh(); - + + /** + * Gets the Rh factor as an XMLBeans type for direct XML manipulation. + * + * @return Rh the Rh factor wrapped in an XMLBeans type + */ Rh xgetRh(); - + + /** + * Sets the patient's Rh factor (Rhesus blood group system). + * + * @param p0 Rh.Enum the Rh factor enumeration value to set (POS, WPOS, NEG, NDONE, or UNK) + */ void setRh(final Rh.Enum p0); - + + /** + * Sets the Rh factor using an XMLBeans type for direct XML manipulation. + * + * @param p0 Rh the Rh factor to set as an XMLBeans type + */ void xsetRh(final Rh p0); - + + /** + * Gets the repeat antibody screen (ABS) laboratory value. + * + * @return String the repeat antibody screen result + */ String getRepeatABS(); - + + /** + * Gets the repeat antibody screen value as an XMLBeans XmlString for direct XML manipulation. + * + * @return XmlString the repeat antibody screen value wrapped in an XmlString object + */ XmlString xgetRepeatABS(); - + + /** + * Sets the repeat antibody screen (ABS) laboratory value. + * + * @param p0 String the repeat antibody screen result to set + */ void setRepeatABS(final String p0); - + + /** + * Sets the repeat antibody screen value using an XMLBeans XmlString for direct XML manipulation. + * + * @param p0 XmlString the repeat antibody screen value to set as an XmlString object + */ void xsetRepeatABS(final XmlString p0); - + + /** + * Gets the glucose challenge test (GCT) result for gestational diabetes screening. + * + * @return String the GCT result value, typically measured in mmol/L or mg/dL + */ String getGCT(); - + + /** + * Gets the GCT result as an XMLBeans XmlString for direct XML manipulation. + * + * @return XmlString the GCT result value wrapped in an XmlString object + */ XmlString xgetGCT(); - + + /** + * Sets the glucose challenge test (GCT) result for gestational diabetes screening. + * + * @param p0 String the GCT result value to set, typically measured in mmol/L or mg/dL + */ void setGCT(final String p0); - + + /** + * Sets the GCT result using an XMLBeans XmlString for direct XML manipulation. + * + * @param p0 XmlString the GCT result value to set as an XmlString object + */ void xsetGCT(final XmlString p0); - + + /** + * Gets the glucose tolerance test (GTT) result for gestational diabetes diagnosis. + * + * @return String the GTT result value, typically measured in mmol/L or mg/dL + */ String getGTT(); - + + /** + * Gets the GTT result as an XMLBeans XmlString for direct XML manipulation. + * + * @return XmlString the GTT result value wrapped in an XmlString object + */ XmlString xgetGTT(); - + + /** + * Sets the glucose tolerance test (GTT) result for gestational diabetes diagnosis. + * + * @param p0 String the GTT result value to set, typically measured in mmol/L or mg/dL + */ void setGTT(final String p0); - + + /** + * Sets the GTT result using an XMLBeans XmlString for direct XML manipulation. + * + * @param p0 XmlString the GTT result value to set as an XmlString object + */ void xsetGTT(final XmlString p0); - + + /** + * Gets the Group B Streptococcus (GBS) screening result. + * + * @return GBS.Enum the GBS screening result enumeration value (NDONE, POSSWAB, POSURINE, NEGSWAB, DONEUNK, or UNK) + */ GBS.Enum getGBS(); - + + /** + * Gets the GBS screening result as an XMLBeans type for direct XML manipulation. + * + * @return GBS the GBS screening result wrapped in an XMLBeans type + */ GBS xgetGBS(); - + + /** + * Sets the Group B Streptococcus (GBS) screening result. + * + * @param p0 GBS.Enum the GBS screening result enumeration value to set (NDONE, POSSWAB, POSURINE, NEGSWAB, DONEUNK, or UNK) + */ void setGBS(final GBS.Enum p0); - + + /** + * Sets the GBS screening result using an XMLBeans type for direct XML manipulation. + * + * @param p0 GBS the GBS screening result to set as an XMLBeans type + */ void xsetGBS(final GBS p0); - + + /** + * Gets the first custom laboratory investigation entry. + * + * @return CustomLab the first custom lab investigation object + */ CustomLab getCustomLab1(); - + + /** + * Sets the first custom laboratory investigation entry. + * + * @param p0 CustomLab the custom lab investigation object to set + */ void setCustomLab1(final CustomLab p0); - + + /** + * Adds and returns a new first custom laboratory investigation entry. + * + * @return CustomLab a new custom lab investigation object + */ CustomLab addNewCustomLab1(); - + + /** + * Gets the second custom laboratory investigation entry. + * + * @return CustomLab the second custom lab investigation object + */ CustomLab getCustomLab2(); - + + /** + * Sets the second custom laboratory investigation entry. + * + * @param p0 CustomLab the custom lab investigation object to set + */ void setCustomLab2(final CustomLab p0); - + + /** + * Adds and returns a new second custom laboratory investigation entry. + * + * @return CustomLab a new custom lab investigation object + */ CustomLab addNewCustomLab2(); - + + /** + * Gets the third custom laboratory investigation entry. + * + * @return CustomLab the third custom lab investigation object + */ CustomLab getCustomLab3(); - + + /** + * Sets the third custom laboratory investigation entry. + * + * @param p0 CustomLab the custom lab investigation object to set + */ void setCustomLab3(final CustomLab p0); - + + /** + * Adds and returns a new third custom laboratory investigation entry. + * + * @return CustomLab a new custom lab investigation object + */ CustomLab addNewCustomLab3(); - + + /** + * Gets the fourth custom laboratory investigation entry. + * + * @return CustomLab the fourth custom lab investigation object + */ CustomLab getCustomLab4(); - + + /** + * Sets the fourth custom laboratory investigation entry. + * + * @param p0 CustomLab the custom lab investigation object to set + */ void setCustomLab4(final CustomLab p0); - + + /** + * Adds and returns a new fourth custom laboratory investigation entry. + * + * @return CustomLab a new custom lab investigation object + */ CustomLab addNewCustomLab4(); - + + /** + * XML interface for blood group (ABO system) enumeration values. + * + *

    Represents the patient's blood type in the ABO blood group system. + * This interface provides type-safe access to the standard blood group values + * used in prenatal care and blood transfusion compatibility.

    + * + *

    Valid blood group values:

    + *
      + *
    • A - Blood type A
    • + *
    • B - Blood type B
    • + *
    • AB - Blood type AB
    • + *
    • O - Blood type O
    • + *
    • UN - Unknown blood type
    • + *
    • ND - Not Done (test not performed)
    • + *
    + * + * @since 2026-01-24 + * @see XmlString + */ public interface BloodGroup extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(BloodGroup.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("bloodgroup51f7elemtype"); @@ -116,11 +356,29 @@ public interface BloodGroup extends XmlString public static final int INT_O = 4; public static final int INT_UN = 5; public static final int INT_ND = 6; - + + /** + * Gets the underlying enum value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the blood group enum value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the blood group value using a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the blood group enum value to set + */ void set(final StringEnumAbstractBase p0); + /** + * Enumeration class for blood group values. + * + *

    This class provides type-safe enum representation for blood group values + * with string and integer representations for XML serialization.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_A = 1; @@ -131,19 +389,42 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_ND = 6; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Returns the enum constant for the given string value. + * + * @param s String the blood group string value (e.g., "A", "B", "AB", "O", "UN", "ND") + * @return Enum the corresponding blood group enum constant + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Returns the enum constant for the given integer value. + * + * @param i int the blood group integer value (1-6) + * @return Enum the corresponding blood group enum constant + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for enum instances. + * + * @param s String the blood group string value + * @param i int the blood group integer value + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the enum instance during deserialization. + * + * @return Object the resolved enum instance + */ private Object readResolve() { return forInt(this.intValue()); } @@ -152,26 +433,73 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("A", 1), new Enum("B", 2), new Enum("AB", 3), new Enum("O", 4), new Enum("UN", 5), new Enum("ND", 6) }); } } - + + /** + * Factory class for creating BloodGroup instances. + * + *

    Provides static factory methods for creating and instantiating + * BloodGroup objects with or without XMLBeans options.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new BloodGroup value from the given object. + * + * @param obj Object the object to convert to a BloodGroup value + * @return BloodGroup the created BloodGroup instance + */ public static BloodGroup newValue(final Object obj) { return (BloodGroup)BloodGroup.type.newValue(obj); } - + + /** + * Creates a new BloodGroup instance with default XML options. + * + * @return BloodGroup a new BloodGroup instance + */ public static BloodGroup newInstance() { return (BloodGroup)XmlBeans.getContextTypeLoader().newInstance(BloodGroup.type, (XmlOptions)null); } - + + /** + * Creates a new BloodGroup instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return BloodGroup a new BloodGroup instance + */ public static BloodGroup newInstance(final XmlOptions options) { return (BloodGroup)XmlBeans.getContextTypeLoader().newInstance(BloodGroup.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } } - + + /** + * XML interface for Rh factor (Rhesus blood group system) enumeration values. + * + *

    Represents the patient's Rh factor status, a critical component of blood typing + * that indicates the presence or absence of the RhD antigen. Rh factor is essential + * for preventing hemolytic disease in pregnancy and ensuring blood transfusion compatibility.

    + * + *

    Valid Rh factor values:

    + *
      + *
    • POS - Rh positive (RhD antigen present)
    • + *
    • WPOS - Weak positive (weak RhD antigen expression)
    • + *
    • NEG - Rh negative (RhD antigen absent)
    • + *
    • NDONE - Not Done (test not performed)
    • + *
    • UNK - Unknown Rh factor
    • + *
    + * + * @since 2026-01-24 + * @see XmlString + */ public interface Rh extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Rh.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("rh52c8elemtype"); @@ -185,11 +513,29 @@ public interface Rh extends XmlString public static final int INT_NEG = 3; public static final int INT_NDONE = 4; public static final int INT_UNK = 5; - + + /** + * Gets the underlying enum value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the Rh factor enum value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the Rh factor value using a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the Rh factor enum value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration class for Rh factor values. + * + *

    This class provides type-safe enum representation for Rh factor values + * with string and integer representations for XML serialization.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_POS = 1; @@ -199,19 +545,42 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_UNK = 5; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Returns the enum constant for the given string value. + * + * @param s String the Rh factor string value (e.g., "POS", "WPOS", "NEG", "NDONE", "UNK") + * @return Enum the corresponding Rh factor enum constant + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Returns the enum constant for the given integer value. + * + * @param i int the Rh factor integer value (1-5) + * @return Enum the corresponding Rh factor enum constant + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for enum instances. + * + * @param s String the Rh factor string value + * @param i int the Rh factor integer value + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the enum instance during deserialization. + * + * @return Object the resolved enum instance + */ private Object readResolve() { return forInt(this.intValue()); } @@ -220,26 +589,74 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("POS", 1), new Enum("WPOS", 2), new Enum("NEG", 3), new Enum("NDONE", 4), new Enum("UNK", 5) }); } } - + + /** + * Factory class for creating Rh instances. + * + *

    Provides static factory methods for creating and instantiating + * Rh objects with or without XMLBeans options.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new Rh value from the given object. + * + * @param obj Object the object to convert to an Rh value + * @return Rh the created Rh instance + */ public static Rh newValue(final Object obj) { return (Rh)Rh.type.newValue(obj); } - + + /** + * Creates a new Rh instance with default XML options. + * + * @return Rh a new Rh instance + */ public static Rh newInstance() { return (Rh)XmlBeans.getContextTypeLoader().newInstance(Rh.type, (XmlOptions)null); } - + + /** + * Creates a new Rh instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return Rh a new Rh instance + */ public static Rh newInstance(final XmlOptions options) { return (Rh)XmlBeans.getContextTypeLoader().newInstance(Rh.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } } - + + /** + * XML interface for Group B Streptococcus (GBS) screening result enumeration values. + * + *

    Represents the result of Group B Streptococcus screening performed during pregnancy. + * GBS screening is critical in prenatal care as it helps identify carriers who require + * intrapartum antibiotic prophylaxis to prevent neonatal GBS infection.

    + * + *

    Valid GBS screening result values:

    + *
      + *
    • NDONE - Not Done (screening not performed)
    • + *
    • POSSWAB - Positive swab result (GBS detected via vaginal/rectal swab)
    • + *
    • POSURINE - Positive urine result (GBS detected in urine culture)
    • + *
    • NEGSWAB - Negative swab result (GBS not detected)
    • + *
    • DONEUNK - Done but unknown result
    • + *
    • UNK - Unknown screening status
    • + *
    + * + * @since 2026-01-24 + * @see XmlString + */ public interface GBS extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(GBS.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("gbs77baelemtype"); @@ -255,11 +672,29 @@ public interface GBS extends XmlString public static final int INT_NEGSWAB = 4; public static final int INT_DONEUNK = 5; public static final int INT_UNK = 6; - + + /** + * Gets the underlying enum value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the GBS screening result enum value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the GBS screening result value using a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the GBS screening result enum value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration class for GBS screening result values. + * + *

    This class provides type-safe enum representation for GBS screening results + * with string and integer representations for XML serialization.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_NDONE = 1; @@ -270,19 +705,42 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_UNK = 6; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Returns the enum constant for the given string value. + * + * @param s String the GBS screening result string value (e.g., "NDONE", "POSSWAB", "POSURINE", "NEGSWAB", "DONEUNK", "UNK") + * @return Enum the corresponding GBS screening result enum constant + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Returns the enum constant for the given integer value. + * + * @param i int the GBS screening result integer value (1-6) + * @return Enum the corresponding GBS screening result enum constant + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for enum instances. + * + * @param s String the GBS screening result string value + * @param i int the GBS screening result integer value + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the enum instance during deserialization. + * + * @return Object the resolved enum instance + */ private Object readResolve() { return forInt(this.intValue()); } @@ -291,112 +749,317 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("NDONE", 1), new Enum("POSSWAB", 2), new Enum("POSURINE", 3), new Enum("NEGSWAB", 4), new Enum("DONEUNK", 5), new Enum("UNK", 6) }); } } - + + /** + * Factory class for creating GBS instances. + * + *

    Provides static factory methods for creating and instantiating + * GBS objects with or without XMLBeans options.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new GBS value from the given object. + * + * @param obj Object the object to convert to a GBS value + * @return GBS the created GBS instance + */ public static GBS newValue(final Object obj) { return (GBS)GBS.type.newValue(obj); } - + + /** + * Creates a new GBS instance with default XML options. + * + * @return GBS a new GBS instance + */ public static GBS newInstance() { return (GBS)XmlBeans.getContextTypeLoader().newInstance(GBS.type, (XmlOptions)null); } - + + /** + * Creates a new GBS instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return GBS a new GBS instance + */ public static GBS newInstance(final XmlOptions options) { return (GBS)XmlBeans.getContextTypeLoader().newInstance(GBS.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } } - + + /** + * Factory class for creating and parsing AdditionalLabInvestigationsType instances. + * + *

    Provides comprehensive static factory methods for creating new instances and + * parsing XML data from various sources (String, File, URL, InputStream, Reader, + * XMLStreamReader, DOM Node, XMLInputStream).

    + * + *

    All parse methods support optional XmlOptions for controlling the parsing + * behavior, including validation, error handling, and namespace processing.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new AdditionalLabInvestigationsType instance with default XML options. + * + * @return AdditionalLabInvestigationsType a new instance + */ public static AdditionalLabInvestigationsType newInstance() { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().newInstance(AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Creates a new AdditionalLabInvestigationsType instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return AdditionalLabInvestigationsType a new instance + */ public static AdditionalLabInvestigationsType newInstance(final XmlOptions options) { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().newInstance(AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XML string with default options. + * + * @param xmlAsString String the XML content as a string + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AdditionalLabInvestigationsType parse(final String xmlAsString) throws XmlException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(xmlAsString, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XML string with the specified options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AdditionalLabInvestigationsType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(xmlAsString, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XML file with default options. + * + * @param file File the XML file to parse + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading the file + */ public static AdditionalLabInvestigationsType parse(final File file) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(file, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XML file with the specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading the file + */ public static AdditionalLabInvestigationsType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(file, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from a URL with default options. + * + * @param u URL the URL to the XML resource + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the URL + */ public static AdditionalLabInvestigationsType parse(final URL u) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(u, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from a URL with the specified options. + * + * @param u URL the URL to the XML resource + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the URL + */ public static AdditionalLabInvestigationsType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(u, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from an InputStream with default options. + * + * @param is InputStream the input stream containing XML data + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the stream + */ public static AdditionalLabInvestigationsType parse(final InputStream is) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(is, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from an InputStream with the specified options. + * + * @param is InputStream the input stream containing XML data + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the stream + */ public static AdditionalLabInvestigationsType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(is, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from a Reader with default options. + * + * @param r Reader the reader containing XML data + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading + */ public static AdditionalLabInvestigationsType parse(final Reader r) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(r, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from a Reader with the specified options. + * + * @param r Reader the reader containing XML data + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading + */ public static AdditionalLabInvestigationsType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(r, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XMLStreamReader with default options. + * + * @param sr XMLStreamReader the XML stream reader + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AdditionalLabInvestigationsType parse(final XMLStreamReader sr) throws XmlException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(sr, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XMLStreamReader with the specified options. + * + * @param sr XMLStreamReader the XML stream reader + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AdditionalLabInvestigationsType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(sr, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from a DOM Node with default options. + * + * @param node Node the DOM node containing XML data + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AdditionalLabInvestigationsType parse(final Node node) throws XmlException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(node, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from a DOM Node with the specified options. + * + * @param node Node the DOM node containing XML data + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static AdditionalLabInvestigationsType parse(final Node node, final XmlOptions options) throws XmlException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(node, AdditionalLabInvestigationsType.type, options); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XMLInputStream with default options. + * + * @param xis XMLInputStream the XML input stream + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if an error occurs while processing the XML stream + * @deprecated XMLInputStream is deprecated; use XMLStreamReader instead + */ @Deprecated public static AdditionalLabInvestigationsType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(xis, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Parses an AdditionalLabInvestigationsType from an XMLInputStream with the specified options. + * + * @param xis XMLInputStream the XML input stream + * @param options XmlOptions the XML options to use for parsing + * @return AdditionalLabInvestigationsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if an error occurs while processing the XML stream + * @deprecated XMLInputStream is deprecated; use XMLStreamReader instead + */ @Deprecated public static AdditionalLabInvestigationsType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (AdditionalLabInvestigationsType)XmlBeans.getContextTypeLoader().parse(xis, AdditionalLabInvestigationsType.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with default options. + * + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid + * @throws XMLStreamException if an error occurs while processing the XML stream + * @deprecated XMLInputStream is deprecated; use XMLStreamReader instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, AdditionalLabInvestigationsType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with the specified options. + * + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions the XML options to use for validation + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid + * @throws XMLStreamException if an error occurs while processing the XML stream + * @deprecated XMLInputStream is deprecated; use XMLStreamReader instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, AdditionalLabInvestigationsType.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/CurrentPregnancyType.java b/src/main/java/ca/openosp/openo/ar2005/CurrentPregnancyType.java index 6ea911f3640..135bf55957e 100644 --- a/src/main/java/ca/openosp/openo/ar2005/CurrentPregnancyType.java +++ b/src/main/java/ca/openosp/openo/ar2005/CurrentPregnancyType.java @@ -17,66 +17,290 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XML Type interface representing current pregnancy health indicators and risk factors + * for the British Columbia Antenatal Record (BCAR) AR2005 form. + * + *

    This interface provides structured data capture for key prenatal health assessment + * criteria including:

    + *
      + *
    • Physical symptoms (bleeding, nausea)
    • + *
    • Behavioral risk factors (smoking, alcohol/drug use)
    • + *
    • Environmental and occupational risks
    • + *
    • Nutritional status (dietary restrictions, calcium, folate intake)
    • + *
    + * + *

    This is an Apache XMLBeans-generated interface that provides type-safe access to + * XML data conforming to the BCAR AR2005 schema. All data elements support yes/no/null + * responses to accommodate incomplete assessments during prenatal care.

    + * + *

    Healthcare Context: The BCAR form is a standardized provincial + * prenatal care record used throughout British Columbia to track pregnancy progression, + * identify risk factors, and ensure continuity of care across multiple healthcare providers.

    + * + * @see YesNoNullType + * @see ca.openosp.openo.ar2005 + * @since 2026-01-24 + */ public interface CurrentPregnancyType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(CurrentPregnancyType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("currentpregnancytype53a5type"); - + + /** + * Gets the bleeding status indicator for the current pregnancy. + * + *

    Vaginal bleeding during pregnancy can indicate potential complications + * such as miscarriage, placental issues, or other conditions requiring + * immediate medical assessment.

    + * + * @return YesNoNullType the bleeding status (yes/no/null) + */ YesNoNullType getBleeding(); - + + /** + * Sets the bleeding status indicator for the current pregnancy. + * + * @param p0 YesNoNullType the bleeding status to set (yes/no/null) + */ void setBleeding(final YesNoNullType p0); - + + /** + * Adds a new bleeding status indicator element. + * + * @return YesNoNullType a new bleeding status element + */ YesNoNullType addNewBleeding(); - + + /** + * Gets the nausea status indicator for the current pregnancy. + * + *

    Nausea and vomiting are common pregnancy symptoms, particularly in the + * first trimester. Severe cases (hyperemesis gravidarum) may require medical + * intervention to prevent dehydration and nutritional deficiencies.

    + * + * @return YesNoNullType the nausea status (yes/no/null) + */ YesNoNullType getNausea(); - + + /** + * Sets the nausea status indicator for the current pregnancy. + * + * @param p0 YesNoNullType the nausea status to set (yes/no/null) + */ void setNausea(final YesNoNullType p0); - + + /** + * Adds a new nausea status indicator element. + * + * @return YesNoNullType a new nausea status element + */ YesNoNullType addNewNausea(); - + + /** + * Gets the smoking status indicator for the current pregnancy. + * + *

    Smoking during pregnancy is associated with increased risks including + * low birth weight, preterm birth, stillbirth, and sudden infant death syndrome (SIDS). + * Smoking cessation support is a critical component of prenatal care.

    + * + * @return YesNoNullType the smoking status (yes/no/null) + */ YesNoNullType getSmoking(); - + + /** + * Sets the smoking status indicator for the current pregnancy. + * + * @param p0 YesNoNullType the smoking status to set (yes/no/null) + */ void setSmoking(final YesNoNullType p0); - + + /** + * Adds a new smoking status indicator element. + * + * @return YesNoNullType a new smoking status element + */ YesNoNullType addNewSmoking(); - + + /** + * Gets the cigarettes per day consumption level as an enumeration value. + * + *

    Quantifying smoking levels helps assess pregnancy risk and guide + * cessation interventions. Categories include less than 10, up to 20, + * and over 20 cigarettes per day.

    + * + * @return CigsPerDay.Enum the cigarette consumption level enumeration + */ CigsPerDay.Enum getCigsPerDay(); - + + /** + * Gets the cigarettes per day consumption level as an XmlBeans type. + * + *

    This method returns the underlying XMLBeans type representation + * for the cigarettes per day value.

    + * + * @return CigsPerDay the cigarette consumption level as XmlBeans type + */ CigsPerDay xgetCigsPerDay(); - + + /** + * Sets the cigarettes per day consumption level using an enumeration value. + * + * @param p0 CigsPerDay.Enum the cigarette consumption level to set + */ void setCigsPerDay(final CigsPerDay.Enum p0); - + + /** + * Sets the cigarettes per day consumption level using an XmlBeans type. + * + * @param p0 CigsPerDay the cigarette consumption level to set as XmlBeans type + */ void xsetCigsPerDay(final CigsPerDay p0); - + + /** + * Gets the alcohol and drug use status indicator for the current pregnancy. + * + *

    Alcohol and drug use during pregnancy can cause fetal alcohol spectrum + * disorders (FASD), developmental delays, birth defects, and neonatal abstinence + * syndrome. Assessment enables appropriate support and referral services.

    + * + * @return YesNoNullType the alcohol/drug use status (yes/no/null) + */ YesNoNullType getAlcoholDrugs(); - + + /** + * Sets the alcohol and drug use status indicator for the current pregnancy. + * + * @param p0 YesNoNullType the alcohol/drug use status to set (yes/no/null) + */ void setAlcoholDrugs(final YesNoNullType p0); - + + /** + * Adds a new alcohol and drug use status indicator element. + * + * @return YesNoNullType a new alcohol/drug use status element + */ YesNoNullType addNewAlcoholDrugs(); - + + /** + * Gets the occupational and environmental risks status indicator. + * + *

    Exposure to workplace hazards (chemicals, radiation, heavy lifting) or + * environmental toxins during pregnancy may increase risk of birth defects, + * miscarriage, or developmental issues. Documentation supports workplace + * accommodations and risk mitigation.

    + * + * @return YesNoNullType the occupational/environmental risks status (yes/no/null) + */ YesNoNullType getOccEnvRisks(); - + + /** + * Sets the occupational and environmental risks status indicator. + * + * @param p0 YesNoNullType the occupational/environmental risks status to set (yes/no/null) + */ void setOccEnvRisks(final YesNoNullType p0); - + + /** + * Adds a new occupational and environmental risks status indicator element. + * + * @return YesNoNullType a new occupational/environmental risks status element + */ YesNoNullType addNewOccEnvRisks(); - + + /** + * Gets the dietary restrictions status indicator. + * + *

    Dietary restrictions (vegetarian, vegan, religious, allergies) may impact + * maternal and fetal nutrition during pregnancy. Assessment enables appropriate + * dietary counseling and supplementation recommendations.

    + * + * @return YesNoNullType the dietary restrictions status (yes/no/null) + */ YesNoNullType getDietaryRes(); - + + /** + * Sets the dietary restrictions status indicator. + * + * @param p0 YesNoNullType the dietary restrictions status to set (yes/no/null) + */ void setDietaryRes(final YesNoNullType p0); - + + /** + * Adds a new dietary restrictions status indicator element. + * + * @return YesNoNullType a new dietary restrictions status element + */ YesNoNullType addNewDietaryRes(); - + + /** + * Gets the calcium adequacy status indicator for the current pregnancy. + * + *

    Adequate calcium intake (1000-1300 mg/day) is essential for fetal bone + * development and maternal bone health. Inadequate intake may require + * supplementation to prevent maternal bone loss and support fetal skeletal growth.

    + * + * @return YesNoNullType the calcium adequacy status (yes/no/null) + */ YesNoNullType getCalciumAdequate(); - + + /** + * Sets the calcium adequacy status indicator for the current pregnancy. + * + * @param p0 YesNoNullType the calcium adequacy status to set (yes/no/null) + */ void setCalciumAdequate(final YesNoNullType p0); - + + /** + * Adds a new calcium adequacy status indicator element. + * + * @return YesNoNullType a new calcium adequacy status element + */ YesNoNullType addNewCalciumAdequate(); - + + /** + * Gets the folate supplementation status indicator for the current pregnancy. + * + *

    Folic acid (folate) supplementation (400-800 mcg/day) before and during + * early pregnancy significantly reduces the risk of neural tube defects such + * as spina bifida and anencephaly. This is a critical prenatal care measure.

    + * + * @return YesNoNullType the folate supplementation status (yes/no/null) + */ YesNoNullType getFolate(); - + + /** + * Sets the folate supplementation status indicator for the current pregnancy. + * + * @param p0 YesNoNullType the folate supplementation status to set (yes/no/null) + */ void setFolate(final YesNoNullType p0); - + + /** + * Adds a new folate supplementation status indicator element. + * + * @return YesNoNullType a new folate supplementation status element + */ YesNoNullType addNewFolate(); - + + /** + * XML Type interface for cigarettes per day consumption levels. + * + *

    Defines enumerated values for categorizing smoking intensity during pregnancy:

    + *
      + *
    • Empty/null - No data or not applicable
    • + *
    • LESS10 - Less than 10 cigarettes per day (light smoking)
    • + *
    • UP20 - 10-20 cigarettes per day (moderate smoking)
    • + *
    • OVER20 - More than 20 cigarettes per day (heavy smoking)
    • + *
    + * + *

    These categories align with clinical risk stratification where higher + * consumption levels correlate with increased pregnancy complications and + * inform the intensity of smoking cessation interventions.

    + * + * @see CurrentPregnancyType#getSmoking() + * @see CurrentPregnancyType#getCigsPerDay() + * @since 2026-01-24 + */ public interface CigsPerDay extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(CigsPerDay.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("cigsperday4d38elemtype"); @@ -88,11 +312,29 @@ public interface CigsPerDay extends XmlString public static final int INT_LESS_10 = 2; public static final int INT_UP_20 = 3; public static final int INT_OVER_20 = 4; - + + /** + * Gets the current enumeration value. + * + * @return StringEnumAbstractBase the current enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration implementation for cigarettes per day consumption levels. + * + *

    This class provides the concrete enumeration implementation for + * smoking intensity categories used in pregnancy risk assessment.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_X = 1; @@ -101,19 +343,42 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_OVER_20 = 4; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Returns the enumeration value for the given string representation. + * + * @param s String the string representation (e.g., "LESS10", "UP20", "OVER20") + * @return Enum the corresponding enumeration value, or null if not found + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Returns the enumeration value for the given integer code. + * + * @param i int the integer code (1=empty, 2=LESS10, 3=UP20, 4=OVER20) + * @return Enum the corresponding enumeration value, or null if not found + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for creating enumeration instances. + * + * @param s String the string representation + * @param i int the integer code + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Ensures deserialization returns the canonical enumeration instance. + * + * @return Object the canonical enumeration instance for this value + */ private Object readResolve() { return forInt(this.intValue()); } @@ -122,112 +387,313 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("", 1), new Enum("LESS10", 2), new Enum("UP20", 3), new Enum("OVER20", 4) }); } } - + + /** + * Factory class for creating CigsPerDay instances. + * + *

    Provides static factory methods for instantiating CigsPerDay objects + * from various sources (values, XML options).

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new CigsPerDay instance from the given object value. + * + * @param obj Object the value to convert to CigsPerDay + * @return CigsPerDay a new CigsPerDay instance + */ public static CigsPerDay newValue(final Object obj) { return (CigsPerDay)CigsPerDay.type.newValue(obj); } - + + /** + * Creates a new CigsPerDay instance with default options. + * + * @return CigsPerDay a new CigsPerDay instance + */ public static CigsPerDay newInstance() { return (CigsPerDay)XmlBeans.getContextTypeLoader().newInstance(CigsPerDay.type, (XmlOptions)null); } - + + /** + * Creates a new CigsPerDay instance with the specified XML options. + * + * @param options XmlOptions the XML options to use during creation + * @return CigsPerDay a new CigsPerDay instance + */ public static CigsPerDay newInstance(final XmlOptions options) { return (CigsPerDay)XmlBeans.getContextTypeLoader().newInstance(CigsPerDay.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } } - + + /** + * Factory class for creating and parsing CurrentPregnancyType instances. + * + *

    Provides static factory methods for creating new instances and parsing + * XML data from various sources (strings, files, URLs, streams, DOM nodes).

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new CurrentPregnancyType instance with default options. + * + * @return CurrentPregnancyType a new CurrentPregnancyType instance + */ public static CurrentPregnancyType newInstance() { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().newInstance(CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Creates a new CurrentPregnancyType instance with the specified XML options. + * + * @param options XmlOptions the XML options to use during creation + * @return CurrentPregnancyType a new CurrentPregnancyType instance + */ public static CurrentPregnancyType newInstance(final XmlOptions options) { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().newInstance(CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from an XML string. + * + * @param xmlAsString String the XML string to parse + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + */ public static CurrentPregnancyType parse(final String xmlAsString) throws XmlException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(xmlAsString, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from an XML string with specified options. + * + * @param xmlAsString String the XML string to parse + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + */ public static CurrentPregnancyType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(xmlAsString, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from an XML file. + * + * @param file File the XML file to parse + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading the file + */ public static CurrentPregnancyType parse(final File file) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(file, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from an XML file with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading the file + */ public static CurrentPregnancyType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(file, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from a URL. + * + * @param u URL the URL to parse XML from + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading from the URL + */ public static CurrentPregnancyType parse(final URL u) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(u, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from a URL with specified options. + * + * @param u URL the URL to parse XML from + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading from the URL + */ public static CurrentPregnancyType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(u, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from an input stream. + * + * @param is InputStream the input stream to parse XML from + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static CurrentPregnancyType parse(final InputStream is) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(is, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from an input stream with specified options. + * + * @param is InputStream the input stream to parse XML from + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static CurrentPregnancyType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(is, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from a character reader. + * + * @param r Reader the reader to parse XML from + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static CurrentPregnancyType parse(final Reader r) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(r, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from a character reader with specified options. + * + * @param r Reader the reader to parse XML from + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static CurrentPregnancyType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(r, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from an XML stream reader. + * + * @param sr XMLStreamReader the stream reader to parse XML from + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + */ public static CurrentPregnancyType parse(final XMLStreamReader sr) throws XmlException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(sr, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from an XML stream reader with specified options. + * + * @param sr XMLStreamReader the stream reader to parse XML from + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + */ public static CurrentPregnancyType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(sr, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from a DOM node. + * + * @param node Node the DOM node to parse XML from + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + */ public static CurrentPregnancyType parse(final Node node) throws XmlException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(node, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from a DOM node with specified options. + * + * @param node Node the DOM node to parse XML from + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + */ public static CurrentPregnancyType parse(final Node node, final XmlOptions options) throws XmlException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(node, CurrentPregnancyType.type, options); } - + + /** + * Parses a CurrentPregnancyType from an XML input stream. + * + * @deprecated Use {@link #parse(InputStream)} instead + * @param xis XMLInputStream the XML input stream to parse from + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws XMLStreamException if an XML stream error occurs + */ @Deprecated public static CurrentPregnancyType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(xis, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Parses a CurrentPregnancyType from an XML input stream with specified options. + * + * @deprecated Use {@link #parse(InputStream, XmlOptions)} instead + * @param xis XMLInputStream the XML input stream to parse from + * @param options XmlOptions the XML options to use during parsing + * @return CurrentPregnancyType the parsed instance + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws XMLStreamException if an XML stream error occurs + */ @Deprecated public static CurrentPregnancyType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (CurrentPregnancyType)XmlBeans.getContextTypeLoader().parse(xis, CurrentPregnancyType.type, options); } - + + /** + * Creates a validating XML input stream from the given XML input stream. + * + * @deprecated XMLInputStream is deprecated + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws XMLStreamException if an XML stream error occurs + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, CurrentPregnancyType.type, (XmlOptions)null); } - + + /** + * Creates a validating XML input stream from the given XML input stream with specified options. + * + * @deprecated XMLInputStream is deprecated + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions the XML options to use during validation + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid or doesn't conform to the schema + * @throws XMLStreamException if an XML stream error occurs + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, CurrentPregnancyType.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/DiscussionTopicsType.java b/src/main/java/ca/openosp/openo/ar2005/DiscussionTopicsType.java index 92b25e7560b..902d4568af5 100644 --- a/src/main/java/ca/openosp/openo/ar2005/DiscussionTopicsType.java +++ b/src/main/java/ca/openosp/openo/ar2005/DiscussionTopicsType.java @@ -16,264 +16,881 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents prenatal discussion topics for the Antenatal Record (AR2005) healthcare form. + * + * This interface defines a comprehensive set of discussion topics that healthcare providers + * should cover during prenatal care visits. It includes topics covering pregnancy lifestyle + * (exercise, work, travel), prenatal education (classes, birth planning), medical concerns + * (preterm labour, bleeding, fetal movement), labour and delivery planning (pain management, + * admission timing, labour support), newborn care (breastfeeding, circumcision, car seat safety), + * and postpartum topics (depression screening, contraception, postpartum care). + * + * This type is part of the British Columbia Antenatal Record (BCAR) system and is used to + * track which prenatal education topics have been discussed with the patient during their + * pregnancy care. Each topic is represented as a boolean flag indicating whether it has been + * addressed with the patient. + * + * This interface is generated using Apache XMLBeans from an XML schema definition and provides + * strongly-typed access to prenatal discussion topic data for healthcare documentation and + * compliance purposes. + * + * @see XmlObject + * @since 2026-01-24 + */ public interface DiscussionTopicsType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(DiscussionTopicsType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("discussiontopicstype115dtype"); - + + /** + * Gets the exercise discussion flag indicating whether exercise during pregnancy has been discussed. + * + * @return boolean true if exercise topic has been discussed, false otherwise + */ boolean getExercise(); - + + /** + * Gets the exercise discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the exercise discussion flag as an XML boolean + */ XmlBoolean xgetExercise(); - + + /** + * Sets the exercise discussion flag. + * + * @param p0 boolean true if exercise topic has been discussed, false otherwise + */ void setExercise(final boolean p0); - + + /** + * Sets the exercise discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the exercise discussion flag as an XML boolean + */ void xsetExercise(final XmlBoolean p0); - + + /** + * Gets the work plan discussion flag indicating whether work planning during pregnancy has been discussed. + * + * @return boolean true if work plan topic has been discussed, false otherwise + */ boolean getWorkPlan(); - + + /** + * Gets the work plan discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the work plan discussion flag as an XML boolean + */ XmlBoolean xgetWorkPlan(); - + + /** + * Sets the work plan discussion flag. + * + * @param p0 boolean true if work plan topic has been discussed, false otherwise + */ void setWorkPlan(final boolean p0); - + + /** + * Sets the work plan discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the work plan discussion flag as an XML boolean + */ void xsetWorkPlan(final XmlBoolean p0); - + + /** + * Gets the intercourse discussion flag indicating whether sexual intercourse during pregnancy has been discussed. + * + * @return boolean true if intercourse topic has been discussed, false otherwise + */ boolean getIntercourse(); - + + /** + * Gets the intercourse discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the intercourse discussion flag as an XML boolean + */ XmlBoolean xgetIntercourse(); - + + /** + * Sets the intercourse discussion flag. + * + * @param p0 boolean true if intercourse topic has been discussed, false otherwise + */ void setIntercourse(final boolean p0); - + + /** + * Sets the intercourse discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the intercourse discussion flag as an XML boolean + */ void xsetIntercourse(final XmlBoolean p0); - + + /** + * Gets the travel discussion flag indicating whether travel during pregnancy has been discussed. + * + * @return boolean true if travel topic has been discussed, false otherwise + */ boolean getTravel(); - + + /** + * Gets the travel discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the travel discussion flag as an XML boolean + */ XmlBoolean xgetTravel(); - + + /** + * Sets the travel discussion flag. + * + * @param p0 boolean true if travel topic has been discussed, false otherwise + */ void setTravel(final boolean p0); - + + /** + * Sets the travel discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the travel discussion flag as an XML boolean + */ void xsetTravel(final XmlBoolean p0); - + + /** + * Gets the prenatal classes discussion flag indicating whether prenatal education classes have been discussed. + * + * @return boolean true if prenatal classes topic has been discussed, false otherwise + */ boolean getPrenatalClasses(); - + + /** + * Gets the prenatal classes discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the prenatal classes discussion flag as an XML boolean + */ XmlBoolean xgetPrenatalClasses(); - + + /** + * Sets the prenatal classes discussion flag. + * + * @param p0 boolean true if prenatal classes topic has been discussed, false otherwise + */ void setPrenatalClasses(final boolean p0); - + + /** + * Sets the prenatal classes discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the prenatal classes discussion flag as an XML boolean + */ void xsetPrenatalClasses(final XmlBoolean p0); - + + /** + * Gets the birth plan discussion flag indicating whether birth planning has been discussed. + * + * @return boolean true if birth plan topic has been discussed, false otherwise + */ boolean getBirthPlan(); - + + /** + * Gets the birth plan discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the birth plan discussion flag as an XML boolean + */ XmlBoolean xgetBirthPlan(); - + + /** + * Sets the birth plan discussion flag. + * + * @param p0 boolean true if birth plan topic has been discussed, false otherwise + */ void setBirthPlan(final boolean p0); - + + /** + * Sets the birth plan discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the birth plan discussion flag as an XML boolean + */ void xsetBirthPlan(final XmlBoolean p0); - + + /** + * Gets the on-call providers discussion flag indicating whether on-call provider information has been discussed. + * + * @return boolean true if on-call providers topic has been discussed, false otherwise + */ boolean getOnCallProviders(); - + + /** + * Gets the on-call providers discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the on-call providers discussion flag as an XML boolean + */ XmlBoolean xgetOnCallProviders(); - + + /** + * Sets the on-call providers discussion flag. + * + * @param p0 boolean true if on-call providers topic has been discussed, false otherwise + */ void setOnCallProviders(final boolean p0); - + + /** + * Sets the on-call providers discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the on-call providers discussion flag as an XML boolean + */ void xsetOnCallProviders(final XmlBoolean p0); - + + /** + * Gets the preterm labour discussion flag indicating whether signs and risks of preterm labour have been discussed. + * + * @return boolean true if preterm labour topic has been discussed, false otherwise + */ boolean getPretermLabour(); - + + /** + * Gets the preterm labour discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the preterm labour discussion flag as an XML boolean + */ XmlBoolean xgetPretermLabour(); - + + /** + * Sets the preterm labour discussion flag. + * + * @param p0 boolean true if preterm labour topic has been discussed, false otherwise + */ void setPretermLabour(final boolean p0); - + + /** + * Sets the preterm labour discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the preterm labour discussion flag as an XML boolean + */ void xsetPretermLabour(final XmlBoolean p0); - + + /** + * Gets the PROM discussion flag indicating whether Premature Rupture of Membranes has been discussed. + * + * @return boolean true if PROM topic has been discussed, false otherwise + */ boolean getPROM(); - + + /** + * Gets the PROM discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the PROM discussion flag as an XML boolean + */ XmlBoolean xgetPROM(); - + + /** + * Sets the PROM discussion flag. + * + * @param p0 boolean true if PROM topic has been discussed, false otherwise + */ void setPROM(final boolean p0); - + + /** + * Sets the PROM discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the PROM discussion flag as an XML boolean + */ void xsetPROM(final XmlBoolean p0); - + + /** + * Gets the APH discussion flag indicating whether Antepartum Hemorrhage (bleeding during pregnancy) has been discussed. + * + * @return boolean true if APH topic has been discussed, false otherwise + */ boolean getAPH(); - + + /** + * Gets the APH discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the APH discussion flag as an XML boolean + */ XmlBoolean xgetAPH(); - + + /** + * Sets the APH discussion flag. + * + * @param p0 boolean true if APH topic has been discussed, false otherwise + */ void setAPH(final boolean p0); - + + /** + * Sets the APH discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the APH discussion flag as an XML boolean + */ void xsetAPH(final XmlBoolean p0); - + + /** + * Gets the fetal movement discussion flag indicating whether monitoring fetal movement has been discussed. + * + * @return boolean true if fetal movement topic has been discussed, false otherwise + */ boolean getFetalMovement(); - + + /** + * Gets the fetal movement discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the fetal movement discussion flag as an XML boolean + */ XmlBoolean xgetFetalMovement(); - + + /** + * Sets the fetal movement discussion flag. + * + * @param p0 boolean true if fetal movement topic has been discussed, false otherwise + */ void setFetalMovement(final boolean p0); - + + /** + * Sets the fetal movement discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the fetal movement discussion flag as an XML boolean + */ void xsetFetalMovement(final XmlBoolean p0); - + + /** + * Gets the admission timing discussion flag indicating whether when to come to hospital for labour has been discussed. + * + * @return boolean true if admission timing topic has been discussed, false otherwise + */ boolean getAdmissionTiming(); - + + /** + * Gets the admission timing discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the admission timing discussion flag as an XML boolean + */ XmlBoolean xgetAdmissionTiming(); - + + /** + * Sets the admission timing discussion flag. + * + * @param p0 boolean true if admission timing topic has been discussed, false otherwise + */ void setAdmissionTiming(final boolean p0); - + + /** + * Sets the admission timing discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the admission timing discussion flag as an XML boolean + */ void xsetAdmissionTiming(final XmlBoolean p0); - + + /** + * Gets the pain management discussion flag indicating whether labour pain management options have been discussed. + * + * @return boolean true if pain management topic has been discussed, false otherwise + */ boolean getPainManagement(); - + + /** + * Gets the pain management discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the pain management discussion flag as an XML boolean + */ XmlBoolean xgetPainManagement(); - + + /** + * Sets the pain management discussion flag. + * + * @param p0 boolean true if pain management topic has been discussed, false otherwise + */ void setPainManagement(final boolean p0); - + + /** + * Sets the pain management discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the pain management discussion flag as an XML boolean + */ void xsetPainManagement(final XmlBoolean p0); - + + /** + * Gets the labour support discussion flag indicating whether support persons during labour have been discussed. + * + * @return boolean true if labour support topic has been discussed, false otherwise + */ boolean getLabourSupport(); - + + /** + * Gets the labour support discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the labour support discussion flag as an XML boolean + */ XmlBoolean xgetLabourSupport(); - + + /** + * Sets the labour support discussion flag. + * + * @param p0 boolean true if labour support topic has been discussed, false otherwise + */ void setLabourSupport(final boolean p0); - + + /** + * Sets the labour support discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the labour support discussion flag as an XML boolean + */ void xsetLabourSupport(final XmlBoolean p0); - + + /** + * Gets the breastfeeding discussion flag indicating whether breastfeeding and infant feeding options have been discussed. + * + * @return boolean true if breastfeeding topic has been discussed, false otherwise + */ boolean getBreastFeeding(); - + + /** + * Gets the breastfeeding discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the breastfeeding discussion flag as an XML boolean + */ XmlBoolean xgetBreastFeeding(); - + + /** + * Sets the breastfeeding discussion flag. + * + * @param p0 boolean true if breastfeeding topic has been discussed, false otherwise + */ void setBreastFeeding(final boolean p0); - + + /** + * Sets the breastfeeding discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the breastfeeding discussion flag as an XML boolean + */ void xsetBreastFeeding(final XmlBoolean p0); - + + /** + * Gets the circumcision discussion flag indicating whether newborn circumcision has been discussed. + * + * @return boolean true if circumcision topic has been discussed, false otherwise + */ boolean getCircumcision(); - + + /** + * Gets the circumcision discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the circumcision discussion flag as an XML boolean + */ XmlBoolean xgetCircumcision(); - + + /** + * Sets the circumcision discussion flag. + * + * @param p0 boolean true if circumcision topic has been discussed, false otherwise + */ void setCircumcision(final boolean p0); - + + /** + * Sets the circumcision discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the circumcision discussion flag as an XML boolean + */ void xsetCircumcision(final XmlBoolean p0); - + + /** + * Gets the discharge planning discussion flag indicating whether hospital discharge planning has been discussed. + * + * @return boolean true if discharge planning topic has been discussed, false otherwise + */ boolean getDischargePlanning(); - + + /** + * Gets the discharge planning discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the discharge planning discussion flag as an XML boolean + */ XmlBoolean xgetDischargePlanning(); - + + /** + * Sets the discharge planning discussion flag. + * + * @param p0 boolean true if discharge planning topic has been discussed, false otherwise + */ void setDischargePlanning(final boolean p0); - + + /** + * Sets the discharge planning discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the discharge planning discussion flag as an XML boolean + */ void xsetDischargePlanning(final XmlBoolean p0); - + + /** + * Gets the car seat safety discussion flag indicating whether infant car seat safety has been discussed. + * + * @return boolean true if car seat safety topic has been discussed, false otherwise + */ boolean getCarSeatSafety(); - + + /** + * Gets the car seat safety discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the car seat safety discussion flag as an XML boolean + */ XmlBoolean xgetCarSeatSafety(); - + + /** + * Sets the car seat safety discussion flag. + * + * @param p0 boolean true if car seat safety topic has been discussed, false otherwise + */ void setCarSeatSafety(final boolean p0); - + + /** + * Sets the car seat safety discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the car seat safety discussion flag as an XML boolean + */ void xsetCarSeatSafety(final XmlBoolean p0); - + + /** + * Gets the depression discussion flag indicating whether postpartum depression screening has been discussed. + * + * @return boolean true if depression topic has been discussed, false otherwise + */ boolean getDepression(); - + + /** + * Gets the depression discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the depression discussion flag as an XML boolean + */ XmlBoolean xgetDepression(); - + + /** + * Sets the depression discussion flag. + * + * @param p0 boolean true if depression topic has been discussed, false otherwise + */ void setDepression(final boolean p0); - + + /** + * Sets the depression discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the depression discussion flag as an XML boolean + */ void xsetDepression(final XmlBoolean p0); - + + /** + * Gets the contraception discussion flag indicating whether postpartum contraception options have been discussed. + * + * @return boolean true if contraception topic has been discussed, false otherwise + */ boolean getContraception(); - + + /** + * Gets the contraception discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the contraception discussion flag as an XML boolean + */ XmlBoolean xgetContraception(); - + + /** + * Sets the contraception discussion flag. + * + * @param p0 boolean true if contraception topic has been discussed, false otherwise + */ void setContraception(final boolean p0); - + + /** + * Sets the contraception discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the contraception discussion flag as an XML boolean + */ void xsetContraception(final XmlBoolean p0); - + + /** + * Gets the postpartum care discussion flag indicating whether postpartum care and follow-up have been discussed. + * + * @return boolean true if postpartum care topic has been discussed, false otherwise + */ boolean getPostpartumCare(); - + + /** + * Gets the postpartum care discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the postpartum care discussion flag as an XML boolean + */ XmlBoolean xgetPostpartumCare(); - + + /** + * Sets the postpartum care discussion flag. + * + * @param p0 boolean true if postpartum care topic has been discussed, false otherwise + */ void setPostpartumCare(final boolean p0); - + + /** + * Sets the postpartum care discussion flag using an XmlBoolean object. + * + * @param p0 XmlBoolean the postpartum care discussion flag as an XML boolean + */ void xsetPostpartumCare(final XmlBoolean p0); - + + /** + * Factory class for creating and parsing DiscussionTopicsType instances. + * + * This class provides static factory methods for creating new instances of DiscussionTopicsType + * and parsing XML data from various sources (String, File, URL, InputStream, Reader, XMLStreamReader, + * DOM Node, and XMLInputStream). It follows the Apache XMLBeans factory pattern for XML binding. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty DiscussionTopicsType instance with default options. + * + * @return DiscussionTopicsType a new empty instance + */ public static DiscussionTopicsType newInstance() { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().newInstance(DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Creates a new empty DiscussionTopicsType instance with specified XML options. + * + * @param options XmlOptions the XML options to use when creating the instance + * @return DiscussionTopicsType a new empty instance + */ public static DiscussionTopicsType newInstance(final XmlOptions options) { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().newInstance(DiscussionTopicsType.type, options); } - + + /** + * Parses an XML string into a DiscussionTopicsType instance. + * + * @param xmlAsString String the XML string to parse + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static DiscussionTopicsType parse(final String xmlAsString) throws XmlException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(xmlAsString, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses an XML string into a DiscussionTopicsType instance with specified options. + * + * @param xmlAsString String the XML string to parse + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static DiscussionTopicsType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(xmlAsString, DiscussionTopicsType.type, options); } - + + /** + * Parses an XML file into a DiscussionTopicsType instance. + * + * @param file File the XML file to parse + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading the file + */ public static DiscussionTopicsType parse(final File file) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(file, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses an XML file into a DiscussionTopicsType instance with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading the file + */ public static DiscussionTopicsType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(file, DiscussionTopicsType.type, options); } - + + /** + * Parses XML from a URL into a DiscussionTopicsType instance. + * + * @param u URL the URL to parse XML from + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the URL + */ public static DiscussionTopicsType parse(final URL u) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(u, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL into a DiscussionTopicsType instance with specified options. + * + * @param u URL the URL to parse XML from + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the URL + */ public static DiscussionTopicsType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(u, DiscussionTopicsType.type, options); } - + + /** + * Parses XML from an InputStream into a DiscussionTopicsType instance. + * + * @param is InputStream the input stream to parse XML from + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the stream + */ public static DiscussionTopicsType parse(final InputStream is) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(is, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses XML from an InputStream into a DiscussionTopicsType instance with specified options. + * + * @param is InputStream the input stream to parse XML from + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading from the stream + */ public static DiscussionTopicsType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(is, DiscussionTopicsType.type, options); } - + + /** + * Parses XML from a Reader into a DiscussionTopicsType instance. + * + * @param r Reader the reader to parse XML from + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading + */ public static DiscussionTopicsType parse(final Reader r) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(r, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses XML from a Reader into a DiscussionTopicsType instance with specified options. + * + * @param r Reader the reader to parse XML from + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs while reading + */ public static DiscussionTopicsType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(r, DiscussionTopicsType.type, options); } - + + /** + * Parses XML from an XMLStreamReader into a DiscussionTopicsType instance. + * + * @param sr XMLStreamReader the stream reader to parse XML from + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static DiscussionTopicsType parse(final XMLStreamReader sr) throws XmlException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(sr, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLStreamReader into a DiscussionTopicsType instance with specified options. + * + * @param sr XMLStreamReader the stream reader to parse XML from + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static DiscussionTopicsType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(sr, DiscussionTopicsType.type, options); } - + + /** + * Parses XML from a DOM Node into a DiscussionTopicsType instance. + * + * @param node Node the DOM node to parse XML from + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static DiscussionTopicsType parse(final Node node) throws XmlException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(node, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM Node into a DiscussionTopicsType instance with specified options. + * + * @param node Node the DOM node to parse XML from + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static DiscussionTopicsType parse(final Node node, final XmlOptions options) throws XmlException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(node, DiscussionTopicsType.type, options); } - + + /** + * Parses XML from an XMLInputStream into a DiscussionTopicsType instance. + * + * @param xis XMLInputStream the XML input stream to parse from + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if an error occurs while processing the stream + * @deprecated XMLInputStream is deprecated, use InputStream or XMLStreamReader instead + */ @Deprecated public static DiscussionTopicsType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(xis, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLInputStream into a DiscussionTopicsType instance with specified options. + * + * @param xis XMLInputStream the XML input stream to parse from + * @param options XmlOptions the XML options to use when parsing + * @return DiscussionTopicsType the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if an error occurs while processing the stream + * @deprecated XMLInputStream is deprecated, use InputStream or XMLStreamReader instead + */ @Deprecated public static DiscussionTopicsType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (DiscussionTopicsType)XmlBeans.getContextTypeLoader().parse(xis, DiscussionTopicsType.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream. + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid or cannot be validated + * @throws XMLStreamException if an error occurs while processing the stream + * @deprecated XMLInputStream is deprecated, use InputStream or XMLStreamReader instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, DiscussionTopicsType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with specified options. + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @param options XmlOptions the XML options to use when validating + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid or cannot be validated + * @throws XMLStreamException if an error occurs while processing the stream + * @deprecated XMLInputStream is deprecated, use InputStream or XMLStreamReader instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, DiscussionTopicsType.type, options); } - + + /** + * Private constructor to prevent instantiation of the Factory class. + * All methods in this class are static and should be called directly on the class. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/EthnicValueType.java b/src/main/java/ca/openosp/openo/ar2005/EthnicValueType.java index f00652ae610..4be89ec81a8 100644 --- a/src/main/java/ca/openosp/openo/ar2005/EthnicValueType.java +++ b/src/main/java/ca/openosp/openo/ar2005/EthnicValueType.java @@ -16,6 +16,30 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlString; +/** + * Ethnic value type enumeration for British Columbia Antenatal Record (BCAR) AR2005 forms. + * + *

    This interface represents standardized ethnic background codes used in prenatal and maternal healthcare + * documentation within the OpenO EMR system. It provides a controlled vocabulary for recording patient + * ethnicity information in accordance with BC healthcare reporting requirements.

    + * + *

    The ethnic value codes defined in this type include:

    + *
      + *
    • ANC001 - Ethnic background category 1
    • + *
    • ANC002 - Ethnic background category 2
    • + *
    • ANC005 - Ethnic background category 5
    • + *
    • ANC007 - Ethnic background category 7
    • + *
    • OTHER - Other ethnic backgrounds not covered by predefined categories
    • + *
    • UN - Unknown or not disclosed
    • + *
    + * + *

    This type is generated from XML schema definitions and implements the Apache XMLBeans framework + * for XML serialization and deserialization of antenatal record data.

    + * + * @see XmlString + * @see StringEnumAbstractBase + * @since 2026-01-24 + */ public interface EthnicValueType extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(EthnicValueType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("ethnicvaluetype7021type"); @@ -31,11 +55,38 @@ public interface EthnicValueType extends XmlString public static final int INT_ANC_007 = 4; public static final int INT_OTHER = 5; public static final int INT_UN = 6; - + + /** + * Retrieves the current enumeration value as a StringEnumAbstractBase object. + * + * @return StringEnumAbstractBase the current ethnic value enumeration + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the ethnic value to the specified enumeration. + * + * @param p0 StringEnumAbstractBase the ethnic value enumeration to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration class for ethnic value types in the BCAR AR2005 system. + * + *

    This class provides type-safe enumeration of ethnic background codes used in + * British Columbia antenatal records. It extends {@link StringEnumAbstractBase} to + * provide XML serialization support and bidirectional mapping between string codes + * and integer values.

    + * + *

    The enumeration supports conversion operations between:

    + *
      + *
    • String codes (e.g., "ANC001") and Enum instances
    • + *
    • Integer values (e.g., 1) and Enum instances
    • + *
    + * + * @see StringEnumAbstractBase + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_ANC_001 = 1; @@ -46,19 +97,46 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_UN = 6; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Converts a string code to its corresponding Enum instance. + * + * @param s String the ethnic value code (e.g., "ANC001", "ANC002", "OTHER", "UN") + * @return Enum the corresponding enumeration instance, or null if the string is not recognized + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Converts an integer value to its corresponding Enum instance. + * + * @param i int the integer representation of the ethnic value (1-6) + * @return Enum the corresponding enumeration instance, or null if the integer is out of range + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for creating Enum instances. + * + * @param s String the string code for this ethnic value + * @param i int the integer value for this ethnic value + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the deserialized object to the canonical Enum instance. + * + *

    This method ensures that deserialized Enum instances are resolved to the + * singleton instances maintained by the enumeration table, preserving object + * identity and enabling safe use of reference equality (==) comparisons.

    + * + * @return Object the canonical Enum instance corresponding to this object's integer value + */ private Object readResolve() { return forInt(this.intValue()); } @@ -67,97 +145,296 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("ANC001", 1), new Enum("ANC002", 2), new Enum("ANC005", 3), new Enum("ANC007", 4), new Enum("OTHER", 5), new Enum("UN", 6) }); } } - + + /** + * Factory class for creating and parsing EthnicValueType instances. + * + *

    This class provides comprehensive factory methods for creating EthnicValueType objects + * and parsing ethnic value data from various sources including XML strings, files, URLs, + * streams, and DOM nodes. It leverages the Apache XMLBeans framework for XML processing + * and schema validation.

    + * + *

    The factory supports multiple input formats:

    + *
      + *
    • String-based XML content
    • + *
    • File-based XML documents
    • + *
    • URL-based remote XML resources
    • + *
    • InputStream and Reader-based data sources
    • + *
    • XMLStreamReader for streaming XML parsing
    • + *
    • DOM Node for in-memory XML manipulation
    • + *
    • XMLInputStream (deprecated legacy format)
    • + *
    + * + *

    All parsing methods include overloaded versions accepting {@link XmlOptions} for + * customizing parsing behavior such as validation, error handling, and namespace processing.

    + * + * @see XmlBeans + * @see XmlOptions + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new EthnicValueType instance from an existing object. + * + * @param obj Object the source object to create the ethnic value from + * @return EthnicValueType a new instance initialized with the provided object's value + */ public static EthnicValueType newValue(final Object obj) { return (EthnicValueType)EthnicValueType.type.newValue(obj); } - + + /** + * Creates a new empty EthnicValueType instance with default configuration. + * + * @return EthnicValueType a new uninitialized instance + */ public static EthnicValueType newInstance() { return (EthnicValueType)XmlBeans.getContextTypeLoader().newInstance(EthnicValueType.type, (XmlOptions)null); } - + + /** + * Creates a new empty EthnicValueType instance with custom XML processing options. + * + * @param options XmlOptions the configuration options for XML processing + * @return EthnicValueType a new uninitialized instance + */ public static EthnicValueType newInstance(final XmlOptions options) { return (EthnicValueType)XmlBeans.getContextTypeLoader().newInstance(EthnicValueType.type, options); } - + + /** + * Parses an XML string to create an EthnicValueType instance. + * + * @param xmlAsString String the XML content as a string + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static EthnicValueType parse(final String xmlAsString) throws XmlException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(xmlAsString, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses an XML string to create an EthnicValueType instance with custom options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static EthnicValueType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(xmlAsString, EthnicValueType.type, options); } - + + /** + * Parses an XML file to create an EthnicValueType instance. + * + * @param file File the file containing XML content + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading the file + */ public static EthnicValueType parse(final File file) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(file, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses an XML file to create an EthnicValueType instance with custom options. + * + * @param file File the file containing XML content + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading the file + */ public static EthnicValueType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(file, EthnicValueType.type, options); } - + + /** + * Parses XML from a URL to create an EthnicValueType instance. + * + * @param u URL the URL pointing to XML content + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs retrieving the URL content + */ public static EthnicValueType parse(final URL u) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(u, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL to create an EthnicValueType instance with custom options. + * + * @param u URL the URL pointing to XML content + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs retrieving the URL content + */ public static EthnicValueType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(u, EthnicValueType.type, options); } - + + /** + * Parses XML from an input stream to create an EthnicValueType instance. + * + * @param is InputStream the input stream containing XML content + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static EthnicValueType parse(final InputStream is) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(is, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses XML from an input stream to create an EthnicValueType instance with custom options. + * + * @param is InputStream the input stream containing XML content + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static EthnicValueType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(is, EthnicValueType.type, options); } - + + /** + * Parses XML from a character reader to create an EthnicValueType instance. + * + * @param r Reader the character reader containing XML content + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static EthnicValueType parse(final Reader r) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(r, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses XML from a character reader to create an EthnicValueType instance with custom options. + * + * @param r Reader the character reader containing XML content + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static EthnicValueType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(r, EthnicValueType.type, options); } - + + /** + * Parses XML from a streaming XML reader to create an EthnicValueType instance. + * + * @param sr XMLStreamReader the streaming XML reader positioned at the element to parse + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static EthnicValueType parse(final XMLStreamReader sr) throws XmlException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(sr, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses XML from a streaming XML reader to create an EthnicValueType instance with custom options. + * + * @param sr XMLStreamReader the streaming XML reader positioned at the element to parse + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static EthnicValueType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(sr, EthnicValueType.type, options); } - + + /** + * Parses XML from a DOM node to create an EthnicValueType instance. + * + * @param node Node the DOM node containing XML content + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static EthnicValueType parse(final Node node) throws XmlException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(node, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM node to create an EthnicValueType instance with custom options. + * + * @param node Node the DOM node containing XML content + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static EthnicValueType parse(final Node node, final XmlOptions options) throws XmlException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(node, EthnicValueType.type, options); } - + + /** + * Parses XML from an XMLInputStream to create an EthnicValueType instance. + * + * @param xis XMLInputStream the XML input stream (legacy format) + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws XMLStreamException if an error occurs during stream processing + * @deprecated XMLInputStream is deprecated. Use {@link XMLStreamReader} instead. + */ @Deprecated public static EthnicValueType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(xis, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLInputStream to create an EthnicValueType instance with custom options. + * + * @param xis XMLInputStream the XML input stream (legacy format) + * @param options XmlOptions the configuration options for parsing + * @return EthnicValueType the parsed ethnic value instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws XMLStreamException if an error occurs during stream processing + * @deprecated XMLInputStream is deprecated. Use {@link XMLStreamReader} instead. + */ @Deprecated public static EthnicValueType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (EthnicValueType)XmlBeans.getContextTypeLoader().parse(xis, EthnicValueType.type, options); } - + + /** + * Creates a validating XMLInputStream for schema validation. + * + * @param xis XMLInputStream the source XML input stream to validate + * @return XMLInputStream a validating stream wrapper + * @throws XmlException if the stream cannot be validated + * @throws XMLStreamException if an error occurs during stream processing + * @deprecated XMLInputStream is deprecated. Use {@link XMLStreamReader} for validation instead. + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, EthnicValueType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream for schema validation with custom options. + * + * @param xis XMLInputStream the source XML input stream to validate + * @param options XmlOptions the configuration options for validation + * @return XMLInputStream a validating stream wrapper + * @throws XmlException if the stream cannot be validated + * @throws XMLStreamException if an error occurs during stream processing + * @deprecated XMLInputStream is deprecated. Use {@link XMLStreamReader} for validation instead. + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, EthnicValueType.type, options); } - + + /** + * Private constructor to prevent instantiation of this utility class. + * + *

    The Factory class provides only static methods and should not be instantiated.

    + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/InitialLaboratoryInvestigations.java b/src/main/java/ca/openosp/openo/ar2005/InitialLaboratoryInvestigations.java index bf45a14810b..6d1eab8955c 100644 --- a/src/main/java/ca/openosp/openo/ar2005/InitialLaboratoryInvestigations.java +++ b/src/main/java/ca/openosp/openo/ar2005/InitialLaboratoryInvestigations.java @@ -21,164 +21,603 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents the initial laboratory investigations section of the British Columbia Antenatal Record (AR2005) form. + * + *

    This interface provides comprehensive access to prenatal laboratory test results including blood type, + * infectious disease screening, and other routine prenatal investigations as required by BC healthcare standards. + * The interface is generated from XML Schema using Apache XMLBeans and provides type-safe access to all + * laboratory result fields.

    + * + *

    Key laboratory investigations included:

    + *
      + *
    • Hemoglobin (Hb) level testing
    • + *
    • HIV screening with counseling documentation
    • + *
    • Pap smear results and date tracking
    • + *
    • Mean Corpuscular Volume (MCV) for anemia assessment
    • + *
    • ABO blood type and Rh factor determination
    • + *
    • Antibody screening for blood incompatibility
    • + *
    • Gonorrhea and Chlamydia screening
    • + *
    • Rubella immunity status
    • + *
    • Urinalysis results
    • + *
    • Hepatitis B surface antigen (HBsAg) screening
    • + *
    • VDRL test for syphilis
    • + *
    • Sickle cell screening
    • + *
    • Prenatal genetic screening options
    • + *
    • Custom laboratory test entries
    • + *
    + * + *

    This interface extends {@link XmlObject} and provides both standard Java accessors and XMLBeans-specific + * xget/xset methods for fine-grained XML manipulation. Result enumerations include standardized values + * (POS/NEG/NDONE/UNK/IND) to ensure consistent data entry and reporting.

    + * + * @see PrenatalGeneticScreeningType + * @see CustomLab + * @see XmlObject + * @since 2026-01-24 + */ public interface InitialLaboratoryInvestigations extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(InitialLaboratoryInvestigations.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("initiallaboratoryinvestigations708dtype"); - + + /** + * Gets the hemoglobin (Hb) test result value. + * + * @return String the hemoglobin result value (typically in g/L or g/dL units) + */ String getHbResult(); - + + /** + * Gets the hemoglobin result as an XMLBeans XmlString object for advanced XML manipulation. + * + * @return XmlString the XML representation of the hemoglobin result + */ XmlString xgetHbResult(); - + + /** + * Sets the hemoglobin (Hb) test result value. + * + * @param p0 String the hemoglobin result value to set + */ void setHbResult(final String p0); - + + /** + * Sets the hemoglobin result using an XMLBeans XmlString object. + * + * @param p0 XmlString the XML representation of the hemoglobin result + */ void xsetHbResult(final XmlString p0); + /** + * Gets the HIV test result enumeration value. + * + * @return HivResult.Enum the HIV test result (POS, NEG, IND, NDONE, or UNK) + */ HivResult.Enum getHivResult(); - + + /** + * Gets the HIV result as an XMLBeans HivResult object for advanced XML manipulation. + * + * @return HivResult the XML representation of the HIV result + */ HivResult xgetHivResult(); - + + /** + * Sets the HIV test result enumeration value. + * + * @param p0 HivResult.Enum the HIV test result to set (POS, NEG, IND, NDONE, or UNK) + */ void setHivResult(final HivResult.Enum p0); - + + /** + * Sets the HIV result using an XMLBeans HivResult object. + * + * @param p0 HivResult the XML representation of the HIV result + */ void xsetHivResult(final HivResult p0); - + + /** + * Gets whether HIV counseling was provided to the patient. + * + * @return boolean true if HIV counseling was provided, false otherwise + */ boolean getHivCounsel(); - + + /** + * Gets the HIV counseling status as an XMLBeans XmlBoolean object. + * + * @return XmlBoolean the XML representation of the HIV counseling status + */ XmlBoolean xgetHivCounsel(); - + + /** + * Sets whether HIV counseling was provided to the patient. + * + * @param p0 boolean true if HIV counseling was provided, false otherwise + */ void setHivCounsel(final boolean p0); - + + /** + * Sets the HIV counseling status using an XMLBeans XmlBoolean object. + * + * @param p0 XmlBoolean the XML representation of the HIV counseling status + */ void xsetHivCounsel(final XmlBoolean p0); + /** + * Gets the date of the last Pap smear test. + * + * @return Calendar the date of the last Pap smear, or null if not set + */ Calendar getLastPapDate(); - + + /** + * Gets the last Pap smear date as an XMLBeans XmlDate object. + * + * @return XmlDate the XML representation of the last Pap smear date + */ XmlDate xgetLastPapDate(); - + + /** + * Checks if the last Pap smear date is explicitly set to nil (XML null). + * + * @return boolean true if the date is nil, false otherwise + */ boolean isNilLastPapDate(); - + + /** + * Sets the date of the last Pap smear test. + * + * @param p0 Calendar the date of the last Pap smear to set + */ void setLastPapDate(final Calendar p0); - + + /** + * Sets the last Pap smear date using an XMLBeans XmlDate object. + * + * @param p0 XmlDate the XML representation of the last Pap smear date + */ void xsetLastPapDate(final XmlDate p0); - + + /** + * Sets the last Pap smear date to nil (XML null), indicating no date is available. + */ void setNilLastPapDate(); - + + /** + * Gets the Pap smear test result. + * + * @return String the Pap smear result description + */ String getPapResult(); - + + /** + * Gets the Pap smear result as an XMLBeans XmlString object. + * + * @return XmlString the XML representation of the Pap smear result + */ XmlString xgetPapResult(); - + + /** + * Sets the Pap smear test result. + * + * @param p0 String the Pap smear result description to set + */ void setPapResult(final String p0); - + + /** + * Sets the Pap smear result using an XMLBeans XmlString object. + * + * @param p0 XmlString the XML representation of the Pap smear result + */ void xsetPapResult(final XmlString p0); + /** + * Gets the Mean Corpuscular Volume (MCV) test result value. + * MCV is used to assess red blood cell size and diagnose different types of anemia. + * + * @return float the MCV result value (typically in femtoliters, fL) + */ float getMcvResult(); - + + /** + * Gets the MCV result as an XMLBeans McvResult object. + * + * @return McvResult the XML representation of the MCV result + */ McvResult xgetMcvResult(); - + + /** + * Checks if the MCV result is explicitly set to nil (XML null). + * + * @return boolean true if the result is nil, false otherwise + */ boolean isNilMcvResult(); - + + /** + * Sets the Mean Corpuscular Volume (MCV) test result value. + * + * @param p0 float the MCV result value to set (typically in femtoliters, fL) + */ void setMcvResult(final float p0); - + + /** + * Sets the MCV result using an XMLBeans McvResult object. + * + * @param p0 McvResult the XML representation of the MCV result + */ void xsetMcvResult(final McvResult p0); - + + /** + * Sets the MCV result to nil (XML null), indicating no result is available. + */ void setNilMcvResult(); + /** + * Gets the ABO blood type result. + * + * @return AboResult.Enum the ABO blood type (A, B, AB, O, NDONE, or UNK) + */ AboResult.Enum getAboResult(); - + + /** + * Gets the ABO blood type result as an XMLBeans AboResult object. + * + * @return AboResult the XML representation of the ABO blood type + */ AboResult xgetAboResult(); - + + /** + * Sets the ABO blood type result. + * + * @param p0 AboResult.Enum the ABO blood type to set (A, B, AB, O, NDONE, or UNK) + */ void setAboResult(final AboResult.Enum p0); - + + /** + * Sets the ABO blood type result using an XMLBeans AboResult object. + * + * @param p0 AboResult the XML representation of the ABO blood type + */ void xsetAboResult(final AboResult p0); - + + /** + * Gets the Rh factor (Rhesus) test result. + * + * @return RhResult.Enum the Rh factor result (POS, WPOS, NEG, NDONE, or UNK) + */ RhResult.Enum getRhResult(); - + + /** + * Gets the Rh factor result as an XMLBeans RhResult object. + * + * @return RhResult the XML representation of the Rh factor result + */ RhResult xgetRhResult(); - + + /** + * Sets the Rh factor (Rhesus) test result. + * + * @param p0 RhResult.Enum the Rh factor result to set (POS, WPOS, NEG, NDONE, or UNK) + */ void setRhResult(final RhResult.Enum p0); - + + /** + * Sets the Rh factor result using an XMLBeans RhResult object. + * + * @param p0 RhResult the XML representation of the Rh factor result + */ void xsetRhResult(final RhResult p0); - + + /** + * Gets the antibody screening test result. + * Used to detect irregular antibodies that may cause blood incompatibility issues. + * + * @return String the antibody screening result description + */ String getAntibodyResult(); - + + /** + * Gets the antibody screening result as an XMLBeans XmlString object. + * + * @return XmlString the XML representation of the antibody screening result + */ XmlString xgetAntibodyResult(); - + + /** + * Sets the antibody screening test result. + * + * @param p0 String the antibody screening result description to set + */ void setAntibodyResult(final String p0); - + + /** + * Sets the antibody screening result using an XMLBeans XmlString object. + * + * @param p0 XmlString the XML representation of the antibody screening result + */ void xsetAntibodyResult(final XmlString p0); + /** + * Gets the gonorrhea screening test result. + * + * @return GcResultGonorrhea.Enum the gonorrhea test result (POS, NEG, NDONE, or UNK) + */ GcResultGonorrhea.Enum getGcResultGonorrhea(); - + + /** + * Gets the gonorrhea test result as an XMLBeans GcResultGonorrhea object. + * + * @return GcResultGonorrhea the XML representation of the gonorrhea test result + */ GcResultGonorrhea xgetGcResultGonorrhea(); - + + /** + * Sets the gonorrhea screening test result. + * + * @param p0 GcResultGonorrhea.Enum the gonorrhea test result to set (POS, NEG, NDONE, or UNK) + */ void setGcResultGonorrhea(final GcResultGonorrhea.Enum p0); - + + /** + * Sets the gonorrhea test result using an XMLBeans GcResultGonorrhea object. + * + * @param p0 GcResultGonorrhea the XML representation of the gonorrhea test result + */ void xsetGcResultGonorrhea(final GcResultGonorrhea p0); - + + /** + * Gets the Chlamydia screening test result. + * + * @return GcResultChlamydia.Enum the Chlamydia test result (POS, NEG, NDONE, or UNK) + */ GcResultChlamydia.Enum getGcResultChlamydia(); - + + /** + * Gets the Chlamydia test result as an XMLBeans GcResultChlamydia object. + * + * @return GcResultChlamydia the XML representation of the Chlamydia test result + */ GcResultChlamydia xgetGcResultChlamydia(); - + + /** + * Sets the Chlamydia screening test result. + * + * @param p0 GcResultChlamydia.Enum the Chlamydia test result to set (POS, NEG, NDONE, or UNK) + */ void setGcResultChlamydia(final GcResultChlamydia.Enum p0); - + + /** + * Sets the Chlamydia test result using an XMLBeans GcResultChlamydia object. + * + * @param p0 GcResultChlamydia the XML representation of the Chlamydia test result + */ void xsetGcResultChlamydia(final GcResultChlamydia p0); + /** + * Gets the rubella immunity screening test result. + * Rubella screening determines immunity status to prevent congenital rubella syndrome. + * + * @return String the rubella immunity test result description + */ String getRubellaResult(); - + + /** + * Gets the rubella test result as an XMLBeans XmlString object. + * + * @return XmlString the XML representation of the rubella test result + */ XmlString xgetRubellaResult(); - + + /** + * Sets the rubella immunity screening test result. + * + * @param p0 String the rubella immunity test result description to set + */ void setRubellaResult(final String p0); - + + /** + * Sets the rubella test result using an XMLBeans XmlString object. + * + * @param p0 XmlString the XML representation of the rubella test result + */ void xsetRubellaResult(final XmlString p0); - + + /** + * Gets the urinalysis test result. + * + * @return String the urinalysis result description + */ String getUrineResult(); - + + /** + * Gets the urinalysis result as an XMLBeans XmlString object. + * + * @return XmlString the XML representation of the urinalysis result + */ XmlString xgetUrineResult(); - + + /** + * Sets the urinalysis test result. + * + * @param p0 String the urinalysis result description to set + */ void setUrineResult(final String p0); - + + /** + * Sets the urinalysis result using an XMLBeans XmlString object. + * + * @param p0 XmlString the XML representation of the urinalysis result + */ void xsetUrineResult(final XmlString p0); + /** + * Gets the Hepatitis B surface antigen (HBsAg) screening test result. + * HBsAg testing identifies active Hepatitis B infection. + * + * @return HbsAgResult.Enum the HBsAg test result (POS, NEG, NDONE, or UNK) + */ HbsAgResult.Enum getHbsAgResult(); - + + /** + * Gets the HBsAg test result as an XMLBeans HbsAgResult object. + * + * @return HbsAgResult the XML representation of the HBsAg test result + */ HbsAgResult xgetHbsAgResult(); - + + /** + * Sets the Hepatitis B surface antigen (HBsAg) screening test result. + * + * @param p0 HbsAgResult.Enum the HBsAg test result to set (POS, NEG, NDONE, or UNK) + */ void setHbsAgResult(final HbsAgResult.Enum p0); - + + /** + * Sets the HBsAg test result using an XMLBeans HbsAgResult object. + * + * @param p0 HbsAgResult the XML representation of the HBsAg test result + */ void xsetHbsAgResult(final HbsAgResult p0); - + + /** + * Gets the VDRL (Venereal Disease Research Laboratory) test result. + * VDRL is a screening test for syphilis. + * + * @return VdrlResult.Enum the VDRL test result (POS, NEG, NDONE, or UNK) + */ VdrlResult.Enum getVdrlResult(); - + + /** + * Gets the VDRL test result as an XMLBeans VdrlResult object. + * + * @return VdrlResult the XML representation of the VDRL test result + */ VdrlResult xgetVdrlResult(); - + + /** + * Sets the VDRL (Venereal Disease Research Laboratory) test result. + * + * @param p0 VdrlResult.Enum the VDRL test result to set (POS, NEG, NDONE, or UNK) + */ void setVdrlResult(final VdrlResult.Enum p0); - + + /** + * Sets the VDRL test result using an XMLBeans VdrlResult object. + * + * @param p0 VdrlResult the XML representation of the VDRL test result + */ void xsetVdrlResult(final VdrlResult p0); - + + /** + * Gets the sickle cell screening test result. + * Sickle cell screening identifies sickle cell trait or disease. + * + * @return SickleCellResult.Enum the sickle cell test result (POS, NEG, NDONE, or UNK) + */ SickleCellResult.Enum getSickleCellResult(); - + + /** + * Gets the sickle cell test result as an XMLBeans SickleCellResult object. + * + * @return SickleCellResult the XML representation of the sickle cell test result + */ SickleCellResult xgetSickleCellResult(); - + + /** + * Sets the sickle cell screening test result. + * + * @param p0 SickleCellResult.Enum the sickle cell test result to set (POS, NEG, NDONE, or UNK) + */ void setSickleCellResult(final SickleCellResult.Enum p0); - + + /** + * Sets the sickle cell test result using an XMLBeans SickleCellResult object. + * + * @param p0 SickleCellResult the XML representation of the sickle cell test result + */ void xsetSickleCellResult(final SickleCellResult p0); + /** + * Gets the prenatal genetic screening information. + * Includes details about genetic screening tests offered during pregnancy. + * + * @return PrenatalGeneticScreeningType the prenatal genetic screening data + */ PrenatalGeneticScreeningType getPrenatalGenericScreening(); - + + /** + * Sets the prenatal genetic screening information. + * + * @param p0 PrenatalGeneticScreeningType the prenatal genetic screening data to set + */ void setPrenatalGenericScreening(final PrenatalGeneticScreeningType p0); - + + /** + * Creates and adds a new prenatal genetic screening entry. + * + * @return PrenatalGeneticScreeningType the newly created prenatal genetic screening object + */ PrenatalGeneticScreeningType addNewPrenatalGenericScreening(); - + + /** + * Gets the first custom laboratory test entry. + * Allows for facility-specific or non-standard laboratory tests. + * + * @return CustomLab the first custom laboratory test data + */ CustomLab getCustomLab1(); - + + /** + * Sets the first custom laboratory test entry. + * + * @param p0 CustomLab the first custom laboratory test data to set + */ void setCustomLab1(final CustomLab p0); - + + /** + * Creates and adds a new first custom laboratory test entry. + * + * @return CustomLab the newly created first custom laboratory test object + */ CustomLab addNewCustomLab1(); - + + /** + * Gets the second custom laboratory test entry. + * Allows for facility-specific or non-standard laboratory tests. + * + * @return CustomLab the second custom laboratory test data + */ CustomLab getCustomLab2(); - + + /** + * Sets the second custom laboratory test entry. + * + * @param p0 CustomLab the second custom laboratory test data to set + */ void setCustomLab2(final CustomLab p0); - + + /** + * Creates and adds a new second custom laboratory test entry. + * + * @return CustomLab the newly created second custom laboratory test object + */ CustomLab addNewCustomLab2(); + /** + * Enumeration interface for HIV test result values. + * + *

    Defines standardized HIV test result codes used in prenatal screening:

    + *
      + *
    • POS - Positive result (HIV antibodies detected)
    • + *
    • NEG - Negative result (no HIV antibodies detected)
    • + *
    • IND - Indeterminate result (requires further testing)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface HivResult extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(HivResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("hivresultd08belemtype"); @@ -192,11 +631,26 @@ public interface HivResult extends XmlString public static final int INT_IND = 3; public static final int INT_NDONE = 4; public static final int INT_UNK = 5; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration class representing HIV test result values. + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_POS = 1; @@ -206,70 +660,149 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_UNK = 5; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Converts a string value to the corresponding Enum constant. + * + * @param s String the string representation of the HIV result + * @return Enum the corresponding HIV result enum constant + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Converts an integer value to the corresponding Enum constant. + * + * @param i int the integer representation of the HIV result + * @return Enum the corresponding HIV result enum constant + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + private Enum(final String s, final int i) { super(s, i); } - + private Object readResolve() { return forInt(this.intValue()); } - + static { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("POS", 1), new Enum("NEG", 2), new Enum("IND", 3), new Enum("NDONE", 4), new Enum("UNK", 5) }); } } - + + /** + * Factory class for creating HivResult instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new HivResult from an object value. + * + * @param obj Object the object to convert to HivResult + * @return HivResult the created HivResult instance + */ public static HivResult newValue(final Object obj) { return (HivResult)HivResult.type.newValue(obj); } - + + /** + * Creates a new HivResult instance with default options. + * + * @return HivResult the newly created HivResult instance + */ public static HivResult newInstance() { return (HivResult)XmlBeans.getContextTypeLoader().newInstance(HivResult.type, (XmlOptions)null); } - + + /** + * Creates a new HivResult instance with specified XML options. + * + * @param options XmlOptions the XML options to use for creation + * @return HivResult the newly created HivResult instance + */ public static HivResult newInstance(final XmlOptions options) { return (HivResult)XmlBeans.getContextTypeLoader().newInstance(HivResult.type, options); } - + private Factory() { } } } + /** + * Interface for Mean Corpuscular Volume (MCV) test result values. + * + *

    MCV is a measurement of the average size of red blood cells, expressed in femtoliters (fL). + * This test is used to classify different types of anemia and other blood disorders.

    + * + * @since 2026-01-24 + */ public interface McvResult extends XmlFloat { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(McvResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("mcvresult5216elemtype"); - + + /** + * Factory class for creating McvResult instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new McvResult from an object value. + * + * @param obj Object the object to convert to McvResult + * @return McvResult the created McvResult instance + */ public static McvResult newValue(final Object obj) { return (McvResult)McvResult.type.newValue(obj); } - + + /** + * Creates a new McvResult instance with default options. + * + * @return McvResult the newly created McvResult instance + */ public static McvResult newInstance() { return (McvResult)XmlBeans.getContextTypeLoader().newInstance(McvResult.type, (XmlOptions)null); } - + + /** + * Creates a new McvResult instance with specified XML options. + * + * @param options XmlOptions the XML options to use for creation + * @return McvResult the newly created McvResult instance + */ public static McvResult newInstance(final XmlOptions options) { return (McvResult)XmlBeans.getContextTypeLoader().newInstance(McvResult.type, options); } - + private Factory() { } } } + /** + * Enumeration interface for ABO blood type result values. + * + *

    Defines standardized ABO blood group classifications:

    + *
      + *
    • A - Blood type A
    • + *
    • B - Blood type B
    • + *
    • AB - Blood type AB
    • + *
    • O - Blood type O
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface AboResult extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(AboResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("aboresultefe4elemtype"); @@ -285,9 +818,19 @@ public interface AboResult extends XmlString public static final int INT_O = 4; public static final int INT_NDONE = 5; public static final int INT_UNK = 6; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -341,6 +884,20 @@ private Factory() { } } + /** + * Enumeration interface for Rh factor (Rhesus) test result values. + * + *

    Defines standardized Rh factor classifications:

    + *
      + *
    • POS - Positive (Rh+)
    • + *
    • WPOS - Weak positive (variant Rh antigen detected)
    • + *
    • NEG - Negative (Rh-)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface RhResult extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(RhResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("rhresultc3dcelemtype"); @@ -354,9 +911,19 @@ public interface RhResult extends XmlString public static final int INT_NEG = 3; public static final int INT_NDONE = 4; public static final int INT_UNK = 5; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -409,6 +976,19 @@ private Factory() { } } + /** + * Enumeration interface for gonorrhea screening test result values. + * + *

    Defines standardized gonorrhea test result codes:

    + *
      + *
    • POS - Positive (gonorrhea detected)
    • + *
    • NEG - Negative (no gonorrhea detected)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface GcResultGonorrhea extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(GcResultGonorrhea.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("gcresultgonorrhead61belemtype"); @@ -420,9 +1000,19 @@ public interface GcResultGonorrhea extends XmlString public static final int INT_NEG = 2; public static final int INT_NDONE = 3; public static final int INT_UNK = 4; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -474,6 +1064,19 @@ private Factory() { } } + /** + * Enumeration interface for Chlamydia screening test result values. + * + *

    Defines standardized Chlamydia test result codes:

    + *
      + *
    • POS - Positive (Chlamydia detected)
    • + *
    • NEG - Negative (no Chlamydia detected)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface GcResultChlamydia extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(GcResultChlamydia.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("gcresultchlamydiacb16elemtype"); @@ -485,9 +1088,19 @@ public interface GcResultChlamydia extends XmlString public static final int INT_NEG = 2; public static final int INT_NDONE = 3; public static final int INT_UNK = 4; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -539,6 +1152,19 @@ private Factory() { } } + /** + * Enumeration interface for Hepatitis B surface antigen (HBsAg) test result values. + * + *

    Defines standardized HBsAg test result codes:

    + *
      + *
    • POS - Positive (active Hepatitis B infection detected)
    • + *
    • NEG - Negative (no active Hepatitis B infection)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface HbsAgResult extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(HbsAgResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("hbsagresultd4b5elemtype"); @@ -550,9 +1176,19 @@ public interface HbsAgResult extends XmlString public static final int INT_NEG = 2; public static final int INT_NDONE = 3; public static final int INT_UNK = 4; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -604,6 +1240,19 @@ private Factory() { } } + /** + * Enumeration interface for VDRL (Venereal Disease Research Laboratory) test result values. + * + *

    VDRL is a screening test for syphilis. Defines standardized result codes:

    + *
      + *
    • POS - Positive (reactive, indicates possible syphilis infection)
    • + *
    • NEG - Negative (non-reactive, no syphilis detected)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface VdrlResult extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(VdrlResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("vdrlresultce0eelemtype"); @@ -615,9 +1264,19 @@ public interface VdrlResult extends XmlString public static final int INT_NEG = 2; public static final int INT_NDONE = 3; public static final int INT_UNK = 4; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -669,6 +1328,19 @@ private Factory() { } } + /** + * Enumeration interface for sickle cell screening test result values. + * + *

    Sickle cell screening identifies sickle cell trait or disease. Defines standardized result codes:

    + *
      + *
    • POS - Positive (sickle cell trait or disease detected)
    • + *
    • NEG - Negative (no sickle cell trait or disease)
    • + *
    • NDONE - Not done (test not performed)
    • + *
    • UNK - Unknown (result status unknown)
    • + *
    + * + * @since 2026-01-24 + */ public interface SickleCellResult extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(SickleCellResult.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("sicklecellresultb65felemtype"); @@ -680,9 +1352,19 @@ public interface SickleCellResult extends XmlString public static final int INT_NEG = 2; public static final int INT_NDONE = 3; public static final int INT_UNK = 4; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * + * @return StringEnumAbstractBase the enumeration value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enumeration value from a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); public static final class Enum extends StringEnumAbstractBase @@ -734,92 +1416,262 @@ private Factory() { } } + /** + * Factory class for creating and parsing InitialLaboratoryInvestigations instances. + * + *

    Provides methods to create new instances and parse from various sources including + * String, File, URL, InputStream, Reader, XMLStreamReader, and DOM Node.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new InitialLaboratoryInvestigations instance with default options. + * + * @return InitialLaboratoryInvestigations the newly created instance + */ public static InitialLaboratoryInvestigations newInstance() { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().newInstance(InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Creates a new InitialLaboratoryInvestigations instance with specified XML options. + * + * @param options XmlOptions the XML options to use for creation + * @return InitialLaboratoryInvestigations the newly created instance + */ public static InitialLaboratoryInvestigations newInstance(final XmlOptions options) { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().newInstance(InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an XML string. + * + * @param xmlAsString String the XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static InitialLaboratoryInvestigations parse(final String xmlAsString) throws XmlException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(xmlAsString, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an XML string with options. + * + * @param xmlAsString String the XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static InitialLaboratoryInvestigations parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(xmlAsString, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a file. + * + * @param file File the file containing XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading the file + */ public static InitialLaboratoryInvestigations parse(final File file) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(file, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a file with options. + * + * @param file File the file containing XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading the file + */ public static InitialLaboratoryInvestigations parse(final File file, final XmlOptions options) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(file, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a URL. + * + * @param u URL the URL pointing to XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading from the URL + */ public static InitialLaboratoryInvestigations parse(final URL u) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(u, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a URL with options. + * + * @param u URL the URL pointing to XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading from the URL + */ public static InitialLaboratoryInvestigations parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(u, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an InputStream. + * + * @param is InputStream the input stream containing XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading from the stream + */ public static InitialLaboratoryInvestigations parse(final InputStream is) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(is, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an InputStream with options. + * + * @param is InputStream the input stream containing XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading from the stream + */ public static InitialLaboratoryInvestigations parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(is, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a Reader. + * + * @param r Reader the reader providing XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading from the reader + */ public static InitialLaboratoryInvestigations parse(final Reader r) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(r, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a Reader with options. + * + * @param r Reader the reader providing XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if an I/O error occurs reading from the reader + */ public static InitialLaboratoryInvestigations parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(r, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an XMLStreamReader. + * + * @param sr XMLStreamReader the stream reader providing XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static InitialLaboratoryInvestigations parse(final XMLStreamReader sr) throws XmlException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(sr, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an XMLStreamReader with options. + * + * @param sr XMLStreamReader the stream reader providing XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static InitialLaboratoryInvestigations parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(sr, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a DOM Node. + * + * @param node Node the DOM node containing XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static InitialLaboratoryInvestigations parse(final Node node) throws XmlException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(node, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from a DOM Node with options. + * + * @param node Node the DOM node containing XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static InitialLaboratoryInvestigations parse(final Node node, final XmlOptions options) throws XmlException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(node, InitialLaboratoryInvestigations.type, options); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an XMLInputStream. + * + * @param xis XMLInputStream the input stream containing XML content to parse + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated, use parse(InputStream) or parse(XMLStreamReader) instead + */ @Deprecated public static InitialLaboratoryInvestigations parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(xis, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Parses an InitialLaboratoryInvestigations document from an XMLInputStream with options. + * + * @param xis XMLInputStream the input stream containing XML content to parse + * @param options XmlOptions the XML options to use for parsing + * @return InitialLaboratoryInvestigations the parsed instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated, use parse(InputStream, XmlOptions) or parse(XMLStreamReader, XmlOptions) instead + */ @Deprecated public static InitialLaboratoryInvestigations parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (InitialLaboratoryInvestigations)XmlBeans.getContextTypeLoader().parse(xis, InitialLaboratoryInvestigations.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream. + * + * @param xis XMLInputStream the input stream to validate + * @return XMLInputStream a validating input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated, use XMLStreamReader validation instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, InitialLaboratoryInvestigations.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with options. + * + * @param xis XMLInputStream the input stream to validate + * @param options XmlOptions the XML options to use for validation + * @return XMLInputStream a validating input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated, use XMLStreamReader validation instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, InitialLaboratoryInvestigations.type, options); } - + private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryAndPhysicalExam.java b/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryAndPhysicalExam.java index 73cba604e0e..195ac3472f4 100644 --- a/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryAndPhysicalExam.java +++ b/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryAndPhysicalExam.java @@ -15,138 +15,458 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XMLBeans interface representing the Medical History and Physical Examination section + * of the British Columbia Antenatal Record (BCAR/AR2005) form. + * + * This interface provides structured access to comprehensive prenatal care documentation including: + * - Current pregnancy details and status + * - Patient medical history and conditions + * - Generic health history information + * - Infectious disease screening and history + * - Psychosocial assessment and risk factors + * - Family medical history + * - Physical examination findings + * + * The AR2005 form is a standardized provincial healthcare document used across British Columbia + * for antenatal care tracking and must comply with BC Ministry of Health data standards. + * + * This interface is auto-generated from XML schema definitions using Apache XMLBeans framework, + * providing type-safe XML serialization/deserialization for healthcare data exchange. + * + * @see CurrentPregnancyType + * @see MedicalHistoryType + * @see GenericHistoryType + * @see InfectiousDiseaseType + * @see PsychosocialType + * @see FamilyHistoryType + * @see PhysicalExaminationType + * @since 2026-01-23 + */ public interface MedicalHistoryAndPhysicalExam extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(MedicalHistoryAndPhysicalExam.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("medicalhistoryandphysicalexam176ftype"); - + + /** + * Gets the current pregnancy information including gestational details, prenatal visits, + * and pregnancy-specific medical conditions. + * + * @return CurrentPregnancyType the current pregnancy data, or null if not set + */ CurrentPregnancyType getCurrentPregnancy(); - + + /** + * Sets the current pregnancy information for this antenatal record. + * + * @param p0 CurrentPregnancyType containing pregnancy details including EDC, gestational age, and prenatal care + */ void setCurrentPregnancy(final CurrentPregnancyType p0); - + + /** + * Creates and adds a new current pregnancy element to this medical history record. + * + * @return CurrentPregnancyType newly created pregnancy element ready for population + */ CurrentPregnancyType addNewCurrentPregnancy(); - + + /** + * Gets the patient's medical history including pre-existing conditions, surgeries, + * hospitalizations, and chronic diseases relevant to antenatal care. + * + * @return MedicalHistoryType the medical history data, or null if not set + */ MedicalHistoryType getMedicalHistory(); - + + /** + * Sets the medical history for this patient record. + * + * @param p0 MedicalHistoryType containing comprehensive medical background including conditions, medications, and allergies + */ void setMedicalHistory(final MedicalHistoryType p0); - + + /** + * Creates and adds a new medical history element to this record. + * + * @return MedicalHistoryType newly created medical history element ready for population + */ MedicalHistoryType addNewMedicalHistory(); - + + /** + * Gets the generic health history information including lifestyle factors, + * general health status, and non-specific medical background. + * + * @return GenericHistoryType the generic health history data, or null if not set + */ GenericHistoryType getGenericHistory(); - + + /** + * Sets the generic health history for this patient record. + * + * @param p0 GenericHistoryType containing general health information and lifestyle factors + */ void setGenericHistory(final GenericHistoryType p0); - + + /** + * Creates and adds a new generic history element to this record. + * + * @return GenericHistoryType newly created generic history element ready for population + */ GenericHistoryType addNewGenericHistory(); - + + /** + * Gets the infectious disease history and screening results including HIV, Hepatitis B/C, + * syphilis, and other communicable diseases relevant to maternal-fetal health. + * + * @return InfectiousDiseaseType the infectious disease data, or null if not set + */ InfectiousDiseaseType getInfectiousDisease(); - + + /** + * Sets the infectious disease information for this patient record. + * + * @param p0 InfectiousDiseaseType containing screening results and infectious disease history + */ void setInfectiousDisease(final InfectiousDiseaseType p0); - + + /** + * Creates and adds a new infectious disease element to this record. + * + * @return InfectiousDiseaseType newly created infectious disease element ready for population + */ InfectiousDiseaseType addNewInfectiousDisease(); - + + /** + * Gets the psychosocial assessment including mental health status, social support, + * substance use, domestic violence screening, and other social determinants of health. + * + * @return PsychosocialType the psychosocial assessment data, or null if not set + */ PsychosocialType getPsychosocial(); - + + /** + * Sets the psychosocial assessment for this patient record. + * + * @param p0 PsychosocialType containing mental health, social support, and risk factor assessment + */ void setPsychosocial(final PsychosocialType p0); - + + /** + * Creates and adds a new psychosocial assessment element to this record. + * + * @return PsychosocialType newly created psychosocial element ready for population + */ PsychosocialType addNewPsychosocial(); - + + /** + * Gets the family medical history including hereditary conditions, genetic disorders, + * and familial disease patterns that may affect pregnancy outcomes. + * + * @return FamilyHistoryType the family history data, or null if not set + */ FamilyHistoryType getFamilyHistory(); - + + /** + * Sets the family medical history for this patient record. + * + * @param p0 FamilyHistoryType containing hereditary conditions and family health patterns + */ void setFamilyHistory(final FamilyHistoryType p0); - + + /** + * Creates and adds a new family history element to this record. + * + * @return FamilyHistoryType newly created family history element ready for population + */ FamilyHistoryType addNewFamilyHistory(); - + + /** + * Gets the physical examination findings including vital signs, anatomical assessments, + * pelvic examination results, and clinical observations from prenatal visits. + * + * @return PhysicalExaminationType the physical examination data, or null if not set + */ PhysicalExaminationType getPhysicalExamination(); - + + /** + * Sets the physical examination findings for this patient record. + * + * @param p0 PhysicalExaminationType containing clinical examination results and vital signs + */ void setPhysicalExamination(final PhysicalExaminationType p0); - + + /** + * Creates and adds a new physical examination element to this record. + * + * @return PhysicalExaminationType newly created physical examination element ready for population + */ PhysicalExaminationType addNewPhysicalExamination(); - + + /** + * Factory class providing static methods for creating and parsing MedicalHistoryAndPhysicalExam + * XML documents in compliance with BC Antenatal Record schema standards. + * + * Provides multiple parsing options for different input sources (String, File, URL, InputStream, + * Reader, XMLStreamReader, DOM Node) to support flexible healthcare data integration scenarios. + * + * All parse methods validate against the AR2005 XML schema to ensure data integrity and + * compliance with provincial healthcare data exchange standards. + */ public static final class Factory { + /** + * Creates a new empty instance of MedicalHistoryAndPhysicalExam with default options. + * + * @return MedicalHistoryAndPhysicalExam newly created instance ready for population + */ public static MedicalHistoryAndPhysicalExam newInstance() { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().newInstance(MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Creates a new empty instance of MedicalHistoryAndPhysicalExam with custom XML options. + * + * @param options XmlOptions for controlling XML generation behavior (character set, namespace handling, validation) + * @return MedicalHistoryAndPhysicalExam newly created instance with specified options + */ public static MedicalHistoryAndPhysicalExam newInstance(final XmlOptions options) { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().newInstance(MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML string into MedicalHistoryAndPhysicalExam object with schema validation. + * + * @param xmlAsString String containing XML representation of medical history and physical exam data + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + */ public static MedicalHistoryAndPhysicalExam parse(final String xmlAsString) throws XmlException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(xmlAsString, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML string into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param xmlAsString String containing XML representation of medical history and physical exam data + * @param options XmlOptions for controlling parsing behavior (error handling, validation level, namespace resolution) + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + */ public static MedicalHistoryAndPhysicalExam parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(xmlAsString, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML file into MedicalHistoryAndPhysicalExam object with schema validation. + * + * @param file File containing XML document with antenatal record data + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if file cannot be read or accessed + */ public static MedicalHistoryAndPhysicalExam parse(final File file) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(file, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML file into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param file File containing XML document with antenatal record data + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if file cannot be read or accessed + */ public static MedicalHistoryAndPhysicalExam parse(final File file, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(file, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML from URL into MedicalHistoryAndPhysicalExam object with schema validation. + * Useful for fetching antenatal records from remote healthcare systems or web services. + * + * @param u URL pointing to XML document with medical history data + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if URL cannot be accessed or content cannot be read + */ public static MedicalHistoryAndPhysicalExam parse(final URL u) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(u, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML from URL into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param u URL pointing to XML document with medical history data + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if URL cannot be accessed or content cannot be read + */ public static MedicalHistoryAndPhysicalExam parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(u, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML from InputStream into MedicalHistoryAndPhysicalExam object with schema validation. + * Supports streaming processing of large healthcare documents. + * + * @param is InputStream containing XML data + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if stream cannot be read + */ public static MedicalHistoryAndPhysicalExam parse(final InputStream is) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(is, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML from InputStream into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param is InputStream containing XML data + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if stream cannot be read + */ public static MedicalHistoryAndPhysicalExam parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(is, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML from Reader into MedicalHistoryAndPhysicalExam object with schema validation. + * Supports character-based XML processing with encoding control. + * + * @param r Reader containing XML character data + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if reader cannot be read + */ public static MedicalHistoryAndPhysicalExam parse(final Reader r) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(r, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML from Reader into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param r Reader containing XML character data + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws IOException if reader cannot be read + */ public static MedicalHistoryAndPhysicalExam parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(r, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML from XMLStreamReader into MedicalHistoryAndPhysicalExam object with schema validation. + * Supports StAX-based XML processing for efficient memory usage with large documents. + * + * @param sr XMLStreamReader positioned at the start of medical history element + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + */ public static MedicalHistoryAndPhysicalExam parse(final XMLStreamReader sr) throws XmlException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(sr, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML from XMLStreamReader into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param sr XMLStreamReader positioned at the start of medical history element + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + */ public static MedicalHistoryAndPhysicalExam parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(sr, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML from DOM Node into MedicalHistoryAndPhysicalExam object with schema validation. + * Supports integration with DOM-based XML processing workflows. + * + * @param node Node DOM node containing medical history XML structure + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + */ public static MedicalHistoryAndPhysicalExam parse(final Node node) throws XmlException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(node, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML from DOM Node into MedicalHistoryAndPhysicalExam object with custom options. + * + * @param node Node DOM node containing medical history XML structure + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + */ public static MedicalHistoryAndPhysicalExam parse(final Node node, final XmlOptions options) throws XmlException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(node, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Parses XML from XMLInputStream into MedicalHistoryAndPhysicalExam object with schema validation. + * + * @deprecated XMLInputStream is deprecated in Apache XMLBeans; use XMLStreamReader-based methods instead + * @param xis XMLInputStream containing XML data + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws XMLStreamException if stream processing error occurs + */ @Deprecated public static MedicalHistoryAndPhysicalExam parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(xis, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Parses XML from XMLInputStream into MedicalHistoryAndPhysicalExam object with custom options. + * + * @deprecated XMLInputStream is deprecated in Apache XMLBeans; use XMLStreamReader-based methods instead + * @param xis XMLInputStream containing XML data + * @param options XmlOptions for controlling parsing behavior + * @return MedicalHistoryAndPhysicalExam parsed and validated object + * @throws XmlException if XML is malformed or fails schema validation + * @throws XMLStreamException if stream processing error occurs + */ @Deprecated public static MedicalHistoryAndPhysicalExam parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (MedicalHistoryAndPhysicalExam)XmlBeans.getContextTypeLoader().parse(xis, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper for schema validation. + * + * @deprecated XMLInputStream is deprecated in Apache XMLBeans; use XMLStreamReader-based validation instead + * @param xis XMLInputStream to wrap with validation + * @return XMLInputStream validating stream wrapper + * @throws XmlException if validation setup fails + * @throws XMLStreamException if stream processing error occurs + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, MedicalHistoryAndPhysicalExam.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper for schema validation with custom options. + * + * @deprecated XMLInputStream is deprecated in Apache XMLBeans; use XMLStreamReader-based validation instead + * @param xis XMLInputStream to wrap with validation + * @param options XmlOptions for controlling validation behavior + * @return XMLInputStream validating stream wrapper + * @throws XmlException if validation setup fails + * @throws XMLStreamException if stream processing error occurs + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, MedicalHistoryAndPhysicalExam.type, options); } - + + /** + * Private constructor to prevent instantiation of this utility class. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryType.java b/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryType.java index d1f1f70e43c..abe9611d5ad 100644 --- a/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryType.java +++ b/src/main/java/ca/openosp/openo/ar2005/MedicalHistoryType.java @@ -16,182 +16,602 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XML Type representation for Medical History data structure in the AR2005 (British Columbia Antenatal Record) system. + * + * This interface represents a patient's comprehensive medical history including various medical conditions, + * surgical history, and treatment information. It is part of the BC Antenatal Record form system used for + * pregnancy care documentation in British Columbia healthcare facilities. + * + * The medical history captures yes/no/null responses for common medical conditions including: + *
      + *
    • Cardiovascular conditions (hypertension, cardiac)
    • + *
    • Metabolic and endocrine disorders
    • + *
    • Urinary tract conditions
    • + *
    • Liver and hematological conditions
    • + *
    • Gynecological history
    • + *
    • Surgical history and anesthetics exposure
    • + *
    • Psychiatric and neurological conditions
    • + *
    • Blood transfusion history
    • + *
    + * + * This is a generated XML Beans interface that provides strongly-typed access to XML data conforming + * to the AR2005 schema. The interface extends {@link XmlObject} to provide XML serialization and + * deserialization capabilities. + * + * @see YesNoNullType + * @see XmlObject + * @since 2026-01-23 + */ public interface MedicalHistoryType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(MedicalHistoryType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("medicalhistorytype49f4type"); - + + /** + * Gets the hypertension status from the medical history. + * + * @return YesNoNullType the hypertension status (yes/no/null) + */ YesNoNullType getHypertension(); - + + /** + * Sets the hypertension status in the medical history. + * + * @param p0 YesNoNullType the hypertension status to set (yes/no/null) + */ void setHypertension(final YesNoNullType p0); - + + /** + * Adds a new hypertension element to the medical history. + * + * @return YesNoNullType the newly created hypertension status object + */ YesNoNullType addNewHypertension(); - + + /** + * Gets the endocrine condition status from the medical history. + * + * @return YesNoNullType the endocrine condition status (yes/no/null) + */ YesNoNullType getEndorince(); - + + /** + * Sets the endocrine condition status in the medical history. + * + * @param p0 YesNoNullType the endocrine condition status to set (yes/no/null) + */ void setEndorince(final YesNoNullType p0); - + + /** + * Adds a new endocrine condition element to the medical history. + * + * @return YesNoNullType the newly created endocrine condition status object + */ YesNoNullType addNewEndorince(); - + + /** + * Gets the urinary tract condition status from the medical history. + * + * @return YesNoNullType the urinary tract condition status (yes/no/null) + */ YesNoNullType getUrinaryTract(); - + + /** + * Sets the urinary tract condition status in the medical history. + * + * @param p0 YesNoNullType the urinary tract condition status to set (yes/no/null) + */ void setUrinaryTract(final YesNoNullType p0); - + + /** + * Adds a new urinary tract condition element to the medical history. + * + * @return YesNoNullType the newly created urinary tract condition status object + */ YesNoNullType addNewUrinaryTract(); - + + /** + * Gets the cardiac condition status from the medical history. + * + * @return YesNoNullType the cardiac condition status (yes/no/null) + */ YesNoNullType getCardiac(); - + + /** + * Sets the cardiac condition status in the medical history. + * + * @param p0 YesNoNullType the cardiac condition status to set (yes/no/null) + */ void setCardiac(final YesNoNullType p0); - + + /** + * Adds a new cardiac condition element to the medical history. + * + * @return YesNoNullType the newly created cardiac condition status object + */ YesNoNullType addNewCardiac(); - + + /** + * Gets the liver condition status from the medical history. + * + * @return YesNoNullType the liver condition status (yes/no/null) + */ YesNoNullType getLiver(); - + + /** + * Sets the liver condition status in the medical history. + * + * @param p0 YesNoNullType the liver condition status to set (yes/no/null) + */ void setLiver(final YesNoNullType p0); - + + /** + * Adds a new liver condition element to the medical history. + * + * @return YesNoNullType the newly created liver condition status object + */ YesNoNullType addNewLiver(); - + + /** + * Gets the gynecological condition status from the medical history. + * + * @return YesNoNullType the gynecological condition status (yes/no/null) + */ YesNoNullType getGynaecology(); - + + /** + * Sets the gynecological condition status in the medical history. + * + * @param p0 YesNoNullType the gynecological condition status to set (yes/no/null) + */ void setGynaecology(final YesNoNullType p0); - + + /** + * Adds a new gynecological condition element to the medical history. + * + * @return YesNoNullType the newly created gynecological condition status object + */ YesNoNullType addNewGynaecology(); - + + /** + * Gets the hematological (blood disorder) condition status from the medical history. + * + * @return YesNoNullType the hematological condition status (yes/no/null) + */ YesNoNullType getHem(); - + + /** + * Sets the hematological condition status in the medical history. + * + * @param p0 YesNoNullType the hematological condition status to set (yes/no/null) + */ void setHem(final YesNoNullType p0); - + + /** + * Adds a new hematological condition element to the medical history. + * + * @return YesNoNullType the newly created hematological condition status object + */ YesNoNullType addNewHem(); - + + /** + * Gets the surgical history status from the medical history. + * + * @return YesNoNullType the surgical history status indicating if patient has had surgeries (yes/no/null) + */ YesNoNullType getSurgeries(); - + + /** + * Sets the surgical history status in the medical history. + * + * @param p0 YesNoNullType the surgical history status to set (yes/no/null) + */ void setSurgeries(final YesNoNullType p0); - + + /** + * Adds a new surgical history element to the medical history. + * + * @return YesNoNullType the newly created surgical history status object + */ YesNoNullType addNewSurgeries(); - + + /** + * Gets the blood transfusion history status from the medical history. + * + * @return YesNoNullType the blood transfusion history status (yes/no/null) + */ YesNoNullType getBloodTransfusion(); - + + /** + * Sets the blood transfusion history status in the medical history. + * + * @param p0 YesNoNullType the blood transfusion history status to set (yes/no/null) + */ void setBloodTransfusion(final YesNoNullType p0); - + + /** + * Adds a new blood transfusion history element to the medical history. + * + * @return YesNoNullType the newly created blood transfusion history status object + */ YesNoNullType addNewBloodTransfusion(); - + + /** + * Gets the anesthetics exposure history status from the medical history. + * + * @return YesNoNullType the anesthetics exposure history status (yes/no/null) + */ YesNoNullType getAnesthetics(); - + + /** + * Sets the anesthetics exposure history status in the medical history. + * + * @param p0 YesNoNullType the anesthetics exposure history status to set (yes/no/null) + */ void setAnesthetics(final YesNoNullType p0); - + + /** + * Adds a new anesthetics exposure history element to the medical history. + * + * @return YesNoNullType the newly created anesthetics exposure history status object + */ YesNoNullType addNewAnesthetics(); - + + /** + * Gets the psychiatric condition history status from the medical history. + * + * @return YesNoNullType the psychiatric condition history status (yes/no/null) + */ YesNoNullType getPsychiatry(); - + + /** + * Sets the psychiatric condition history status in the medical history. + * + * @param p0 YesNoNullType the psychiatric condition history status to set (yes/no/null) + */ void setPsychiatry(final YesNoNullType p0); - + + /** + * Adds a new psychiatric condition history element to the medical history. + * + * @return YesNoNullType the newly created psychiatric condition history status object + */ YesNoNullType addNewPsychiatry(); - + + /** + * Gets the epilepsy condition status from the medical history. + * + * @return YesNoNullType the epilepsy condition status (yes/no/null) + */ YesNoNullType getEpilepsy(); - + + /** + * Sets the epilepsy condition status in the medical history. + * + * @param p0 YesNoNullType the epilepsy condition status to set (yes/no/null) + */ void setEpilepsy(final YesNoNullType p0); - + + /** + * Adds a new epilepsy condition element to the medical history. + * + * @return YesNoNullType the newly created epilepsy condition status object + */ YesNoNullType addNewEpilepsy(); - + + /** + * Gets the description text for other medical conditions not covered by specific categories. + * + * @return String the free-text description of other medical conditions + */ String getOtherDescr(); - + + /** + * Gets the description text for other medical conditions as an XmlString object. + * + * @return XmlString the XML representation of the other medical conditions description + */ XmlString xgetOtherDescr(); - + + /** + * Sets the description text for other medical conditions. + * + * @param p0 String the free-text description to set for other medical conditions + */ void setOtherDescr(final String p0); - + + /** + * Sets the description text for other medical conditions using an XmlString object. + * + * @param p0 XmlString the XML representation of the description to set + */ void xsetOtherDescr(final XmlString p0); - + + /** + * Gets the status indicating presence of other medical conditions not categorized above. + * + * @return YesNoNullType the status indicating if other medical conditions exist (yes/no/null) + */ YesNoNullType getOther(); - + + /** + * Sets the status indicating presence of other medical conditions. + * + * @param p0 YesNoNullType the status to set for other medical conditions (yes/no/null) + */ void setOther(final YesNoNullType p0); - + + /** + * Adds a new element for other medical conditions to the medical history. + * + * @return YesNoNullType the newly created other medical conditions status object + */ YesNoNullType addNewOther(); - + + /** + * Factory class for creating and parsing MedicalHistoryType instances. + * + * This inner class provides static factory methods for: + *
      + *
    • Creating new MedicalHistoryType instances
    • + *
    • Parsing MedicalHistoryType from various input sources (String, File, URL, Stream, etc.)
    • + *
    • XML validation operations
    • + *
    + * + * The Factory uses Apache XMLBeans context type loader to handle XML serialization + * and deserialization operations. + */ public static final class Factory { + /** + * Creates a new MedicalHistoryType instance with default options. + * + * @return MedicalHistoryType a new instance of MedicalHistoryType + */ public static MedicalHistoryType newInstance() { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().newInstance(MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Creates a new MedicalHistoryType instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options to use + * @return MedicalHistoryType a new instance of MedicalHistoryType + */ public static MedicalHistoryType newInstance(final XmlOptions options) { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().newInstance(MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from an XML string with default options. + * + * @param xmlAsString String the XML content as a string + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static MedicalHistoryType parse(final String xmlAsString) throws XmlException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(xmlAsString, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from an XML string with specified options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static MedicalHistoryType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(xmlAsString, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from an XML file with default options. + * + * @param file File the file containing XML content + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the file cannot be read + */ public static MedicalHistoryType parse(final File file) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(file, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from an XML file with specified options. + * + * @param file File the file containing XML content + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the file cannot be read + */ public static MedicalHistoryType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(file, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from a URL with default options. + * + * @param u URL the URL pointing to XML content + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the URL cannot be accessed + */ public static MedicalHistoryType parse(final URL u) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(u, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from a URL with specified options. + * + * @param u URL the URL pointing to XML content + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the URL cannot be accessed + */ public static MedicalHistoryType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(u, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from an input stream with default options. + * + * @param is InputStream the input stream containing XML content + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the stream cannot be read + */ public static MedicalHistoryType parse(final InputStream is) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(is, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from an input stream with specified options. + * + * @param is InputStream the input stream containing XML content + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the stream cannot be read + */ public static MedicalHistoryType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(is, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from a Reader with default options. + * + * @param r Reader the reader providing XML content + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the reader cannot be accessed + */ public static MedicalHistoryType parse(final Reader r) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(r, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from a Reader with specified options. + * + * @param r Reader the reader providing XML content + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the reader cannot be accessed + */ public static MedicalHistoryType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(r, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from an XMLStreamReader with default options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static MedicalHistoryType parse(final XMLStreamReader sr) throws XmlException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(sr, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from an XMLStreamReader with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static MedicalHistoryType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(sr, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from a DOM Node with default options. + * + * @param node Node the DOM node containing XML content + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static MedicalHistoryType parse(final Node node) throws XmlException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(node, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from a DOM Node with specified options. + * + * @param node Node the DOM node containing XML content + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static MedicalHistoryType parse(final Node node, final XmlOptions options) throws XmlException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(node, MedicalHistoryType.type, options); } - + + /** + * Parses a MedicalHistoryType from an XMLInputStream with default options. + * + * @param xis XMLInputStream the XML input stream + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error processing the stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static MedicalHistoryType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(xis, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Parses a MedicalHistoryType from an XMLInputStream with specified options. + * + * @param xis XMLInputStream the XML input stream + * @param options XmlOptions the XML parsing options to use + * @return MedicalHistoryType the parsed MedicalHistoryType instance + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error processing the stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static MedicalHistoryType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (MedicalHistoryType)XmlBeans.getContextTypeLoader().parse(xis, MedicalHistoryType.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with default options. + * + * @param xis XMLInputStream the source XML input stream + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if there is an error processing the stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, MedicalHistoryType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with specified options. + * + * @param xis XMLInputStream the source XML input stream + * @param options XmlOptions the XML validation options to use + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if there is an error processing the stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, MedicalHistoryType.type, options); } - + + /** + * Private constructor to prevent instantiation of this factory class. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/ObstetricalHistoryItemList.java b/src/main/java/ca/openosp/openo/ar2005/ObstetricalHistoryItemList.java index ec35e435fe1..abbbb5c2e44 100644 --- a/src/main/java/ca/openosp/openo/ar2005/ObstetricalHistoryItemList.java +++ b/src/main/java/ca/openosp/openo/ar2005/ObstetricalHistoryItemList.java @@ -19,78 +19,282 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents an obstetrical history item in the British Columbia Antenatal Record (BCAR) system. + * + * This XMLBeans-generated interface provides structured access to pregnancy and delivery outcome data + * collected during prenatal care and obstetrical assessments. It captures essential information about + * previous pregnancies including delivery details, gestational age, birth weight, and delivery method. + * + * The interface is part of the AR2005 (Antenatal Record 2005) form system used in British Columbia + * for tracking maternal health and pregnancy outcomes. It supports standardized data collection for + * obstetrical history documentation required for comprehensive prenatal care. + * + * Key features: + *
      + *
    • Tracks year of delivery and gestational age at birth
    • + *
    • Records infant sex, birth weight, and place of birth
    • + *
    • Captures delivery method (vaginal, cesarean, assisted, etc.)
    • + *
    • Documents length of labour and additional clinical comments
    • + *
    • Supports XML serialization/deserialization for data exchange
    • + *
    + * + * @since 2026-01-24 + * @see ca.openosp.openo.ar2005 AR2005 form package + */ public interface ObstetricalHistoryItemList extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(ObstetricalHistoryItemList.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("obstetricalhistoryitemliste7c8type"); - + + /** + * Gets the year of delivery. + * + * @return int the year when the delivery occurred + */ int getYear(); - + + /** + * Gets the year value as an XmlInt object. + * + * @return XmlInt the year value wrapped in an XmlInt object + */ XmlInt xgetYear(); - + + /** + * Sets the year of delivery. + * + * @param p0 int the year when the delivery occurred + */ void setYear(final int p0); - + + /** + * Sets the year value using an XmlInt object. + * + * @param p0 XmlInt the year value wrapped in an XmlInt object + */ void xsetYear(final XmlInt p0); - + + /** + * Gets the sex of the infant. + * + * @return Sex.Enum the infant's sex (M=Male, F=Female, A=Ambiguous, U=Unknown) + */ Sex.Enum getSex(); - + + /** + * Gets the sex value as a Sex object. + * + * @return Sex the infant's sex wrapped in a Sex object + */ Sex xgetSex(); - + + /** + * Sets the sex of the infant. + * + * @param p0 Sex.Enum the infant's sex (M=Male, F=Female, A=Ambiguous, U=Unknown) + */ void setSex(final Sex.Enum p0); - + + /** + * Sets the sex value using a Sex object. + * + * @param p0 Sex the infant's sex wrapped in a Sex object + */ void xsetSex(final Sex p0); - + + /** + * Gets the gestational age at birth in weeks. + * + * @return int the gestational age in completed weeks + */ int getGestAge(); - + + /** + * Gets the gestational age value as an XmlInt object. + * + * @return XmlInt the gestational age wrapped in an XmlInt object + */ XmlInt xgetGestAge(); - + + /** + * Sets the gestational age at birth in weeks. + * + * @param p0 int the gestational age in completed weeks + */ void setGestAge(final int p0); - + + /** + * Sets the gestational age value using an XmlInt object. + * + * @param p0 XmlInt the gestational age wrapped in an XmlInt object + */ void xsetGestAge(final XmlInt p0); - + + /** + * Gets the birth weight of the infant. + * + * @return String the birth weight, typically in grams or pounds/ounces + */ String getBirthWeight(); - + + /** + * Gets the birth weight value as an XmlString object. + * + * @return XmlString the birth weight wrapped in an XmlString object + */ XmlString xgetBirthWeight(); - + + /** + * Sets the birth weight of the infant. + * + * @param p0 String the birth weight, typically in grams or pounds/ounces + */ void setBirthWeight(final String p0); - + + /** + * Sets the birth weight value using an XmlString object. + * + * @param p0 XmlString the birth weight wrapped in an XmlString object + */ void xsetBirthWeight(final XmlString p0); - + + /** + * Gets the length of labour in hours. + * + * @return float the duration of labour in hours + */ float getLengthOfLabour(); - + + /** + * Gets the length of labour value as an XmlFloat object. + * + * @return XmlFloat the labour duration wrapped in an XmlFloat object + */ XmlFloat xgetLengthOfLabour(); - + + /** + * Checks if the length of labour value is nil (null/not applicable). + * + * @return boolean true if the length of labour is nil, false otherwise + */ boolean isNilLengthOfLabour(); - + + /** + * Sets the length of labour in hours. + * + * @param p0 float the duration of labour in hours + */ void setLengthOfLabour(final float p0); - + + /** + * Sets the length of labour value using an XmlFloat object. + * + * @param p0 XmlFloat the labour duration wrapped in an XmlFloat object + */ void xsetLengthOfLabour(final XmlFloat p0); - + + /** + * Sets the length of labour to nil (null/not applicable). + */ void setNilLengthOfLabour(); - + + /** + * Gets the place where the birth occurred. + * + * @return String the birth location (hospital name, home, birthing center, etc.) + */ String getPlaceOfBirth(); - + + /** + * Gets the place of birth value as an XmlString object. + * + * @return XmlString the birth location wrapped in an XmlString object + */ XmlString xgetPlaceOfBirth(); - + + /** + * Sets the place where the birth occurred. + * + * @param p0 String the birth location (hospital name, home, birthing center, etc.) + */ void setPlaceOfBirth(final String p0); - + + /** + * Sets the place of birth value using an XmlString object. + * + * @param p0 XmlString the birth location wrapped in an XmlString object + */ void xsetPlaceOfBirth(final XmlString p0); - + + /** + * Gets the type of delivery method used. + * + * @return TypeOfDelivery.Enum the delivery method (AVAG, IND, CS, SVAG, VAG, UN) + */ TypeOfDelivery.Enum getTypeOfDelivery(); - + + /** + * Gets the type of delivery value as a TypeOfDelivery object. + * + * @return TypeOfDelivery the delivery method wrapped in a TypeOfDelivery object + */ TypeOfDelivery xgetTypeOfDelivery(); - + + /** + * Sets the type of delivery method used. + * + * @param p0 TypeOfDelivery.Enum the delivery method (AVAG, IND, CS, SVAG, VAG, UN) + */ void setTypeOfDelivery(final TypeOfDelivery.Enum p0); - + + /** + * Sets the type of delivery value using a TypeOfDelivery object. + * + * @param p0 TypeOfDelivery the delivery method wrapped in a TypeOfDelivery object + */ void xsetTypeOfDelivery(final TypeOfDelivery p0); - + + /** + * Gets additional clinical comments or notes about the delivery. + * + * @return String free-text comments about the delivery or pregnancy outcome + */ String getComments(); - + + /** + * Gets the comments value as an XmlString object. + * + * @return XmlString the comments wrapped in an XmlString object + */ XmlString xgetComments(); - + + /** + * Sets additional clinical comments or notes about the delivery. + * + * @param p0 String free-text comments about the delivery or pregnancy outcome + */ void setComments(final String p0); - + + /** + * Sets the comments value using an XmlString object. + * + * @param p0 XmlString the comments wrapped in an XmlString object + */ void xsetComments(final XmlString p0); + /** + * Enumeration representing the sex of the infant at birth. + * + * Defines standard sex categories used in obstetrical records: + *
      + *
    • M (Male) - Male infant
    • + *
    • F (Female) - Female infant
    • + *
    • A (Ambiguous) - Ambiguous genitalia or intersex condition
    • + *
    • U (Unknown) - Sex not determined or not yet assigned
    • + *
    + * + * @since 2026-01-24 + */ public interface Sex extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Sex.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("sex4536elemtype"); @@ -102,11 +306,28 @@ public interface Sex extends XmlString public static final int INT_F = 2; public static final int INT_A = 3; public static final int INT_U = 4; - + + /** + * Gets the enumeration value. + * + * @return StringEnumAbstractBase the underlying enum value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the sex value using a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the sex enumeration value to set + */ void set(final StringEnumAbstractBase p0); + /** + * Enumeration implementation for Sex values. + * + * Provides type-safe enumeration of sex categories with string and integer representations. + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_M = 1; @@ -115,19 +336,42 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_U = 4; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Returns the Sex.Enum constant for the given string value. + * + * @param s String the sex code ("M", "F", "A", or "U") + * @return Enum the corresponding Sex.Enum constant + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Returns the Sex.Enum constant for the given integer value. + * + * @param i int the sex code (1=M, 2=F, 3=A, 4=U) + * @return Enum the corresponding Sex.Enum constant + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for creating Sex.Enum instances. + * + * @param s String the string representation of the sex + * @param i int the integer representation of the sex + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the deserialized object to the corresponding enum constant. + * + * @return Object the resolved enum constant + */ private Object readResolve() { return forInt(this.intValue()); } @@ -137,25 +381,67 @@ private Object readResolve() { } } + /** + * Factory class for creating Sex instances. + * + * Provides static factory methods for instantiating Sex objects with or without XML options. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new Sex instance from the given object. + * + * @param obj Object the source object to convert to Sex + * @return Sex the new Sex instance + */ public static Sex newValue(final Object obj) { return (Sex)Sex.type.newValue(obj); } - + + /** + * Creates a new Sex instance with default XML options. + * + * @return Sex the new Sex instance + */ public static Sex newInstance() { return (Sex)XmlBeans.getContextTypeLoader().newInstance(Sex.type, (XmlOptions)null); } - + + /** + * Creates a new Sex instance with specified XML options. + * + * @param options XmlOptions the XML parsing/serialization options to use + * @return Sex the new Sex instance + */ public static Sex newInstance(final XmlOptions options) { return (Sex)XmlBeans.getContextTypeLoader().newInstance(Sex.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } } + /** + * Enumeration representing the type of delivery method used during birth. + * + * Defines standard delivery categories used in obstetrical records: + *
      + *
    • AVAG (Assisted Vaginal) - Vaginal delivery with assistance (forceps or vacuum)
    • + *
    • IND (Induced) - Labor was medically induced
    • + *
    • CS (Cesarean Section) - Surgical delivery via incision
    • + *
    • SVAG (Spontaneous Vaginal) - Unassisted vaginal delivery
    • + *
    • VAG (Vaginal) - General vaginal delivery
    • + *
    • UN (Unknown) - Delivery method not documented or unknown
    • + *
    + * + * @since 2026-01-24 + */ public interface TypeOfDelivery extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(TypeOfDelivery.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("typeofdelivery6b87elemtype"); @@ -171,11 +457,28 @@ public interface TypeOfDelivery extends XmlString public static final int INT_SVAG = 4; public static final int INT_VAG = 5; public static final int INT_UN = 6; - + + /** + * Gets the enumeration value. + * + * @return StringEnumAbstractBase the underlying enum value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the delivery type value using a StringEnumAbstractBase. + * + * @param p0 StringEnumAbstractBase the delivery type enumeration value to set + */ void set(final StringEnumAbstractBase p0); + /** + * Enumeration implementation for TypeOfDelivery values. + * + * Provides type-safe enumeration of delivery method categories with string and integer representations. + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_AVAG = 1; @@ -186,19 +489,42 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_UN = 6; public static final StringEnumAbstractBase.Table table; private static final long serialVersionUID = 1L; - + + /** + * Returns the TypeOfDelivery.Enum constant for the given string value. + * + * @param s String the delivery type code ("AVAG", "IND", "CS", "SVAG", "VAG", or "UN") + * @return Enum the corresponding TypeOfDelivery.Enum constant + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Returns the TypeOfDelivery.Enum constant for the given integer value. + * + * @param i int the delivery type code (1=AVAG, 2=IND, 3=CS, 4=SVAG, 5=VAG, 6=UN) + * @return Enum the corresponding TypeOfDelivery.Enum constant + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for creating TypeOfDelivery.Enum instances. + * + * @param s String the string representation of the delivery type + * @param i int the integer representation of the delivery type + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the deserialized object to the corresponding enum constant. + * + * @return Object the resolved enum constant + */ private Object readResolve() { return forInt(this.intValue()); } @@ -208,111 +534,315 @@ private Object readResolve() { } } + /** + * Factory class for creating TypeOfDelivery instances. + * + * Provides static factory methods for instantiating TypeOfDelivery objects with or without XML options. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new TypeOfDelivery instance from the given object. + * + * @param obj Object the source object to convert to TypeOfDelivery + * @return TypeOfDelivery the new TypeOfDelivery instance + */ public static TypeOfDelivery newValue(final Object obj) { return (TypeOfDelivery)TypeOfDelivery.type.newValue(obj); } - + + /** + * Creates a new TypeOfDelivery instance with default XML options. + * + * @return TypeOfDelivery the new TypeOfDelivery instance + */ public static TypeOfDelivery newInstance() { return (TypeOfDelivery)XmlBeans.getContextTypeLoader().newInstance(TypeOfDelivery.type, (XmlOptions)null); } - + + /** + * Creates a new TypeOfDelivery instance with specified XML options. + * + * @param options XmlOptions the XML parsing/serialization options to use + * @return TypeOfDelivery the new TypeOfDelivery instance + */ public static TypeOfDelivery newInstance(final XmlOptions options) { return (TypeOfDelivery)XmlBeans.getContextTypeLoader().newInstance(TypeOfDelivery.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } } + /** + * Factory class for creating and parsing ObstetricalHistoryItemList instances. + * + * Provides comprehensive static factory methods for: + *
      + *
    • Creating new instances with or without XML options
    • + *
    • Parsing from various sources (String, File, URL, Stream, Reader, DOM Node)
    • + *
    • XML validation and streaming support
    • + *
    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new ObstetricalHistoryItemList instance with default XML options. + * + * @return ObstetricalHistoryItemList the new instance + */ public static ObstetricalHistoryItemList newInstance() { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().newInstance(ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Creates a new ObstetricalHistoryItemList instance with specified XML options. + * + * @param options XmlOptions the XML parsing/serialization options to use + * @return ObstetricalHistoryItemList the new instance + */ public static ObstetricalHistoryItemList newInstance(final XmlOptions options) { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().newInstance(ObstetricalHistoryItemList.type, options); } - + + /** + * Parses an XML string into an ObstetricalHistoryItemList instance. + * + * @param xmlAsString String the XML content as a string + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static ObstetricalHistoryItemList parse(final String xmlAsString) throws XmlException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(xmlAsString, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses an XML string into an ObstetricalHistoryItemList instance with specified options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static ObstetricalHistoryItemList parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(xmlAsString, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses an XML file into an ObstetricalHistoryItemList instance. + * + * @param file File the XML file to parse + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the file cannot be read + */ public static ObstetricalHistoryItemList parse(final File file) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(file, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses an XML file into an ObstetricalHistoryItemList instance with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the file cannot be read + */ public static ObstetricalHistoryItemList parse(final File file, final XmlOptions options) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(file, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses XML from a URL into an ObstetricalHistoryItemList instance. + * + * @param u URL the URL pointing to the XML content + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the URL cannot be accessed + */ public static ObstetricalHistoryItemList parse(final URL u) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(u, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL into an ObstetricalHistoryItemList instance with specified options. + * + * @param u URL the URL pointing to the XML content + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the URL cannot be accessed + */ public static ObstetricalHistoryItemList parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(u, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses XML from an InputStream into an ObstetricalHistoryItemList instance. + * + * @param is InputStream the input stream containing XML content + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the stream cannot be read + */ public static ObstetricalHistoryItemList parse(final InputStream is) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(is, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses XML from an InputStream into an ObstetricalHistoryItemList instance with specified options. + * + * @param is InputStream the input stream containing XML content + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the stream cannot be read + */ public static ObstetricalHistoryItemList parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(is, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses XML from a Reader into an ObstetricalHistoryItemList instance. + * + * @param r Reader the reader containing XML content + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the reader cannot be accessed + */ public static ObstetricalHistoryItemList parse(final Reader r) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(r, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses XML from a Reader into an ObstetricalHistoryItemList instance with specified options. + * + * @param r Reader the reader containing XML content + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if the reader cannot be accessed + */ public static ObstetricalHistoryItemList parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(r, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses XML from an XMLStreamReader into an ObstetricalHistoryItemList instance. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static ObstetricalHistoryItemList parse(final XMLStreamReader sr) throws XmlException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(sr, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLStreamReader into an ObstetricalHistoryItemList instance with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static ObstetricalHistoryItemList parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(sr, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses XML from a DOM Node into an ObstetricalHistoryItemList instance. + * + * @param node Node the DOM node containing XML content + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static ObstetricalHistoryItemList parse(final Node node) throws XmlException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(node, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM Node into an ObstetricalHistoryItemList instance with specified options. + * + * @param node Node the DOM node containing XML content + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static ObstetricalHistoryItemList parse(final Node node, final XmlOptions options) throws XmlException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(node, ObstetricalHistoryItemList.type, options); } - + + /** + * Parses XML from an XMLInputStream into an ObstetricalHistoryItemList instance. + * + * @param xis XMLInputStream the XML input stream + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws XMLStreamException if there is an error processing the stream + * @deprecated Use {@link #parse(InputStream)} or {@link #parse(XMLStreamReader)} instead + */ @Deprecated public static ObstetricalHistoryItemList parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(xis, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLInputStream into an ObstetricalHistoryItemList instance with specified options. + * + * @param xis XMLInputStream the XML input stream + * @param options XmlOptions the XML parsing options to use + * @return ObstetricalHistoryItemList the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws XMLStreamException if there is an error processing the stream + * @deprecated Use {@link #parse(InputStream, XmlOptions)} or {@link #parse(XMLStreamReader, XmlOptions)} instead + */ @Deprecated public static ObstetricalHistoryItemList parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (ObstetricalHistoryItemList)XmlBeans.getContextTypeLoader().parse(xis, ObstetricalHistoryItemList.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream. + * + * @param xis XMLInputStream the source XML input stream + * @return XMLInputStream a validating XML input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if there is an error processing the stream + * @deprecated XMLInputStream is deprecated; use XMLStreamReader instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, ObstetricalHistoryItemList.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with specified options. + * + * @param xis XMLInputStream the source XML input stream + * @param options XmlOptions the XML validation options to use + * @return XMLInputStream a validating XML input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if there is an error processing the stream + * @deprecated XMLInputStream is deprecated; use XMLStreamReader instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, ObstetricalHistoryItemList.type, options); } - + + /** + * Private constructor to prevent instantiation. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/PartnerInformation.java b/src/main/java/ca/openosp/openo/ar2005/PartnerInformation.java index dee1d1b18cb..f821455478f 100644 --- a/src/main/java/ca/openosp/openo/ar2005/PartnerInformation.java +++ b/src/main/java/ca/openosp/openo/ar2005/PartnerInformation.java @@ -18,70 +18,298 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Partner demographic information interface for the British Columbia Antenatal Record (BCAR) AR2005 form. + * + *

    This interface provides comprehensive demographic and socioeconomic data collection for the patient's + * partner during prenatal care. Partner information is critical for complete family health assessment, + * genetic risk evaluation, and social determinants of health documentation in maternal care.

    + * + *

    The interface is generated from XML schema using Apache XMLBeans and provides type-safe access to + * partner demographic elements including personal identification, occupation classification, educational + * attainment, and age data. This information supports comprehensive prenatal risk assessment and care planning.

    + * + *

    Key demographic categories captured:

    + *
      + *
    • Personal identification (first name, last name)
    • + *
    • Occupation classification (standardized occupation codes OCC0005-OCC1290)
    • + *
    • Educational level (ED001-ED006 classification)
    • + *
    • Age (integer value)
    • + *
    + * + *

    This interface is part of the British Columbia provincial healthcare data standards for antenatal + * record documentation and integrates with the broader BCAR forms system for comprehensive maternal health tracking.

    + * + * @see org.apache.xmlbeans.XmlObject + * @see ca.openosp.openo.ar2005 + * @since 2026-01-24 + */ public interface PartnerInformation extends XmlObject { + /** + * XMLBeans schema type for partner information. + * Used internally by Apache XMLBeans for type resolution and validation. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PartnerInformation.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("partnerinformationbf1btype"); - + + /** + * Gets the partner's last name (surname/family name). + * + * @return String the partner's last name + */ String getLastName(); - + + /** + * Gets the partner's last name as an XMLBeans XmlString object. + * Provides access to the underlying XML type with schema validation capabilities. + * + * @return XmlString the partner's last name with XML type information + */ XmlString xgetLastName(); - + + /** + * Sets the partner's last name (surname/family name). + * + * @param p0 String the last name to set + */ void setLastName(final String p0); - + + /** + * Sets the partner's last name using an XMLBeans XmlString object. + * Allows setting with full XML type validation. + * + * @param p0 XmlString the last name to set with XML type information + */ void xsetLastName(final XmlString p0); - + + /** + * Gets the partner's first name (given name). + * + * @return String the partner's first name + */ String getFirstName(); - + + /** + * Gets the partner's first name as an XMLBeans XmlString object. + * Provides access to the underlying XML type with schema validation capabilities. + * + * @return XmlString the partner's first name with XML type information + */ XmlString xgetFirstName(); - + + /** + * Sets the partner's first name (given name). + * + * @param p0 String the first name to set + */ void setFirstName(final String p0); - + + /** + * Sets the partner's first name using an XMLBeans XmlString object. + * Allows setting with full XML type validation. + * + * @param p0 XmlString the first name to set with XML type information + */ void xsetFirstName(final XmlString p0); - + + /** + * Gets the partner's occupation classification information. + * Includes standardized occupation code and optional free-text "other" field. + * + * @return Occupation the occupation data structure containing code and description + */ Occupation getOccupation(); - + + /** + * Sets the partner's occupation classification information. + * + * @param p0 Occupation the occupation data to set (includes code and optional other field) + */ void setOccupation(final Occupation p0); - + + /** + * Creates and adds a new Occupation object to this partner information. + * Factory method for building occupation data structures. + * + * @return Occupation a new occupation instance ready for population + */ Occupation addNewOccupation(); - + + /** + * Gets the partner's education level classification enumeration value. + * Returns one of the standardized education level codes (ED001-ED006 or UN for unknown). + * + * @return EducationLevel.Enum the education level classification + */ EducationLevel.Enum getEducationLevel(); - + + /** + * Gets the partner's education level as an XMLBeans EducationLevel object. + * Provides access to the underlying XML type with schema validation capabilities. + * + * @return EducationLevel the education level with XML type information + */ EducationLevel xgetEducationLevel(); - + + /** + * Sets the partner's education level classification. + * + * @param p0 EducationLevel.Enum the education level code to set (ED001-ED006 or UN) + */ void setEducationLevel(final EducationLevel.Enum p0); - + + /** + * Sets the partner's education level using an XMLBeans EducationLevel object. + * Allows setting with full XML type validation. + * + * @param p0 EducationLevel the education level to set with XML type information + */ void xsetEducationLevel(final EducationLevel p0); - + + /** + * Gets the partner's age in years. + * + * @return int the partner's age + */ int getAge(); - + + /** + * Gets the partner's age as an XMLBeans Age object. + * Provides access to the underlying XML type with schema validation capabilities. + * + * @return Age the partner's age with XML type information + */ Age xgetAge(); - + + /** + * Sets the partner's age in years. + * + * @param p0 int the age to set + */ void setAge(final int p0); - + + /** + * Sets the partner's age using an XMLBeans Age object. + * Allows setting with full XML type validation. + * + * @param p0 Age the age to set with XML type information + */ void xsetAge(final Age p0); - + + /** + * Occupation classification interface for partner demographic information. + * + *

    Provides standardized occupation coding for the patient's partner using a comprehensive + * classification system with 259 defined occupation categories (OCC0005-OCC1290) plus an "OTHER" + * option for occupations not covered by the standard codes.

    + * + *

    Occupation data is important for:

    + *
      + *
    • Socioeconomic status assessment in prenatal care
    • + *
    • Environmental and occupational exposure risk evaluation
    • + *
    • Social determinants of health documentation
    • + *
    • Family support and resource planning
    • + *
    + * + *

    When the partner's occupation does not match any of the 259 predefined codes, the "OTHER" + * enumeration value should be selected and the specific occupation described in the "other" free-text field.

    + * + * @see PartnerInformation + * @since 2026-01-24 + */ public interface Occupation extends XmlObject { + /** + * XMLBeans schema type for occupation classification. + * Used internally by Apache XMLBeans for type resolution and validation. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Occupation.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("occupation6914elemtype"); - + + /** + * Gets the standardized occupation classification code enumeration value. + * Returns one of 259 occupation codes (OCC0005-OCC1290) or OTHER. + * + * @return Value.Enum the occupation classification code + */ Value.Enum getValue(); - + + /** + * Gets the occupation classification code as an XMLBeans Value object. + * Provides access to the underlying XML type with schema validation capabilities. + * + * @return Value the occupation code with XML type information + */ Value xgetValue(); - + + /** + * Sets the standardized occupation classification code. + * + * @param p0 Value.Enum the occupation code to set (OCC0005-OCC1290 or OTHER) + */ void setValue(final Value.Enum p0); - + + /** + * Sets the occupation classification code using an XMLBeans Value object. + * Allows setting with full XML type validation. + * + * @param p0 Value the occupation code to set with XML type information + */ void xsetValue(final Value p0); - + + /** + * Gets the free-text occupation description for non-standard occupations. + * Used when the occupation value is set to OTHER to provide specific occupation details. + * + * @return String the free-text occupation description, or null if not applicable + */ String getOther(); - + + /** + * Gets the free-text occupation description as an XMLBeans XmlString object. + * Provides access to the underlying XML type with schema validation capabilities. + * + * @return XmlString the occupation description with XML type information + */ XmlString xgetOther(); - + + /** + * Sets the free-text occupation description for non-standard occupations. + * Should be populated when the occupation value is set to OTHER. + * + * @param p0 String the occupation description to set + */ void setOther(final String p0); - + + /** + * Sets the free-text occupation description using an XMLBeans XmlString object. + * Allows setting with full XML type validation. + * + * @param p0 XmlString the occupation description to set with XML type information + */ void xsetOther(final XmlString p0); - + + /** + * Standardized occupation classification code enumeration for partner demographics. + * + *

    Defines 259 distinct occupation categories using codes OCC0005 through OCC1290 (incremented by 5), + * plus an "OTHER" category for occupations not covered by the standard classification system.

    + * + *

    Each occupation code maps to both an enumeration constant and an integer value for database + * storage and data interchange. The occupation classification system provides granular categorization + * of employment types for socioeconomic and occupational health risk assessment in maternal care.

    + * + *

    The enumeration provides type-safe occupation code handling with built-in validation through + * the XMLBeans framework, ensuring data integrity in BCAR form submissions.

    + * + * @see Occupation + * @since 2026-01-24 + */ public interface Value extends XmlString { + /** + * XMLBeans schema type for occupation value enumeration. + * Used internally by Apache XMLBeans for type resolution and validation. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Value.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("value0f31elemtype"); public static final Enum OCC_0005 = Enum.forString("OCC0005"); public static final Enum OCC_0010 = Enum.forString("OCC0010"); @@ -600,12 +828,36 @@ public interface Value extends XmlString public static final int INT_OCC_1280 = 256; public static final int INT_OCC_1285 = 257; public static final int INT_OCC_1290 = 258; + /** Integer constant for OTHER occupation category (259). */ public static final int INT_OTHER = 259; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * Provides access to the underlying enumeration base for advanced type operations. + * + * @return StringEnumAbstractBase the enumeration value base object + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the occupation value using a StringEnumAbstractBase enumeration. + * Allows setting with base enumeration type for framework interoperability. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration implementation for occupation classification values. + * + *

    Provides concrete enumeration instances for all 259 occupation codes, extending + * StringEnumAbstractBase to integrate with the Apache XMLBeans type system.

    + * + *

    Each enum instance maps to both a string representation (e.g., "OCC0005") and an + * integer value (1-259) for efficient storage and comparison operations.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_OCC_0005 = 1; @@ -866,22 +1118,50 @@ public static final class Enum extends StringEnumAbstractBase static final int INT_OCC_1280 = 256; static final int INT_OCC_1285 = 257; static final int INT_OCC_1290 = 258; + /** Integer constant for OTHER occupation category (259). */ static final int INT_OTHER = 259; + /** Lookup table mapping string and integer values to enumeration instances. */ public static final StringEnumAbstractBase.Table table; + /** Serialization version identifier. */ private static final long serialVersionUID = 1L; - + + /** + * Looks up an enumeration instance by its string representation. + * + * @param s String the occupation code string (e.g., "OCC0005", "OTHER") + * @return Enum the corresponding enumeration instance, or null if not found + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Looks up an enumeration instance by its integer value. + * + * @param i int the occupation code integer (1-259) + * @return Enum the corresponding enumeration instance, or null if not found + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for enumeration instances. + * Called during static initialization to create all 259 occupation code instances. + * + * @param s String the occupation code string representation + * @param i int the occupation code integer value + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the enumeration instance during deserialization. + * Ensures singleton semantics by returning the canonical instance from the lookup table. + * + * @return Object the canonical enumeration instance for this integer value + */ private Object readResolve() { return forInt(this.intValue()); } @@ -890,87 +1170,235 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("OCC0005", 1), new Enum("OCC0010", 2), new Enum("OCC0015", 3), new Enum("OCC0020", 4), new Enum("OCC0025", 5), new Enum("OCC0030", 6), new Enum("OCC0035", 7), new Enum("OCC0040", 8), new Enum("OCC0045", 9), new Enum("OCC0050", 10), new Enum("OCC0055", 11), new Enum("OCC0060", 12), new Enum("OCC0065", 13), new Enum("OCC0070", 14), new Enum("OCC0075", 15), new Enum("OCC0080", 16), new Enum("OCC0085", 17), new Enum("OCC0090", 18), new Enum("OCC0095", 19), new Enum("OCC0100", 20), new Enum("OCC0105", 21), new Enum("OCC0110", 22), new Enum("OCC0115", 23), new Enum("OCC0120", 24), new Enum("OCC0125", 25), new Enum("OCC0130", 26), new Enum("OCC0135", 27), new Enum("OCC0140", 28), new Enum("OCC0145", 29), new Enum("OCC0150", 30), new Enum("OCC0155", 31), new Enum("OCC0160", 32), new Enum("OCC0165", 33), new Enum("OCC0170", 34), new Enum("OCC0175", 35), new Enum("OCC0180", 36), new Enum("OCC0185", 37), new Enum("OCC0190", 38), new Enum("OCC0195", 39), new Enum("OCC0200", 40), new Enum("OCC0205", 41), new Enum("OCC0210", 42), new Enum("OCC0215", 43), new Enum("OCC0220", 44), new Enum("OCC0225", 45), new Enum("OCC0230", 46), new Enum("OCC0235", 47), new Enum("OCC0240", 48), new Enum("OCC0245", 49), new Enum("OCC0250", 50), new Enum("OCC0255", 51), new Enum("OCC0260", 52), new Enum("OCC0265", 53), new Enum("OCC0270", 54), new Enum("OCC0275", 55), new Enum("OCC0280", 56), new Enum("OCC0285", 57), new Enum("OCC0290", 58), new Enum("OCC0295", 59), new Enum("OCC0300", 60), new Enum("OCC0305", 61), new Enum("OCC0310", 62), new Enum("OCC0315", 63), new Enum("OCC0320", 64), new Enum("OCC0325", 65), new Enum("OCC0330", 66), new Enum("OCC0335", 67), new Enum("OCC0340", 68), new Enum("OCC0345", 69), new Enum("OCC0350", 70), new Enum("OCC0355", 71), new Enum("OCC0360", 72), new Enum("OCC0365", 73), new Enum("OCC0370", 74), new Enum("OCC0375", 75), new Enum("OCC0380", 76), new Enum("OCC0385", 77), new Enum("OCC0390", 78), new Enum("OCC0395", 79), new Enum("OCC0400", 80), new Enum("OCC0405", 81), new Enum("OCC0410", 82), new Enum("OCC0415", 83), new Enum("OCC0420", 84), new Enum("OCC0425", 85), new Enum("OCC0430", 86), new Enum("OCC0435", 87), new Enum("OCC0440", 88), new Enum("OCC0445", 89), new Enum("OCC0450", 90), new Enum("OCC0455", 91), new Enum("OCC0460", 92), new Enum("OCC0465", 93), new Enum("OCC0470", 94), new Enum("OCC0475", 95), new Enum("OCC0480", 96), new Enum("OCC0485", 97), new Enum("OCC0490", 98), new Enum("OCC0495", 99), new Enum("OCC0500", 100), new Enum("OCC0505", 101), new Enum("OCC0510", 102), new Enum("OCC0515", 103), new Enum("OCC0520", 104), new Enum("OCC0525", 105), new Enum("OCC0530", 106), new Enum("OCC0535", 107), new Enum("OCC0540", 108), new Enum("OCC0545", 109), new Enum("OCC0550", 110), new Enum("OCC0555", 111), new Enum("OCC0560", 112), new Enum("OCC0565", 113), new Enum("OCC0570", 114), new Enum("OCC0575", 115), new Enum("OCC0580", 116), new Enum("OCC0585", 117), new Enum("OCC0590", 118), new Enum("OCC0595", 119), new Enum("OCC0600", 120), new Enum("OCC0605", 121), new Enum("OCC0610", 122), new Enum("OCC0615", 123), new Enum("OCC0620", 124), new Enum("OCC0625", 125), new Enum("OCC0630", 126), new Enum("OCC0635", 127), new Enum("OCC0640", 128), new Enum("OCC0645", 129), new Enum("OCC0650", 130), new Enum("OCC0655", 131), new Enum("OCC0660", 132), new Enum("OCC0665", 133), new Enum("OCC0670", 134), new Enum("OCC0675", 135), new Enum("OCC0680", 136), new Enum("OCC0685", 137), new Enum("OCC0690", 138), new Enum("OCC0695", 139), new Enum("OCC0700", 140), new Enum("OCC0705", 141), new Enum("OCC0710", 142), new Enum("OCC0715", 143), new Enum("OCC0720", 144), new Enum("OCC0725", 145), new Enum("OCC0730", 146), new Enum("OCC0735", 147), new Enum("OCC0740", 148), new Enum("OCC0745", 149), new Enum("OCC0750", 150), new Enum("OCC0755", 151), new Enum("OCC0760", 152), new Enum("OCC0765", 153), new Enum("OCC0770", 154), new Enum("OCC0775", 155), new Enum("OCC0780", 156), new Enum("OCC0785", 157), new Enum("OCC0790", 158), new Enum("OCC0795", 159), new Enum("OCC0800", 160), new Enum("OCC0805", 161), new Enum("OCC0810", 162), new Enum("OCC0815", 163), new Enum("OCC0820", 164), new Enum("OCC0825", 165), new Enum("OCC0830", 166), new Enum("OCC0835", 167), new Enum("OCC0840", 168), new Enum("OCC0845", 169), new Enum("OCC0850", 170), new Enum("OCC0855", 171), new Enum("OCC0860", 172), new Enum("OCC0865", 173), new Enum("OCC0870", 174), new Enum("OCC0875", 175), new Enum("OCC0880", 176), new Enum("OCC0885", 177), new Enum("OCC0890", 178), new Enum("OCC0895", 179), new Enum("OCC0900", 180), new Enum("OCC0905", 181), new Enum("OCC0910", 182), new Enum("OCC0915", 183), new Enum("OCC0920", 184), new Enum("OCC0925", 185), new Enum("OCC0930", 186), new Enum("OCC0935", 187), new Enum("OCC0940", 188), new Enum("OCC0945", 189), new Enum("OCC0950", 190), new Enum("OCC0955", 191), new Enum("OCC0960", 192), new Enum("OCC0965", 193), new Enum("OCC0970", 194), new Enum("OCC0975", 195), new Enum("OCC0980", 196), new Enum("OCC0985", 197), new Enum("OCC0990", 198), new Enum("OCC0995", 199), new Enum("OCC1000", 200), new Enum("OCC1005", 201), new Enum("OCC1010", 202), new Enum("OCC1015", 203), new Enum("OCC1020", 204), new Enum("OCC1025", 205), new Enum("OCC1030", 206), new Enum("OCC1035", 207), new Enum("OCC1040", 208), new Enum("OCC1045", 209), new Enum("OCC1050", 210), new Enum("OCC1055", 211), new Enum("OCC1060", 212), new Enum("OCC1065", 213), new Enum("OCC1070", 214), new Enum("OCC1075", 215), new Enum("OCC1080", 216), new Enum("OCC1085", 217), new Enum("OCC1090", 218), new Enum("OCC1095", 219), new Enum("OCC1100", 220), new Enum("OCC1105", 221), new Enum("OCC1110", 222), new Enum("OCC1115", 223), new Enum("OCC1120", 224), new Enum("OCC1125", 225), new Enum("OCC1130", 226), new Enum("OCC1135", 227), new Enum("OCC1140", 228), new Enum("OCC1145", 229), new Enum("OCC1150", 230), new Enum("OCC1155", 231), new Enum("OCC1160", 232), new Enum("OCC1165", 233), new Enum("OCC1170", 234), new Enum("OCC1175", 235), new Enum("OCC1180", 236), new Enum("OCC1185", 237), new Enum("OCC1190", 238), new Enum("OCC1195", 239), new Enum("OCC1200", 240), new Enum("OCC1205", 241), new Enum("OCC1210", 242), new Enum("OCC1215", 243), new Enum("OCC1220", 244), new Enum("OCC1225", 245), new Enum("OCC1230", 246), new Enum("OCC1235", 247), new Enum("OCC1240", 248), new Enum("OCC1245", 249), new Enum("OCC1250", 250), new Enum("OCC1255", 251), new Enum("OCC1260", 252), new Enum("OCC1265", 253), new Enum("OCC1270", 254), new Enum("OCC1275", 255), new Enum("OCC1280", 256), new Enum("OCC1285", 257), new Enum("OCC1290", 258), new Enum("OTHER", 259) }); } } - + + /** + * Factory class for creating occupation Value instances. + * + *

    Provides static factory methods for creating new Value objects with proper + * XMLBeans type initialization and schema validation.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new Value instance from an object. + * Converts the object to the appropriate occupation code value. + * + * @param obj Object the source object to convert to a Value + * @return Value a new occupation value instance + */ public static Value newValue(final Object obj) { return (Value)Value.type.newValue(obj); } - + + /** + * Creates a new empty Value instance with default options. + * + * @return Value a new occupation value instance + */ public static Value newInstance() { return (Value)XmlBeans.getContextTypeLoader().newInstance(Value.type, (XmlOptions)null); } - + + /** + * Creates a new empty Value instance with specified XMLBeans options. + * + * @param options XmlOptions the XML options for instance creation + * @return Value a new occupation value instance + */ public static Value newInstance(final XmlOptions options) { return (Value)XmlBeans.getContextTypeLoader().newInstance(Value.type, options); } - + + /** + * Private constructor to prevent instantiation. + * Factory methods are static. + */ private Factory() { } } } - + + /** + * Factory class for creating Occupation instances. + * + *

    Provides static factory methods for creating new Occupation objects with proper + * XMLBeans type initialization and schema validation.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Occupation instance with default options. + * + * @return Occupation a new occupation instance + */ public static Occupation newInstance() { return (Occupation)XmlBeans.getContextTypeLoader().newInstance(Occupation.type, (XmlOptions)null); } - + + /** + * Creates a new empty Occupation instance with specified XMLBeans options. + * + * @param options XmlOptions the XML options for instance creation + * @return Occupation a new occupation instance + */ public static Occupation newInstance(final XmlOptions options) { return (Occupation)XmlBeans.getContextTypeLoader().newInstance(Occupation.type, options); } - + + /** + * Private constructor to prevent instantiation. + * Factory methods are static. + */ private Factory() { } } } - + + /** + * Education level classification interface for partner demographic information. + * + *

    Provides standardized education attainment coding for the patient's partner using a classification + * system with 6 defined education levels (ED001-ED006) plus a UN (unknown) option.

    + * + *

    Education level data is important for:

    + *
      + *
    • Socioeconomic status assessment in prenatal care
    • + *
    • Health literacy and education needs evaluation
    • + *
    • Social determinants of health documentation
    • + *
    • Patient education and communication strategy planning
    • + *
    + * + *

    The education level classification supports comprehensive family assessment and helps healthcare + * providers tailor education materials and communication approaches appropriately.

    + * + * @see PartnerInformation + * @since 2026-01-24 + */ public interface EducationLevel extends XmlString { + /** + * XMLBeans schema type for education level classification. + * Used internally by Apache XMLBeans for type resolution and validation. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(EducationLevel.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("educationlevel26c3elemtype"); + /** Education level code ED001 enumeration constant. */ public static final Enum ED_001 = Enum.forString("ED001"); + /** Education level code ED002 enumeration constant. */ public static final Enum ED_002 = Enum.forString("ED002"); + /** Education level code ED003 enumeration constant. */ public static final Enum ED_003 = Enum.forString("ED003"); + /** Education level code ED004 enumeration constant. */ public static final Enum ED_004 = Enum.forString("ED004"); + /** Education level code ED005 enumeration constant. */ public static final Enum ED_005 = Enum.forString("ED005"); + /** Education level code ED006 enumeration constant. */ public static final Enum ED_006 = Enum.forString("ED006"); + /** Unknown education level (UN) enumeration constant. */ public static final Enum UN = Enum.forString("UN"); + /** Integer constant for ED001 education level (1). */ public static final int INT_ED_001 = 1; + /** Integer constant for ED002 education level (2). */ public static final int INT_ED_002 = 2; + /** Integer constant for ED003 education level (3). */ public static final int INT_ED_003 = 3; + /** Integer constant for ED004 education level (4). */ public static final int INT_ED_004 = 4; + /** Integer constant for ED005 education level (5). */ public static final int INT_ED_005 = 5; + /** Integer constant for ED006 education level (6). */ public static final int INT_ED_006 = 6; + /** Integer constant for UN (unknown) education level (7). */ public static final int INT_UN = 7; - + + /** + * Gets the enumeration value as a StringEnumAbstractBase. + * Provides access to the underlying enumeration base for advanced type operations. + * + * @return StringEnumAbstractBase the enumeration value base object + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the education level value using a StringEnumAbstractBase enumeration. + * Allows setting with base enumeration type for framework interoperability. + * + * @param p0 StringEnumAbstractBase the enumeration value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration implementation for education level classification values. + * + *

    Provides concrete enumeration instances for all 7 education level codes (ED001-ED006 and UN), + * extending StringEnumAbstractBase to integrate with the Apache XMLBeans type system.

    + * + *

    Each enum instance maps to both a string representation (e.g., "ED001") and an + * integer value (1-7) for efficient storage and comparison operations.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { + /** Integer constant for ED001 education level (1). */ static final int INT_ED_001 = 1; + /** Integer constant for ED002 education level (2). */ static final int INT_ED_002 = 2; + /** Integer constant for ED003 education level (3). */ static final int INT_ED_003 = 3; + /** Integer constant for ED004 education level (4). */ static final int INT_ED_004 = 4; + /** Integer constant for ED005 education level (5). */ static final int INT_ED_005 = 5; + /** Integer constant for ED006 education level (6). */ static final int INT_ED_006 = 6; + /** Integer constant for UN (unknown) education level (7). */ static final int INT_UN = 7; + /** Lookup table mapping string and integer values to enumeration instances. */ public static final StringEnumAbstractBase.Table table; + /** Serialization version identifier. */ private static final long serialVersionUID = 1L; - + + /** + * Looks up an enumeration instance by its string representation. + * + * @param s String the education level code string (e.g., "ED001", "UN") + * @return Enum the corresponding enumeration instance, or null if not found + */ public static Enum forString(final String s) { return (Enum)Enum.table.forString(s); } - + + /** + * Looks up an enumeration instance by its integer value. + * + * @param i int the education level code integer (1-7) + * @return Enum the corresponding enumeration instance, or null if not found + */ public static Enum forInt(final int i) { return (Enum)Enum.table.forInt(i); } - + + /** + * Private constructor for enumeration instances. + * Called during static initialization to create all 7 education level code instances. + * + * @param s String the education level code string representation + * @param i int the education level code integer value + */ private Enum(final String s, final int i) { super(s, i); } - + + /** + * Resolves the enumeration instance during deserialization. + * Ensures singleton semantics by returning the canonical instance from the lookup table. + * + * @return Object the canonical enumeration instance for this integer value + */ private Object readResolve() { return forInt(this.intValue()); } @@ -979,135 +1407,391 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("ED001", 1), new Enum("ED002", 2), new Enum("ED003", 3), new Enum("ED004", 4), new Enum("ED005", 5), new Enum("ED006", 6), new Enum("UN", 7) }); } } - + + /** + * Factory class for creating EducationLevel instances. + * + *

    Provides static factory methods for creating new EducationLevel objects with proper + * XMLBeans type initialization and schema validation.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new EducationLevel instance from an object. + * Converts the object to the appropriate education level code value. + * + * @param obj Object the source object to convert to an EducationLevel + * @return EducationLevel a new education level instance + */ public static EducationLevel newValue(final Object obj) { return (EducationLevel)EducationLevel.type.newValue(obj); } - + + /** + * Creates a new empty EducationLevel instance with default options. + * + * @return EducationLevel a new education level instance + */ public static EducationLevel newInstance() { return (EducationLevel)XmlBeans.getContextTypeLoader().newInstance(EducationLevel.type, (XmlOptions)null); } - + + /** + * Creates a new empty EducationLevel instance with specified XMLBeans options. + * + * @param options XmlOptions the XML options for instance creation + * @return EducationLevel a new education level instance + */ public static EducationLevel newInstance(final XmlOptions options) { return (EducationLevel)XmlBeans.getContextTypeLoader().newInstance(EducationLevel.type, options); } - + + /** + * Private constructor to prevent instantiation. + * Factory methods are static. + */ private Factory() { } } } - + + /** + * Age interface for partner demographic information. + * + *

    Provides type-safe integer representation of the partner's age in years. Age data is important + * for comprehensive family assessment, genetic risk evaluation, and social determinants of health + * documentation in maternal care.

    + * + *

    The Age interface extends XmlInt to provide XMLBeans type validation and ensures proper + * schema compliance for age data in BCAR form submissions.

    + * + * @see PartnerInformation + * @since 2026-01-24 + */ public interface Age extends XmlInt { + /** + * XMLBeans schema type for age data. + * Used internally by Apache XMLBeans for type resolution and validation. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Age.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("age0010elemtype"); - + + /** + * Factory class for creating Age instances. + * + *

    Provides static factory methods for creating new Age objects with proper + * XMLBeans type initialization and schema validation.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new Age instance from an object. + * Converts the object to an integer age value. + * + * @param obj Object the source object to convert to an Age + * @return Age a new age instance + */ public static Age newValue(final Object obj) { return (Age)Age.type.newValue(obj); } - + + /** + * Creates a new empty Age instance with default options. + * + * @return Age a new age instance + */ public static Age newInstance() { return (Age)XmlBeans.getContextTypeLoader().newInstance(Age.type, (XmlOptions)null); } - + + /** + * Creates a new empty Age instance with specified XMLBeans options. + * + * @param options XmlOptions the XML options for instance creation + * @return Age a new age instance + */ public static Age newInstance(final XmlOptions options) { return (Age)XmlBeans.getContextTypeLoader().newInstance(Age.type, options); } - + + /** + * Private constructor to prevent instantiation. + * Factory methods are static. + */ private Factory() { } } } - + + /** + * Factory class for creating PartnerInformation instances. + * + *

    Provides comprehensive static factory methods for creating new PartnerInformation objects + * with proper XMLBeans type initialization and schema validation. Includes methods for parsing + * partner information data from various sources including strings, files, URLs, streams, readers, + * and DOM nodes.

    + * + *

    The factory supports both default and custom XmlOptions for fine-grained control over + * parsing behavior, validation, and error handling during partner information deserialization.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty PartnerInformation instance with default options. + * + * @return PartnerInformation a new partner information instance + */ public static PartnerInformation newInstance() { return (PartnerInformation)XmlBeans.getContextTypeLoader().newInstance(PartnerInformation.type, (XmlOptions)null); } - + + /** + * Creates a new empty PartnerInformation instance with specified XMLBeans options. + * + * @param options XmlOptions the XML options for instance creation + * @return PartnerInformation a new partner information instance + */ public static PartnerInformation newInstance(final XmlOptions options) { return (PartnerInformation)XmlBeans.getContextTypeLoader().newInstance(PartnerInformation.type, options); } - + + /** + * Parses partner information from an XML string with default options. + * + * @param xmlAsString String the XML document to parse + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static PartnerInformation parse(final String xmlAsString) throws XmlException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(xmlAsString, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from an XML string with specified options. + * + * @param xmlAsString String the XML document to parse + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static PartnerInformation parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(xmlAsString, PartnerInformation.type, options); } - + + /** + * Parses partner information from a File with default options. + * + * @param file File the file containing the XML document + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading the file + */ public static PartnerInformation parse(final File file) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(file, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from a File with specified options. + * + * @param file File the file containing the XML document + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading the file + */ public static PartnerInformation parse(final File file, final XmlOptions options) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(file, PartnerInformation.type, options); } - + + /** + * Parses partner information from a URL with default options. + * + * @param u URL the URL pointing to the XML document + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs accessing the URL + */ public static PartnerInformation parse(final URL u) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(u, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from a URL with specified options. + * + * @param u URL the URL pointing to the XML document + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs accessing the URL + */ public static PartnerInformation parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(u, PartnerInformation.type, options); } - + + /** + * Parses partner information from an InputStream with default options. + * + * @param is InputStream the input stream containing the XML document + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading the stream + */ public static PartnerInformation parse(final InputStream is) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(is, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from an InputStream with specified options. + * + * @param is InputStream the input stream containing the XML document + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading the stream + */ public static PartnerInformation parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(is, PartnerInformation.type, options); } - + + /** + * Parses partner information from a Reader with default options. + * + * @param r Reader the reader providing the XML document + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static PartnerInformation parse(final Reader r) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(r, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from a Reader with specified options. + * + * @param r Reader the reader providing the XML document + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static PartnerInformation parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(r, PartnerInformation.type, options); } - + + /** + * Parses partner information from an XMLStreamReader with default options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML document + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static PartnerInformation parse(final XMLStreamReader sr) throws XmlException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(sr, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from an XMLStreamReader with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML document + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static PartnerInformation parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(sr, PartnerInformation.type, options); } - + + /** + * Parses partner information from a DOM Node with default options. + * + * @param node Node the DOM node representing the XML element + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static PartnerInformation parse(final Node node) throws XmlException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(node, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from a DOM Node with specified options. + * + * @param node Node the DOM node representing the XML element + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static PartnerInformation parse(final Node node, final XmlOptions options) throws XmlException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(node, PartnerInformation.type, options); } - + + /** + * Parses partner information from an XMLInputStream with default options. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader instead. + * @param xis XMLInputStream the input stream containing the XML document + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws XMLStreamException if an error occurs processing the XML stream + */ @Deprecated public static PartnerInformation parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(xis, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Parses partner information from an XMLInputStream with specified options. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader instead. + * @param xis XMLInputStream the input stream containing the XML document + * @param options XmlOptions the parsing options + * @return PartnerInformation the parsed partner information instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws XMLStreamException if an error occurs processing the XML stream + */ @Deprecated public static PartnerInformation parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (PartnerInformation)XmlBeans.getContextTypeLoader().parse(xis, PartnerInformation.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper with default options. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader with validation instead. + * @param xis XMLInputStream the input stream to wrap with validation + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if an error occurs setting up the validation stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PartnerInformation.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper with specified options. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader with validation instead. + * @param xis XMLInputStream the input stream to wrap with validation + * @param options XmlOptions the validation options + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if validation setup fails + * @throws XMLStreamException if an error occurs setting up the validation stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PartnerInformation.type, options); } - + + /** + * Private constructor to prevent instantiation. + * Factory methods are static. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/PatientInformation.java b/src/main/java/ca/openosp/openo/ar2005/PatientInformation.java index e6fde797d99..62d9d9db740 100644 --- a/src/main/java/ca/openosp/openo/ar2005/PatientInformation.java +++ b/src/main/java/ca/openosp/openo/ar2005/PatientInformation.java @@ -21,164 +21,599 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Apache XMLBeans interface representing patient information for AR2005 (British Columbia Antenatal Record) forms. + * + *

    This interface provides access to comprehensive patient demographic and clinical information required for + * prenatal care documentation in British Columbia. It includes patient identification, contact information, + * demographics, health insurance details, and clinical data such as allergies and current medications.

    + * + *

    This is an Apache XMLBeans-generated interface that provides type-safe access to XML data conforming to + * the AR2005 schema. All nested interfaces and factory classes are auto-generated to support XML serialization + * and deserialization of patient information.

    + * + *

    Healthcare Context: The AR2005 form (British Columbia Antenatal Record) is used for + * comprehensive prenatal care tracking including patient demographics, medical history, pregnancy progression, + * and delivery information. This interface supports the electronic management of Protected Health Information + * (PHI) and must be used in compliance with PIPEDA and provincial privacy regulations.

    + * + * @see ca.openosp.openo.ar2005 + * @see org.apache.xmlbeans.XmlObject + * @since 2026-01-24 + */ public interface PatientInformation extends XmlObject { + /** + * SchemaType for the PatientInformation interface. + * Used by Apache XMLBeans for type system resolution and XML binding. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PatientInformation.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("patientinformation833etype"); - + + /** + * Gets the patient's last name (surname). + * + * @return String the patient's last name + */ String getLastName(); - + + /** + * Gets the patient's last name as an XmlString object. + * + * @return XmlString the patient's last name as an XML typed value + */ XmlString xgetLastName(); - + + /** + * Sets the patient's last name. + * + * @param p0 String the patient's last name to set + */ void setLastName(final String p0); - + + /** + * Sets the patient's last name using an XmlString object. + * + * @param p0 XmlString the patient's last name as an XML typed value + */ void xsetLastName(final XmlString p0); - + + /** + * Gets the patient's first name (given name). + * + * @return String the patient's first name + */ String getFirstName(); - + + /** + * Gets the patient's first name as an XmlString object. + * + * @return XmlString the patient's first name as an XML typed value + */ XmlString xgetFirstName(); - + + /** + * Sets the patient's first name. + * + * @param p0 String the patient's first name to set + */ void setFirstName(final String p0); - + + /** + * Sets the patient's first name using an XmlString object. + * + * @param p0 XmlString the patient's first name as an XML typed value + */ void xsetFirstName(final XmlString p0); - + + /** + * Gets the patient's street address. + * + * @return String the patient's street address + */ String getAddress(); - + + /** + * Gets the patient's street address as an XmlString object. + * + * @return XmlString the patient's street address as an XML typed value + */ XmlString xgetAddress(); - + + /** + * Sets the patient's street address. + * + * @param p0 String the patient's street address to set + */ void setAddress(final String p0); - + + /** + * Sets the patient's street address using an XmlString object. + * + * @param p0 XmlString the patient's street address as an XML typed value + */ void xsetAddress(final XmlString p0); - + + /** + * Gets the patient's apartment or unit number. + * + * @return String the patient's apartment/unit number + */ String getApt(); - + + /** + * Gets the patient's apartment or unit number as an XmlString object. + * + * @return XmlString the patient's apartment/unit number as an XML typed value + */ XmlString xgetApt(); - + + /** + * Sets the patient's apartment or unit number. + * + * @param p0 String the patient's apartment/unit number to set + */ void setApt(final String p0); - + + /** + * Sets the patient's apartment or unit number using an XmlString object. + * + * @param p0 XmlString the patient's apartment/unit number as an XML typed value + */ void xsetApt(final XmlString p0); - + + /** + * Gets the patient's city of residence. + * + * @return String the patient's city + */ String getCity(); - + + /** + * Gets the patient's city of residence as an XmlString object. + * + * @return XmlString the patient's city as an XML typed value + */ XmlString xgetCity(); - + + /** + * Sets the patient's city of residence. + * + * @param p0 String the patient's city to set + */ void setCity(final String p0); - + + /** + * Sets the patient's city of residence using an XmlString object. + * + * @param p0 XmlString the patient's city as an XML typed value + */ void xsetCity(final XmlString p0); - + + /** + * Gets the patient's province or territory of residence. + * + * @return Province.Enum the patient's province/territory code (e.g., CA-ON, CA-BC) + */ Province.Enum getProvince(); - + + /** + * Gets the patient's province or territory as a Province object. + * + * @return Province the patient's province as an XML typed value + */ Province xgetProvince(); - + + /** + * Sets the patient's province or territory of residence. + * + * @param p0 Province.Enum the patient's province/territory code to set + */ void setProvince(final Province.Enum p0); - + + /** + * Sets the patient's province or territory using a Province object. + * + * @param p0 Province the patient's province as an XML typed value + */ void xsetProvince(final Province p0); - + + /** + * Gets the patient's postal code. + * + * @return String the patient's postal code (Canadian format: A1A 1A1 or international) + */ String getPostalCode(); - + + /** + * Gets the patient's postal code as a PostalCode object. + * + * @return PostalCode the patient's postal code as an XML typed value + */ PostalCode xgetPostalCode(); - + + /** + * Sets the patient's postal code. + * + * @param p0 String the patient's postal code to set + */ void setPostalCode(final String p0); - + + /** + * Sets the patient's postal code using a PostalCode object. + * + * @param p0 PostalCode the patient's postal code as an XML typed value + */ void xsetPostalCode(final PostalCode p0); - + + /** + * Gets the patient's home phone number. + * + * @return String the patient's home phone number + */ String getHomePhone(); - + + /** + * Gets the patient's home phone number as a HomePhone object. + * + * @return HomePhone the patient's home phone number as an XML typed value + */ HomePhone xgetHomePhone(); - + + /** + * Sets the patient's home phone number. + * + * @param p0 String the patient's home phone number to set + */ void setHomePhone(final String p0); - + + /** + * Sets the patient's home phone number using a HomePhone object. + * + * @param p0 HomePhone the patient's home phone number as an XML typed value + */ void xsetHomePhone(final HomePhone p0); - + + /** + * Gets the patient's work phone number. + * + * @return String the patient's work phone number + */ String getWorkPhone(); - + + /** + * Gets the patient's work phone number as a WorkPhone object. + * + * @return WorkPhone the patient's work phone number as an XML typed value + */ WorkPhone xgetWorkPhone(); - + + /** + * Sets the patient's work phone number. + * + * @param p0 String the patient's work phone number to set + */ void setWorkPhone(final String p0); - + + /** + * Sets the patient's work phone number using a WorkPhone object. + * + * @param p0 WorkPhone the patient's work phone number as an XML typed value + */ void xsetWorkPhone(final WorkPhone p0); - + + /** + * Gets the patient's preferred language for communication. + * + * @return Language.Enum the ISO 639-3 language code (e.g., ENG, FRA, CMN) + */ Language.Enum getLanguage(); - + + /** + * Gets the patient's preferred language as a Language object. + * + * @return Language the patient's language as an XML typed value + */ Language xgetLanguage(); - + + /** + * Sets the patient's preferred language for communication. + * + * @param p0 Language.Enum the ISO 639-3 language code to set + */ void setLanguage(final Language.Enum p0); - + + /** + * Sets the patient's preferred language using a Language object. + * + * @param p0 Language the patient's language as an XML typed value + */ void xsetLanguage(final Language p0); - + + /** + * Gets the patient's date of birth. + * + * @return Calendar the patient's date of birth + */ Calendar getDob(); - + + /** + * Gets the patient's date of birth as an XmlDate object. + * + * @return XmlDate the patient's date of birth as an XML typed value + */ XmlDate xgetDob(); - + + /** + * Sets the patient's date of birth. + * + * @param p0 Calendar the patient's date of birth to set + */ void setDob(final Calendar p0); - + + /** + * Sets the patient's date of birth using an XmlDate object. + * + * @param p0 XmlDate the patient's date of birth as an XML typed value + */ void xsetDob(final XmlDate p0); - + + /** + * Gets the patient's age in years. + * + * @return int the patient's age in years + */ int getAge(); - + + /** + * Gets the patient's age as an Age object. + * + * @return Age the patient's age as an XML typed value + */ Age xgetAge(); - + + /** + * Sets the patient's age in years. + * + * @param p0 int the patient's age to set + */ void setAge(final int p0); - + + /** + * Sets the patient's age using an Age object. + * + * @param p0 Age the patient's age as an XML typed value + */ void xsetAge(final Age p0); - + + /** + * Gets the patient's occupation information. + * + * @return Occupation the patient's occupation details + */ Occupation getOccupation(); - + + /** + * Sets the patient's occupation information. + * + * @param p0 Occupation the patient's occupation details to set + */ void setOccupation(final Occupation p0); - + + /** + * Creates and adds a new Occupation object to the patient information. + * + * @return Occupation the newly created occupation object + */ Occupation addNewOccupation(); - + + /** + * Gets the patient's highest level of education completed. + * + * @return LevelOfEducation.Enum the patient's education level code + */ LevelOfEducation.Enum getLevelOfEducation(); - + + /** + * Gets the patient's level of education as a LevelOfEducation object. + * + * @return LevelOfEducation the patient's education level as an XML typed value + */ LevelOfEducation xgetLevelOfEducation(); - + + /** + * Sets the patient's highest level of education completed. + * + * @param p0 LevelOfEducation.Enum the patient's education level code to set + */ void setLevelOfEducation(final LevelOfEducation.Enum p0); - + + /** + * Sets the patient's level of education using a LevelOfEducation object. + * + * @param p0 LevelOfEducation the patient's education level as an XML typed value + */ void xsetLevelOfEducation(final LevelOfEducation p0); - + + /** + * Gets the patient's Health Insurance Number (HIN) information. + * + *

    The HIN is the provincial health insurance identifier used for billing and + * eligibility verification. Format varies by province (e.g., Ontario uses 10 digits + * plus 2-character version code).

    + * + * @return Hin the patient's health insurance number details + */ Hin getHin(); - + + /** + * Sets the patient's Health Insurance Number (HIN) information. + * + * @param p0 Hin the patient's health insurance number details to set + */ void setHin(final Hin p0); - + + /** + * Creates and adds a new HIN object to the patient information. + * + * @return Hin the newly created health insurance number object + */ Hin addNewHin(); - + + /** + * Gets the patient's medical record file number. + * + *

    This is the internal EMR chart number used for patient identification + * within the healthcare facility.

    + * + * @return String the patient's file number + */ String getFileNo(); - + + /** + * Gets the patient's medical record file number as an XmlString object. + * + * @return XmlString the patient's file number as an XML typed value + */ XmlString xgetFileNo(); - + + /** + * Sets the patient's medical record file number. + * + * @param p0 String the patient's file number to set + */ void setFileNo(final String p0); - + + /** + * Sets the patient's medical record file number using an XmlString object. + * + * @param p0 XmlString the patient's file number as an XML typed value + */ void xsetFileNo(final XmlString p0); - + + /** + * Gets the patient's ethnic background information. + * + *

    Used for cultural competency in healthcare delivery and for tracking + * health disparities in specific populations.

    + * + * @return EthnicBackground the patient's ethnic background details + */ EthnicBackground getEthnicBackground(); - + + /** + * Sets the patient's ethnic background information. + * + * @param p0 EthnicBackground the patient's ethnic background details to set + */ void setEthnicBackground(final EthnicBackground p0); - + + /** + * Creates and adds a new EthnicBackground object to the patient information. + * + * @return EthnicBackground the newly created ethnic background object + */ EthnicBackground addNewEthnicBackground(); - + + /** + * Gets the patient's marital status. + * + * @return MaritalStatus.Enum the patient's marital status code (e.g., M=Married, S=Single, D=Divorced) + */ MaritalStatus.Enum getMaritalStatus(); - + + /** + * Gets the patient's marital status as a MaritalStatus object. + * + * @return MaritalStatus the patient's marital status as an XML typed value + */ MaritalStatus xgetMaritalStatus(); - + + /** + * Sets the patient's marital status. + * + * @param p0 MaritalStatus.Enum the patient's marital status code to set + */ void setMaritalStatus(final MaritalStatus.Enum p0); - + + /** + * Sets the patient's marital status using a MaritalStatus object. + * + * @param p0 MaritalStatus the patient's marital status as an XML typed value + */ void xsetMaritalStatus(final MaritalStatus p0); - + + /** + * Gets the patient's allergies information. + * + *

    Critical clinical information documenting known drug and non-drug allergies, + * reactions, and severity. Must be prominently displayed to prevent adverse events.

    + * + * @return String the patient's allergies description + */ String getAllergies(); - + + /** + * Gets the patient's allergies information as an XmlString object. + * + * @return XmlString the patient's allergies as an XML typed value + */ XmlString xgetAllergies(); - + + /** + * Sets the patient's allergies information. + * + * @param p0 String the patient's allergies description to set + */ void setAllergies(final String p0); - + + /** + * Sets the patient's allergies information using an XmlString object. + * + * @param p0 XmlString the patient's allergies as an XML typed value + */ void xsetAllergies(final XmlString p0); - + + /** + * Gets the patient's current medications list. + * + *

    Documents all current prescription and over-the-counter medications, + * including dosage, frequency, and route of administration.

    + * + * @return Medications the patient's medications details + */ Medications getMedications(); - + + /** + * Sets the patient's current medications list. + * + * @param p0 Medications the patient's medications details to set + */ void setMedications(final Medications p0); - + + /** + * Creates and adds a new Medications object to the patient information. + * + * @return Medications the newly created medications object + */ Medications addNewMedications(); - + + /** + * Province enumeration interface for Canadian provinces/territories and international locations. + * + *

    Provides standardized province and territory codes using ISO 3166-2:CA format for Canadian + * jurisdictions (e.g., CA-ON for Ontario, CA-BC for British Columbia) plus codes for USA, + * out-of-province, and out-of-country patients.

    + * + *

    Used for address information and to determine jurisdiction-specific healthcare rules, + * billing codes, and regulatory compliance requirements.

    + * + * @since 2026-01-24 + */ public interface Province extends XmlString { + /** + * SchemaType for the Province interface. + */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Province.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("province34f2elemtype"); public static final Enum CA_AB = Enum.forString("CA-AB"); public static final Enum CA_BC = Enum.forString("CA-BC"); @@ -194,7 +629,10 @@ public interface Province extends XmlString public static final Enum CA_YT = Enum.forString("CA-YT"); public static final Enum USA = Enum.forString("USA"); public static final Enum OUTP = Enum.forString("OUTP"); + /** Out of country location code. */ public static final Enum OUTC = Enum.forString("OUTC"); + + /** Integer value for Alberta (CA-AB). */ public static final int INT_CA_AB = 1; public static final int INT_CA_BC = 2; public static final int INT_CA_MB = 3; @@ -209,12 +647,31 @@ public interface Province extends XmlString public static final int INT_CA_YT = 12; public static final int INT_USA = 13; public static final int INT_OUTP = 14; + /** Integer value for out of country (OUTC). */ public static final int INT_OUTC = 15; - + + /** + * Gets the enum value for this province. + * + * @return StringEnumAbstractBase the enum value + */ StringEnumAbstractBase enumValue(); - + + /** + * Sets the enum value for this province. + * + * @param p0 StringEnumAbstractBase the enum value to set + */ void set(final StringEnumAbstractBase p0); - + + /** + * Enumeration implementation for Province codes. + * + *

    Provides type-safe enumeration values for Canadian provinces, territories, + * and international locations used in patient addresses.

    + * + * @since 2026-01-24 + */ public static final class Enum extends StringEnumAbstractBase { static final int INT_CA_AB = 1; @@ -255,98 +712,231 @@ private Object readResolve() { table = new StringEnumAbstractBase.Table((StringEnumAbstractBase[])new Enum[] { new Enum("CA-AB", 1), new Enum("CA-BC", 2), new Enum("CA-MB", 3), new Enum("CA-NB", 4), new Enum("CA-NL", 5), new Enum("CA-NS", 6), new Enum("CA-NU", 7), new Enum("CA-ON", 8), new Enum("CA-PE", 9), new Enum("CA-QC", 10), new Enum("CA-SK", 11), new Enum("CA-YT", 12), new Enum("USA", 13), new Enum("OUTP", 14), new Enum("OUTC", 15) }); } } - + + /** + * Factory class for creating Province instances. + * + *

    Provides static factory methods for creating Province objects from various sources.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a Province value from an object. + * + * @param obj Object the source object + * @return Province the created province value + */ public static Province newValue(final Object obj) { return (Province)Province.type.newValue(obj); } - + + /** + * Creates a new Province instance with default options. + * + * @return Province the new province instance + */ public static Province newInstance() { return (Province)XmlBeans.getContextTypeLoader().newInstance(Province.type, (XmlOptions)null); } - + + /** + * Creates a new Province instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options + * @return Province the new province instance + */ public static Province newInstance(final XmlOptions options) { return (Province)XmlBeans.getContextTypeLoader().newInstance(Province.type, options); } - + + /** Private constructor to prevent instantiation. */ private Factory() { } } } - + + /** + * PostalCode interface for patient postal/zip codes. + * + *

    Validates and stores postal codes in Canadian format (A1A 1A1) or international formats.

    + * + * @since 2026-01-24 + */ public interface PostalCode extends XmlString { + /** SchemaType for the PostalCode interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PostalCode.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("postalcode01caelemtype"); - + + /** + * Factory class for creating PostalCode instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a PostalCode value from an object. + * + * @param obj Object the source object + * @return PostalCode the created postal code value + */ public static PostalCode newValue(final Object obj) { return (PostalCode)PostalCode.type.newValue(obj); } - + + /** + * Creates a new PostalCode instance with default options. + * + * @return PostalCode the new postal code instance + */ public static PostalCode newInstance() { return (PostalCode)XmlBeans.getContextTypeLoader().newInstance(PostalCode.type, (XmlOptions)null); } - + + /** + * Creates a new PostalCode instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options + * @return PostalCode the new postal code instance + */ public static PostalCode newInstance(final XmlOptions options) { return (PostalCode)XmlBeans.getContextTypeLoader().newInstance(PostalCode.type, options); } - + + /** Private constructor to prevent instantiation. */ private Factory() { } } } - + + /** + * HomePhone interface for patient home phone numbers. + * + *

    Stores patient home telephone contact information for appointment reminders and follow-up.

    + * + * @since 2026-01-24 + */ public interface HomePhone extends XmlString { + /** SchemaType for the HomePhone interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(HomePhone.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("homephonee963elemtype"); - + + /** + * Factory class for creating HomePhone instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a HomePhone value from an object. + * + * @param obj Object the source object + * @return HomePhone the created home phone value + */ public static HomePhone newValue(final Object obj) { return (HomePhone)HomePhone.type.newValue(obj); } - + + /** + * Creates a new HomePhone instance with default options. + * + * @return HomePhone the new home phone instance + */ public static HomePhone newInstance() { return (HomePhone)XmlBeans.getContextTypeLoader().newInstance(HomePhone.type, (XmlOptions)null); } - + + /** + * Creates a new HomePhone instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options + * @return HomePhone the new home phone instance + */ public static HomePhone newInstance(final XmlOptions options) { return (HomePhone)XmlBeans.getContextTypeLoader().newInstance(HomePhone.type, options); } - + + /** Private constructor to prevent instantiation. */ private Factory() { } } } - + + /** + * WorkPhone interface for patient work phone numbers. + * + *

    Stores patient work telephone contact information for daytime contact during business hours.

    + * + * @since 2026-01-24 + */ public interface WorkPhone extends XmlString { + /** SchemaType for the WorkPhone interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(WorkPhone.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("workphone1015elemtype"); - + + /** + * Factory class for creating WorkPhone instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a WorkPhone value from an object. + * + * @param obj Object the source object + * @return WorkPhone the created work phone value + */ public static WorkPhone newValue(final Object obj) { return (WorkPhone)WorkPhone.type.newValue(obj); } - + + /** + * Creates a new WorkPhone instance with default options. + * + * @return WorkPhone the new work phone instance + */ public static WorkPhone newInstance() { return (WorkPhone)XmlBeans.getContextTypeLoader().newInstance(WorkPhone.type, (XmlOptions)null); } - + + /** + * Creates a new WorkPhone instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options + * @return WorkPhone the new work phone instance + */ public static WorkPhone newInstance(final XmlOptions options) { return (WorkPhone)XmlBeans.getContextTypeLoader().newInstance(WorkPhone.type, options); } - + + /** Private constructor to prevent instantiation. */ private Factory() { } } } - + + /** + * Language interface for patient preferred language using ISO 639-3 codes. + * + *

    Supports comprehensive language selection for patient communication preferences including + * major world languages and sign languages. Uses ISO 639-3 three-letter language codes for + * international standardization (e.g., ENG=English, FRA=French, CMN=Mandarin Chinese).

    + * + *

    Critical for culturally competent care and ensuring effective patient-provider communication, + * interpreter services, and translated health education materials.

    + * + * @since 2026-01-24 + */ public interface Language extends XmlString { + /** SchemaType for the Language interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Language.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("language69caelemtype"); + + /** Afar language code (AAR). */ public static final Enum AAR = Enum.forString("AAR"); public static final Enum AFR = Enum.forString("AFR"); public static final Enum AKA = Enum.forString("AKA"); @@ -933,48 +1523,130 @@ private Factory() { } } } - + + /** + * Age interface for patient age in years. + * + *

    Represents the patient's age as an integer value, typically calculated from date of birth. + * Used for age-specific clinical decision support, screening recommendations, and billing rules.

    + * + * @since 2026-01-24 + */ public interface Age extends XmlInt { + /** SchemaType for the Age interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Age.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("agec433elemtype"); - + + /** + * Factory class for creating Age instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates an Age value from an object. + * + * @param obj Object the source object + * @return Age the created age value + */ public static Age newValue(final Object obj) { return (Age)Age.type.newValue(obj); } - + + /** + * Creates a new Age instance with default options. + * + * @return Age the new age instance + */ public static Age newInstance() { return (Age)XmlBeans.getContextTypeLoader().newInstance(Age.type, (XmlOptions)null); } + /** + * Creates a new Age instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options + * @return Age the new age instance + */ public static Age newInstance(final XmlOptions options) { return (Age)XmlBeans.getContextTypeLoader().newInstance(Age.type, options); } - + + /** Private constructor to prevent instantiation. */ private Factory() { } } } - + + /** + * Occupation interface for patient occupation information. + * + *

    Captures the patient's current occupation using standardized occupation codes or + * free-text description. Occupation data is used for occupational health tracking, + * workplace injury documentation, and social determinants of health analysis.

    + * + * @since 2026-01-24 + */ public interface Occupation extends XmlObject { + /** SchemaType for the Occupation interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Occupation.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("occupation2d37elemtype"); - + + /** + * Gets the occupation value from standardized codes. + * + * @return Value.Enum the occupation code + */ Value.Enum getValue(); - + + /** + * Gets the occupation value as a Value object. + * + * @return Value the occupation value as an XML typed value + */ Value xgetValue(); - + + /** + * Sets the occupation using a standardized code. + * + * @param p0 Value.Enum the occupation code to set + */ void setValue(final Value.Enum p0); - + + /** + * Sets the occupation using a Value object. + * + * @param p0 Value the occupation value as an XML typed value + */ void xsetValue(final Value p0); - + + /** + * Gets the free-text occupation description for non-standard occupations. + * + * @return String the occupation description text + */ String getOther(); - + + /** + * Gets the free-text occupation description as an XmlString object. + * + * @return XmlString the occupation description as an XML typed value + */ XmlString xgetOther(); - + + /** + * Sets the free-text occupation description. + * + * @param p0 String the occupation description to set + */ void setOther(final String p0); - + + /** + * Sets the free-text occupation description using an XmlString object. + * + * @param p0 XmlString the occupation description as an XML typed value + */ void xsetOther(final XmlString p0); public interface Value extends XmlString @@ -1821,10 +2493,22 @@ private Factory() { } } } - + + /** + * LevelOfEducation interface for patient education level classification. + * + *

    Standardized education level codes (ED001-ED006) representing the patient's highest + * level of completed education. Used for health literacy assessment, patient education material + * selection, and social determinants of health tracking.

    + * + * @since 2026-01-24 + */ public interface LevelOfEducation extends XmlString { + /** SchemaType for the LevelOfEducation interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(LevelOfEducation.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("levelofeducationad55elemtype"); + + /** Education level code ED001. */ public static final Enum ED_001 = Enum.forString("ED001"); public static final Enum ED_002 = Enum.forString("ED002"); public static final Enum ED_003 = Enum.forString("ED003"); @@ -1895,21 +2579,63 @@ private Factory() { } } } - + + /** + * Hin (Health Insurance Number) interface for provincial health insurance information. + * + *

    Stores the patient's provincial health insurance number and type. The HIN is the primary + * identifier for billing and eligibility verification with provincial health insurance plans. + * Format and validation rules vary by province (e.g., Ontario: 10 digits + 2-letter version code, + * British Columbia: 10 digits).

    + * + *

    Protected Health Information: HINs are personally identifiable health + * information and must be protected according to PIPEDA and provincial privacy legislation.

    + * + * @since 2026-01-24 + */ public interface Hin extends XmlString { + /** SchemaType for the Hin interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Hin.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("hinbd65elemtype"); - + + /** + * Gets the HIN type (e.g., provincial plan type). + * + * @return Type.Enum the HIN type code + */ Type.Enum getType(); - + + /** + * Gets the HIN type as a Type object. + * + * @return Type the HIN type as an XML typed value + */ Type xgetType(); - + + /** + * Checks if the HIN type is set. + * + * @return boolean true if type is set, false otherwise + */ boolean isSetType(); - + + /** + * Sets the HIN type. + * + * @param p0 Type.Enum the HIN type code to set + */ void setType(final Type.Enum p0); - + + /** + * Sets the HIN type using a Type object. + * + * @param p0 Type the HIN type as an XML typed value + */ void xsetType(final Type p0); - + + /** + * Unsets the HIN type (sets to null). + */ void unsetType(); public interface Type extends XmlString @@ -1988,11 +2714,29 @@ private Factory() { } } } - + + /** + * EthnicBackground interface for patient ethnic and cultural background information. + * + *

    Captures self-identified ethnic background and cultural heritage information. This data + * supports culturally competent care delivery, health equity research, and tracking of health + * disparities in specific populations. Multiple values can be selected to reflect mixed heritage.

    + * + *

    Collection and use of this information must respect patient privacy and follow anti-discrimination + * policies. Patients should always have the option to decline providing this information.

    + * + * @since 2026-01-24 + */ public interface EthnicBackground extends XmlObject { + /** SchemaType for the EthnicBackground interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(EthnicBackground.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("ethnicbackgrounda065elemtype"); - + + /** + * Gets all ethnic background values as an array. + * + * @return Value[] array of ethnic background values + */ Value[] getValueArray(); Value getValueArray(final int p0); @@ -2125,10 +2869,22 @@ private Factory() { } } } - + + /** + * MaritalStatus interface for patient marital status classification. + * + *

    Standardized marital status codes representing the patient's current marital or relationship + * status. Used for demographic reporting, social support assessment, and next-of-kin determination. + * Codes follow healthcare industry standards (e.g., MS005=Single, MS010=Married, MS015=Common-law).

    + * + * @since 2026-01-24 + */ public interface MaritalStatus extends XmlString { + /** SchemaType for the MaritalStatus interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(MaritalStatus.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("maritalstatus2b0celemtype"); + + /** Marital status code MS005 (typically Single). */ public static final Enum MS_005 = Enum.forString("MS005"); public static final Enum MS_010 = Enum.forString("MS010"); public static final Enum MS_015 = Enum.forString("MS015"); @@ -2190,11 +2946,29 @@ private Factory() { } } } - + + /** + * Medications interface for patient current medications list. + * + *

    Comprehensive list of all current prescription medications, over-the-counter drugs, and + * supplements. Critical for medication reconciliation, drug interaction checking, and clinical + * decision support. Should be reviewed and updated at every patient encounter.

    + * + *

    Clinical Safety: Accurate medication lists are essential for patient safety + * to prevent adverse drug events, duplicate therapy, and drug-drug interactions.

    + * + * @since 2026-01-24 + */ public interface Medications extends XmlObject { + /** SchemaType for the Medications interface. */ public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Medications.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("medications594eelemtype"); - + + /** + * Gets all medication values as an array. + * + * @return Value.Enum[] array of medication values + */ Value.Enum[] getValueArray(); Value.Enum getValueArray(final int p0); @@ -2399,93 +3173,265 @@ private Factory() { } } } - + + /** + * Factory class for creating and parsing PatientInformation instances. + * + *

    Provides static factory methods for creating new PatientInformation objects and parsing + * XML data from various sources (strings, files, URLs, streams). Supports XML validation and + * custom parsing options through XmlOptions parameter.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new PatientInformation instance with default options. + * + * @return PatientInformation the new patient information instance + */ public static PatientInformation newInstance() { return (PatientInformation)XmlBeans.getContextTypeLoader().newInstance(PatientInformation.type, (XmlOptions)null); } - + + /** + * Creates a new PatientInformation instance with specified XML options. + * + * @param options XmlOptions the XML parsing/generation options + * @return PatientInformation the new patient information instance + */ public static PatientInformation newInstance(final XmlOptions options) { return (PatientInformation)XmlBeans.getContextTypeLoader().newInstance(PatientInformation.type, options); } - + + /** + * Parses XML string to create a PatientInformation instance. + * + * @param xmlAsString String the XML string to parse + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PatientInformation parse(final String xmlAsString) throws XmlException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(xmlAsString, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML string to create a PatientInformation instance with specified options. + * + * @param xmlAsString String the XML string to parse + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PatientInformation parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(xmlAsString, PatientInformation.type, options); } - + + /** + * Parses XML file to create a PatientInformation instance. + * + * @param file File the XML file to parse + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the file cannot be read + */ public static PatientInformation parse(final File file) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(file, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML file to create a PatientInformation instance with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the file cannot be read + */ public static PatientInformation parse(final File file, final XmlOptions options) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(file, PatientInformation.type, options); } - + + /** + * Parses XML from URL to create a PatientInformation instance. + * + * @param u URL the URL to read XML from + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the URL cannot be accessed + */ public static PatientInformation parse(final URL u) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(u, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML from URL to create a PatientInformation instance with specified options. + * + * @param u URL the URL to read XML from + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the URL cannot be accessed + */ public static PatientInformation parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(u, PatientInformation.type, options); } - + + /** + * Parses XML from InputStream to create a PatientInformation instance. + * + * @param is InputStream the input stream to read XML from + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the stream cannot be read + */ public static PatientInformation parse(final InputStream is) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(is, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML from InputStream to create a PatientInformation instance with specified options. + * + * @param is InputStream the input stream to read XML from + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the stream cannot be read + */ public static PatientInformation parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(is, PatientInformation.type, options); } - + + /** + * Parses XML from Reader to create a PatientInformation instance. + * + * @param r Reader the reader to read XML from + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the reader cannot be read + */ public static PatientInformation parse(final Reader r) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(r, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML from Reader to create a PatientInformation instance with specified options. + * + * @param r Reader the reader to read XML from + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if the reader cannot be read + */ public static PatientInformation parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(r, PatientInformation.type, options); } + /** + * Parses XML from XMLStreamReader to create a PatientInformation instance. + * + * @param sr XMLStreamReader the stream reader to read XML from + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PatientInformation parse(final XMLStreamReader sr) throws XmlException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(sr, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML from XMLStreamReader to create a PatientInformation instance with specified options. + * + * @param sr XMLStreamReader the stream reader to read XML from + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PatientInformation parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(sr, PatientInformation.type, options); } - + + /** + * Parses XML from DOM Node to create a PatientInformation instance. + * + * @param node Node the DOM node to parse + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PatientInformation parse(final Node node) throws XmlException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(node, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML from DOM Node to create a PatientInformation instance with specified options. + * + * @param node Node the DOM node to parse + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PatientInformation parse(final Node node, final XmlOptions options) throws XmlException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(node, PatientInformation.type, options); } - + + /** + * Parses XML from XMLInputStream to create a PatientInformation instance. + * + * @deprecated Use alternative parsing methods with modern XML APIs + * @param xis XMLInputStream the XML input stream to parse + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error in the XML stream + */ @Deprecated public static PatientInformation parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(xis, PatientInformation.type, (XmlOptions)null); } - + + /** + * Parses XML from XMLInputStream to create a PatientInformation instance with specified options. + * + * @deprecated Use alternative parsing methods with modern XML APIs + * @param xis XMLInputStream the XML input stream to parse + * @param options XmlOptions the XML parsing options + * @return PatientInformation the parsed patient information + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error in the XML stream + */ @Deprecated public static PatientInformation parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (PatientInformation)XmlBeans.getContextTypeLoader().parse(xis, PatientInformation.type, options); } - + + /** + * Creates a validating XMLInputStream for patient information XML. + * + * @deprecated Use alternative validation methods with modern XML APIs + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream the validating XML input stream + * @throws XmlException if the XML is invalid + * @throws XMLStreamException if there is an error in the XML stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PatientInformation.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream for patient information XML with specified options. + * + * @deprecated Use alternative validation methods with modern XML APIs + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions the XML validation options + * @return XMLInputStream the validating XML input stream + * @throws XmlException if the XML is invalid + * @throws XMLStreamException if there is an error in the XML stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PatientInformation.type, options); } - + + /** Private constructor to prevent instantiation. */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/PhysicalExaminationType.java b/src/main/java/ca/openosp/openo/ar2005/PhysicalExaminationType.java index 8df5aa426d7..a455f053fa6 100644 --- a/src/main/java/ca/openosp/openo/ar2005/PhysicalExaminationType.java +++ b/src/main/java/ca/openosp/openo/ar2005/PhysicalExaminationType.java @@ -17,314 +17,952 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents a comprehensive physical examination record type for antenatal care documentation. + * + *

    This XMLBeans-generated interface defines the structure for physical examination data + * collected during prenatal care visits, including vital signs, body measurements, and + * systematic examination findings across multiple organ systems.

    + * + *

    The physical examination type supports both numerical measurements (height, weight, BMI, + * blood pressure) and categorical assessments (normal/abnormal classifications) for various + * anatomical regions including thyroid, cardiovascular, chest, abdomen, gynecological + * structures, and other relevant systems.

    + * + *

    This type is part of the British Columbia Antenatal Record 2005 (BCAR) form suite, + * used to standardize and document maternal health assessments throughout pregnancy. + * All examination findings can be marked as nil/null when data is not available or not assessed.

    + * + * @see NormalAbnormalNullType + * @see ca.openosp.openo.ar2005 + * @since 2026-01-24 + */ public interface PhysicalExaminationType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PhysicalExaminationType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("physicalexaminationtypeb2d9type"); - + + /** + * Gets the height measurement value. + * + * @return float the patient's height measurement + */ float getHeight(); - + + /** + * Gets the height measurement as an XMLBeans Height object. + * + * @return Height the height value wrapped in an XMLBeans type + */ Height xgetHeight(); - + + /** + * Checks if the height value is nil (not provided or not applicable). + * + * @return boolean true if height is nil, false otherwise + */ boolean isNilHeight(); - + + /** + * Sets the height measurement value. + * + * @param p0 float the height value to set + */ void setHeight(final float p0); - + + /** + * Sets the height measurement using an XMLBeans Height object. + * + * @param p0 Height the height value to set + */ void xsetHeight(final Height p0); - + + /** + * Sets the height value to nil (marks as not provided or not applicable). + */ void setNilHeight(); - + + /** + * Gets the weight measurement value. + * + * @return float the patient's weight measurement + */ float getWeight(); - + + /** + * Gets the weight measurement as an XMLBeans Weight object. + * + * @return Weight the weight value wrapped in an XMLBeans type + */ Weight xgetWeight(); - + + /** + * Checks if the weight value is nil (not provided or not applicable). + * + * @return boolean true if weight is nil, false otherwise + */ boolean isNilWeight(); - + + /** + * Sets the weight measurement value. + * + * @param p0 float the weight value to set + */ void setWeight(final float p0); - + + /** + * Sets the weight measurement using an XMLBeans Weight object. + * + * @param p0 Weight the weight value to set + */ void xsetWeight(final Weight p0); - + + /** + * Sets the weight value to nil (marks as not provided or not applicable). + */ void setNilWeight(); - + + /** + * Gets the Body Mass Index (BMI) value. + * + * @return float the calculated BMI value + */ float getBmi(); - + + /** + * Gets the BMI value as an XMLBeans Bmi object. + * + * @return Bmi the BMI value wrapped in an XMLBeans type + */ Bmi xgetBmi(); - + + /** + * Checks if the BMI value is nil (not provided or not applicable). + * + * @return boolean true if BMI is nil, false otherwise + */ boolean isNilBmi(); - + + /** + * Sets the Body Mass Index (BMI) value. + * + * @param p0 float the BMI value to set + */ void setBmi(final float p0); - + + /** + * Sets the BMI value using an XMLBeans Bmi object. + * + * @param p0 Bmi the BMI value to set + */ void xsetBmi(final Bmi p0); - + + /** + * Sets the BMI value to nil (marks as not provided or not applicable). + */ void setNilBmi(); - + + /** + * Gets the blood pressure measurement as a string. + * + * @return String the blood pressure value (typically in systolic/diastolic format) + */ String getBp(); - + + /** + * Gets the blood pressure measurement as an XMLBeans Bp object. + * + * @return Bp the blood pressure value wrapped in an XMLBeans type + */ Bp xgetBp(); - + + /** + * Sets the blood pressure measurement value. + * + * @param p0 String the blood pressure value to set + */ void setBp(final String p0); - + + /** + * Sets the blood pressure measurement using an XMLBeans Bp object. + * + * @param p0 Bp the blood pressure value to set + */ void xsetBp(final Bp p0); - + + /** + * Gets the thyroid examination finding. + * + * @return NormalAbnormalNullType the thyroid examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getThyroid(); - + + /** + * Sets the thyroid examination finding. + * + * @param p0 NormalAbnormalNullType the thyroid examination status to set + */ void setThyroid(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new thyroid examination finding. + * + * @return NormalAbnormalNullType the newly created thyroid examination object + */ NormalAbnormalNullType addNewThyroid(); - + + /** + * Gets the chest examination finding. + * + * @return NormalAbnormalNullType the chest examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getChest(); - + + /** + * Sets the chest examination finding. + * + * @param p0 NormalAbnormalNullType the chest examination status to set + */ void setChest(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new chest examination finding. + * + * @return NormalAbnormalNullType the newly created chest examination object + */ NormalAbnormalNullType addNewChest(); - + + /** + * Gets the breast examination finding. + * + * @return NormalAbnormalNullType the breast examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getBreasts(); - + + /** + * Sets the breast examination finding. + * + * @param p0 NormalAbnormalNullType the breast examination status to set + */ void setBreasts(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new breast examination finding. + * + * @return NormalAbnormalNullType the newly created breast examination object + */ NormalAbnormalNullType addNewBreasts(); - + + /** + * Gets the cardiovascular examination finding. + * + * @return NormalAbnormalNullType the cardiovascular examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getCardiovascular(); - + + /** + * Sets the cardiovascular examination finding. + * + * @param p0 NormalAbnormalNullType the cardiovascular examination status to set + */ void setCardiovascular(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new cardiovascular examination finding. + * + * @return NormalAbnormalNullType the newly created cardiovascular examination object + */ NormalAbnormalNullType addNewCardiovascular(); - + + /** + * Gets the abdominal examination finding. + * + * @return NormalAbnormalNullType the abdominal examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getAbdomen(); - + + /** + * Sets the abdominal examination finding. + * + * @param p0 NormalAbnormalNullType the abdominal examination status to set + */ void setAbdomen(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new abdominal examination finding. + * + * @return NormalAbnormalNullType the newly created abdominal examination object + */ NormalAbnormalNullType addNewAbdomen(); - + + /** + * Gets the varicosities examination finding. + * + * @return NormalAbnormalNullType the varicosities examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getVaricosities(); - + + /** + * Sets the varicosities examination finding. + * + * @param p0 NormalAbnormalNullType the varicosities examination status to set + */ void setVaricosities(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new varicosities examination finding. + * + * @return NormalAbnormalNullType the newly created varicosities examination object + */ NormalAbnormalNullType addNewVaricosities(); - + + /** + * Gets the external genitals examination finding. + * + * @return NormalAbnormalNullType the external genitals examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getExernalGenitals(); - + + /** + * Sets the external genitals examination finding. + * + * @param p0 NormalAbnormalNullType the external genitals examination status to set + */ void setExernalGenitals(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new external genitals examination finding. + * + * @return NormalAbnormalNullType the newly created external genitals examination object + */ NormalAbnormalNullType addNewExernalGenitals(); - + + /** + * Gets the cervix and vagina examination finding. + * + * @return NormalAbnormalNullType the cervix/vagina examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getCervixVagina(); - + + /** + * Sets the cervix and vagina examination finding. + * + * @param p0 NormalAbnormalNullType the cervix/vagina examination status to set + */ void setCervixVagina(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new cervix and vagina examination finding. + * + * @return NormalAbnormalNullType the newly created cervix/vagina examination object + */ NormalAbnormalNullType addNewCervixVagina(); - + + /** + * Gets the uterus examination finding. + * + * @return NormalAbnormalNullType the uterus examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getUterus(); - + + /** + * Sets the uterus examination finding. + * + * @param p0 NormalAbnormalNullType the uterus examination status to set + */ void setUterus(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new uterus examination finding. + * + * @return NormalAbnormalNullType the newly created uterus examination object + */ NormalAbnormalNullType addNewUterus(); - + + /** + * Gets the uterus size description. + * + * @return String the uterus size measurement or description + */ String getUterusSize(); - + + /** + * Gets the uterus size as an XMLBeans XmlString object. + * + * @return XmlString the uterus size wrapped in an XMLBeans type + */ XmlString xgetUterusSize(); - + + /** + * Sets the uterus size description. + * + * @param p0 String the uterus size measurement or description to set + */ void setUterusSize(final String p0); - + + /** + * Sets the uterus size using an XMLBeans XmlString object. + * + * @param p0 XmlString the uterus size to set + */ void xsetUterusSize(final XmlString p0); - + + /** + * Gets the adnexa examination finding. + * + * @return NormalAbnormalNullType the adnexa examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getAdnexa(); - + + /** + * Sets the adnexa examination finding. + * + * @param p0 NormalAbnormalNullType the adnexa examination status to set + */ void setAdnexa(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new adnexa examination finding. + * + * @return NormalAbnormalNullType the newly created adnexa examination object + */ NormalAbnormalNullType addNewAdnexa(); - + + /** + * Gets the description for other examination findings. + * + * @return String the textual description of other examination findings + */ String getOtherDescr(); - + + /** + * Gets the other examination description as an XMLBeans XmlString object. + * + * @return XmlString the other examination description wrapped in an XMLBeans type + */ XmlString xgetOtherDescr(); - + + /** + * Sets the description for other examination findings. + * + * @param p0 String the textual description to set + */ void setOtherDescr(final String p0); - + + /** + * Sets the other examination description using an XMLBeans XmlString object. + * + * @param p0 XmlString the description to set + */ void xsetOtherDescr(final XmlString p0); - + + /** + * Gets the other examination finding status. + * + * @return NormalAbnormalNullType the other examination status (normal, abnormal, or null) + */ NormalAbnormalNullType getOther(); - + + /** + * Sets the other examination finding status. + * + * @param p0 NormalAbnormalNullType the other examination status to set + */ void setOther(final NormalAbnormalNullType p0); - + + /** + * Creates and adds a new other examination finding. + * + * @return NormalAbnormalNullType the newly created other examination object + */ NormalAbnormalNullType addNewOther(); - + + /** + * Represents a height measurement as an XML floating-point type. + * + *

    This inner interface provides XMLBeans-specific type handling for height values, + * extending XmlFloat to support XML schema validation and serialization.

    + * + * @since 2026-01-24 + */ public interface Height extends XmlFloat { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Height.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("heightf75celemtype"); - + + /** + * Factory class for creating Height instances. + * + *

    Provides static methods for constructing new Height objects with or without + * XMLBeans parsing options.

    + */ public static final class Factory { + /** + * Creates a new Height instance from an object value. + * + * @param obj Object the value to convert to a Height type + * @return Height the newly created Height instance + */ public static Height newValue(final Object obj) { return (Height)Height.type.newValue(obj); } - + + /** + * Creates a new empty Height instance. + * + * @return Height the newly created Height instance + */ public static Height newInstance() { return (Height)XmlBeans.getContextTypeLoader().newInstance(Height.type, (XmlOptions)null); } - + + /** + * Creates a new empty Height instance with specified XML options. + * + * @param options XmlOptions the XML parsing/validation options + * @return Height the newly created Height instance + */ public static Height newInstance(final XmlOptions options) { return (Height)XmlBeans.getContextTypeLoader().newInstance(Height.type, options); } - + + /** + * Private constructor to prevent instantiation of factory class. + */ private Factory() { } } } - + + /** + * Represents a weight measurement as an XML floating-point type. + * + *

    This inner interface provides XMLBeans-specific type handling for weight values, + * extending XmlFloat to support XML schema validation and serialization.

    + * + * @since 2026-01-24 + */ public interface Weight extends XmlFloat { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Weight.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("weightc0edelemtype"); - + + /** + * Factory class for creating Weight instances. + * + *

    Provides static methods for constructing new Weight objects with or without + * XMLBeans parsing options.

    + */ public static final class Factory { + /** + * Creates a new Weight instance from an object value. + * + * @param obj Object the value to convert to a Weight type + * @return Weight the newly created Weight instance + */ public static Weight newValue(final Object obj) { return (Weight)Weight.type.newValue(obj); } - + + /** + * Creates a new empty Weight instance. + * + * @return Weight the newly created Weight instance + */ public static Weight newInstance() { return (Weight)XmlBeans.getContextTypeLoader().newInstance(Weight.type, (XmlOptions)null); } - + + /** + * Creates a new empty Weight instance with specified XML options. + * + * @param options XmlOptions the XML parsing/validation options + * @return Weight the newly created Weight instance + */ public static Weight newInstance(final XmlOptions options) { return (Weight)XmlBeans.getContextTypeLoader().newInstance(Weight.type, options); } - + + /** + * Private constructor to prevent instantiation of factory class. + */ private Factory() { } } } - + + /** + * Represents a Body Mass Index (BMI) measurement as an XML floating-point type. + * + *

    This inner interface provides XMLBeans-specific type handling for BMI values, + * extending XmlFloat to support XML schema validation and serialization.

    + * + * @since 2026-01-24 + */ public interface Bmi extends XmlFloat { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Bmi.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("bmi6343elemtype"); - + + /** + * Factory class for creating Bmi instances. + * + *

    Provides static methods for constructing new Bmi objects with or without + * XMLBeans parsing options.

    + */ public static final class Factory { + /** + * Creates a new Bmi instance from an object value. + * + * @param obj Object the value to convert to a Bmi type + * @return Bmi the newly created Bmi instance + */ public static Bmi newValue(final Object obj) { return (Bmi)Bmi.type.newValue(obj); } - + + /** + * Creates a new empty Bmi instance. + * + * @return Bmi the newly created Bmi instance + */ public static Bmi newInstance() { return (Bmi)XmlBeans.getContextTypeLoader().newInstance(Bmi.type, (XmlOptions)null); } - + + /** + * Creates a new empty Bmi instance with specified XML options. + * + * @param options XmlOptions the XML parsing/validation options + * @return Bmi the newly created Bmi instance + */ public static Bmi newInstance(final XmlOptions options) { return (Bmi)XmlBeans.getContextTypeLoader().newInstance(Bmi.type, options); } - + + /** + * Private constructor to prevent instantiation of factory class. + */ private Factory() { } } } - + + /** + * Represents a blood pressure measurement as an XML string type. + * + *

    This inner interface provides XMLBeans-specific type handling for blood pressure values, + * extending XmlString to support XML schema validation and serialization. Blood pressure + * is typically stored in systolic/diastolic format (e.g., "120/80").

    + * + * @since 2026-01-24 + */ public interface Bp extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Bp.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("bp6443elemtype"); - + + /** + * Factory class for creating Bp instances. + * + *

    Provides static methods for constructing new Bp objects with or without + * XMLBeans parsing options.

    + */ public static final class Factory { + /** + * Creates a new Bp instance from an object value. + * + * @param obj Object the value to convert to a Bp type + * @return Bp the newly created Bp instance + */ public static Bp newValue(final Object obj) { return (Bp)Bp.type.newValue(obj); } - + + /** + * Creates a new empty Bp instance. + * + * @return Bp the newly created Bp instance + */ public static Bp newInstance() { return (Bp)XmlBeans.getContextTypeLoader().newInstance(Bp.type, (XmlOptions)null); } - + + /** + * Creates a new empty Bp instance with specified XML options. + * + * @param options XmlOptions the XML parsing/validation options + * @return Bp the newly created Bp instance + */ public static Bp newInstance(final XmlOptions options) { return (Bp)XmlBeans.getContextTypeLoader().newInstance(Bp.type, options); } - + + /** + * Private constructor to prevent instantiation of factory class. + */ private Factory() { } } } - + + /** + * Factory class for creating and parsing PhysicalExaminationType instances. + * + *

    Provides static methods for constructing new PhysicalExaminationType objects, + * parsing XML from various sources (strings, files, URLs, streams), and validating + * XML input streams.

    + */ public static final class Factory { + /** + * Creates a new empty PhysicalExaminationType instance. + * + * @return PhysicalExaminationType the newly created instance + */ public static PhysicalExaminationType newInstance() { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().newInstance(PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Creates a new empty PhysicalExaminationType instance with specified XML options. + * + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the newly created instance + */ public static PhysicalExaminationType newInstance(final XmlOptions options) { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().newInstance(PhysicalExaminationType.type, options); } - + + /** + * Parses an XML string into a PhysicalExaminationType instance. + * + * @param xmlAsString String the XML document as a string + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static PhysicalExaminationType parse(final String xmlAsString) throws XmlException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(xmlAsString, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses an XML string into a PhysicalExaminationType instance with specified options. + * + * @param xmlAsString String the XML document as a string + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static PhysicalExaminationType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(xmlAsString, PhysicalExaminationType.type, options); } - + + /** + * Parses an XML file into a PhysicalExaminationType instance. + * + * @param file File the XML file to parse + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading the file + */ public static PhysicalExaminationType parse(final File file) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(file, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses an XML file into a PhysicalExaminationType instance with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading the file + */ public static PhysicalExaminationType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(file, PhysicalExaminationType.type, options); } - + + /** + * Parses XML from a URL into a PhysicalExaminationType instance. + * + * @param u URL the URL pointing to the XML document + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading from the URL + */ public static PhysicalExaminationType parse(final URL u) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(u, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL into a PhysicalExaminationType instance with specified options. + * + * @param u URL the URL pointing to the XML document + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading from the URL + */ public static PhysicalExaminationType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(u, PhysicalExaminationType.type, options); } - + + /** + * Parses XML from an InputStream into a PhysicalExaminationType instance. + * + * @param is InputStream the input stream containing the XML document + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading from the stream + */ public static PhysicalExaminationType parse(final InputStream is) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(is, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses XML from an InputStream into a PhysicalExaminationType instance with specified options. + * + * @param is InputStream the input stream containing the XML document + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading from the stream + */ public static PhysicalExaminationType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(is, PhysicalExaminationType.type, options); } - + + /** + * Parses XML from a Reader into a PhysicalExaminationType instance. + * + * @param r Reader the reader providing the XML document + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading from the reader + */ public static PhysicalExaminationType parse(final Reader r) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(r, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses XML from a Reader into a PhysicalExaminationType instance with specified options. + * + * @param r Reader the reader providing the XML document + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws IOException if an I/O error occurs while reading from the reader + */ public static PhysicalExaminationType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(r, PhysicalExaminationType.type, options); } - + + /** + * Parses XML from an XMLStreamReader into a PhysicalExaminationType instance. + * + * @param sr XMLStreamReader the stream reader positioned at the start of the document + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static PhysicalExaminationType parse(final XMLStreamReader sr) throws XmlException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(sr, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLStreamReader into a PhysicalExaminationType instance with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the start of the document + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static PhysicalExaminationType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(sr, PhysicalExaminationType.type, options); } - + + /** + * Parses XML from a DOM Node into a PhysicalExaminationType instance. + * + * @param node Node the DOM node representing the XML document or element + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static PhysicalExaminationType parse(final Node node) throws XmlException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(node, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM Node into a PhysicalExaminationType instance with specified options. + * + * @param node Node the DOM node representing the XML document or element + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + */ public static PhysicalExaminationType parse(final Node node, final XmlOptions options) throws XmlException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(node, PhysicalExaminationType.type, options); } - + + /** + * Parses XML from an XMLInputStream into a PhysicalExaminationType instance. + * + * @param xis XMLInputStream the XML input stream + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated. Use InputStream or Reader instead. + */ @Deprecated public static PhysicalExaminationType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(xis, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLInputStream into a PhysicalExaminationType instance with specified options. + * + * @param xis XMLInputStream the XML input stream + * @param options XmlOptions the XML parsing/validation options + * @return PhysicalExaminationType the parsed instance + * @throws XmlException if the XML is malformed or invalid + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated. Use InputStream or Reader instead. + */ @Deprecated public static PhysicalExaminationType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (PhysicalExaminationType)XmlBeans.getContextTypeLoader().parse(xis, PhysicalExaminationType.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper for the given input stream. + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if the XML is malformed or invalid + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated. Use InputStream or Reader instead. + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PhysicalExaminationType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper for the given input stream with specified options. + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @param options XmlOptions the XML parsing/validation options + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if the XML is malformed or invalid + * @throws XMLStreamException if an XML streaming error occurs + * @deprecated XMLInputStream is deprecated. Use InputStream or Reader instead. + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PhysicalExaminationType.type, options); } - + + /** + * Private constructor to prevent instantiation of factory class. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/PregnancyHistory.java b/src/main/java/ca/openosp/openo/ar2005/PregnancyHistory.java index 5a928ce9c92..a33b2be23ca 100644 --- a/src/main/java/ca/openosp/openo/ar2005/PregnancyHistory.java +++ b/src/main/java/ca/openosp/openo/ar2005/PregnancyHistory.java @@ -19,218 +19,728 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents the pregnancy history component of the British Columbia Antenatal Record (BCAR AR2005). + * This interface provides access to comprehensive pregnancy-related data including menstrual history, + * estimated delivery dates, gravidity/parity information, and contraceptive history. + * + *

    This is an XMLBeans-generated interface that provides strongly-typed access to pregnancy history + * data stored in XML format. It includes information critical for prenatal care such as: + *

      + *
    • Last Menstrual Period (LMP) and menstrual cycle characteristics
    • + *
    • Estimated Due Date (EDB) calculations using various dating methods
    • + *
    • Obstetric history (Gravida, Term, Premature, Abortuses, Living children)
    • + *
    • Contraceptive usage history
    • + *
    + * + *

    This interface supports the BC Ministry of Health's standardized antenatal record forms + * used across British Columbia healthcare facilities for maternity care documentation. + * + * @see YesNoNullType + * @see DatingMethods + * @since 2026-01-23 + */ public interface PregnancyHistory extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PregnancyHistory.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("pregnancyhistory853etype"); - + + /** + * Gets the Last Menstrual Period (LMP) date. + * The LMP is used as the primary method for calculating gestational age and estimated due date. + * + * @return Calendar the date of the last menstrual period, or null if not set or nil + */ Calendar getLMP(); - + + /** + * Gets the Last Menstrual Period (LMP) as an XmlDate object. + * This provides access to the underlying XML representation of the date. + * + * @return XmlDate the LMP date as an XML date object + */ XmlDate xgetLMP(); - + + /** + * Checks if the LMP field is explicitly set to nil (XML nil attribute). + * + * @return boolean true if the LMP is nil, false otherwise + */ boolean isNilLMP(); - + + /** + * Sets the Last Menstrual Period (LMP) date. + * + * @param p0 Calendar the date of the last menstrual period + */ void setLMP(final Calendar p0); - + + /** + * Sets the Last Menstrual Period (LMP) using an XmlDate object. + * + * @param p0 XmlDate the LMP date as an XML date object + */ void xsetLMP(final XmlDate p0); - + + /** + * Sets the LMP field to nil (XML nil attribute true). + * Use this when the LMP is unknown or not applicable. + */ void setNilLMP(); + /** + * Gets whether the patient is certain about the LMP date. + * This information affects the reliability of gestational age calculations. + * + * @return YesNoNullType the certainty status of the LMP date + */ YesNoNullType getLMPCertain(); - + + /** + * Sets whether the patient is certain about the LMP date. + * + * @param p0 YesNoNullType the certainty status (yes, no, or null) + */ void setLMPCertain(final YesNoNullType p0); - + + /** + * Creates and adds a new LMPCertain element. + * + * @return YesNoNullType a new LMPCertain element instance + */ YesNoNullType addNewLMPCertain(); - + + /** + * Gets the length of the menstrual cycle in days. + * Normal menstrual cycles range from 21-35 days, with 28 days being average. + * + * @return String the menstrual cycle length as a string representation + */ String getMenCycle(); - + + /** + * Gets the menstrual cycle length as an XmlString object. + * + * @return XmlString the menstrual cycle length as an XML string object + */ XmlString xgetMenCycle(); - + + /** + * Sets the length of the menstrual cycle. + * + * @param p0 String the menstrual cycle length in days + */ void setMenCycle(final String p0); - + + /** + * Sets the menstrual cycle length using an XmlString object. + * + * @param p0 XmlString the menstrual cycle length as an XML string object + */ void xsetMenCycle(final XmlString p0); - + + /** + * Gets whether the menstrual cycle is regular. + * Regular cycles are important for accurate EDB calculation using LMP. + * + * @return YesNoNullType whether the menstrual cycle is regular + */ YesNoNullType getMenCycleRegular(); - + + /** + * Sets whether the menstrual cycle is regular. + * + * @param p0 YesNoNullType the regularity status (yes, no, or null) + */ void setMenCycleRegular(final YesNoNullType p0); - + + /** + * Creates and adds a new MenCycleRegular element. + * + * @return YesNoNullType a new MenCycleRegular element instance + */ YesNoNullType addNewMenCycleRegular(); + /** + * Gets the type of contraceptive method last used before pregnancy. + * This information is relevant for pregnancy planning and risk assessment. + * + * @return String the contraceptive type (e.g., "OCP", "IUD", "Barrier", "None") + */ String getContraceptiveType(); - + + /** + * Gets the contraceptive type as an XmlString object. + * + * @return XmlString the contraceptive type as an XML string object + */ XmlString xgetContraceptiveType(); - + + /** + * Checks if the contraceptive type field has been set. + * + * @return boolean true if the contraceptive type is set, false otherwise + */ boolean isSetContraceptiveType(); - + + /** + * Sets the type of contraceptive method used. + * + * @param p0 String the contraceptive type + */ void setContraceptiveType(final String p0); - + + /** + * Sets the contraceptive type using an XmlString object. + * + * @param p0 XmlString the contraceptive type as an XML string object + */ void xsetContraceptiveType(final XmlString p0); - + + /** + * Removes the contraceptive type field, setting it to unset state. + */ void unsetContraceptiveType(); - + + /** + * Gets the date when contraceptive was last used. + * This helps determine if pregnancy was planned and affects early pregnancy dating. + * + * @return Calendar the date contraceptive was last used, or null if not set or nil + */ Calendar getContraceptiveLastUsed(); - + + /** + * Gets the contraceptive last used date as an XmlDate object. + * + * @return XmlDate the contraceptive last used date as an XML date object + */ XmlDate xgetContraceptiveLastUsed(); - + + /** + * Checks if the contraceptive last used field is explicitly set to nil. + * + * @return boolean true if the field is nil, false otherwise + */ boolean isNilContraceptiveLastUsed(); - + + /** + * Sets the date when contraceptive was last used. + * + * @param p0 Calendar the date contraceptive was last used + */ void setContraceptiveLastUsed(final Calendar p0); - + + /** + * Sets the contraceptive last used date using an XmlDate object. + * + * @param p0 XmlDate the date as an XML date object + */ void xsetContraceptiveLastUsed(final XmlDate p0); - + + /** + * Sets the contraceptive last used field to nil. + * Use this when the information is not available or not applicable. + */ void setNilContraceptiveLastUsed(); + /** + * Gets the Estimated Date of Birth (EDB) calculated from menstrual history. + * Typically calculated using Naegele's rule: LMP + 280 days (40 weeks). + * + * @return Calendar the menstrual-based estimated due date, or null if not set or nil + */ Calendar getMenstrualEDB(); - + + /** + * Gets the menstrual EDB as an XmlDate object. + * + * @return XmlDate the menstrual EDB as an XML date object + */ XmlDate xgetMenstrualEDB(); - + + /** + * Checks if the menstrual EDB field is explicitly set to nil. + * + * @return boolean true if the menstrual EDB is nil, false otherwise + */ boolean isNilMenstrualEDB(); - + + /** + * Sets the Estimated Date of Birth calculated from menstrual history. + * + * @param p0 Calendar the menstrual-based estimated due date + */ void setMenstrualEDB(final Calendar p0); - + + /** + * Sets the menstrual EDB using an XmlDate object. + * + * @param p0 XmlDate the menstrual EDB as an XML date object + */ void xsetMenstrualEDB(final XmlDate p0); - + + /** + * Sets the menstrual EDB field to nil. + * Use this when menstrual dating is not reliable or not possible. + */ void setNilMenstrualEDB(); - + + /** + * Gets the final Estimated Date of Birth (EDB) used for clinical care. + * This may be based on ultrasound, menstrual history, or other dating methods. + * The final EDB is the official due date used throughout the pregnancy. + * + * @return Calendar the final estimated due date + */ Calendar getFinalEDB(); - + + /** + * Gets the final EDB as an XmlDate object. + * + * @return XmlDate the final EDB as an XML date object + */ XmlDate xgetFinalEDB(); - + + /** + * Sets the final Estimated Date of Birth used for clinical care. + * + * @param p0 Calendar the final estimated due date + */ void setFinalEDB(final Calendar p0); - + + /** + * Sets the final EDB using an XmlDate object. + * + * @param p0 XmlDate the final EDB as an XML date object + */ void xsetFinalEDB(final XmlDate p0); - + + /** + * Gets the dating methods used to determine the final EDB. + * This includes methods such as ultrasound measurements, LMP calculation, etc. + * + * @return DatingMethods the dating methods object containing details of how EDB was determined + */ DatingMethods getDatingMethods(); - + + /** + * Sets the dating methods used to determine the final EDB. + * + * @param p0 DatingMethods the dating methods object + */ void setDatingMethods(final DatingMethods p0); - + + /** + * Creates and adds a new DatingMethods element. + * + * @return DatingMethods a new DatingMethods element instance + */ DatingMethods addNewDatingMethods(); + /** + * Gets the gravida value (total number of pregnancies including current). + * This is part of the GTPAL (Gravida, Term, Preterm, Abortions, Living) obstetric notation. + * + * @return int the total number of pregnancies + */ int getGravida(); - + + /** + * Gets the gravida value as an XmlInt object. + * + * @return XmlInt the gravida value as an XML integer object + */ XmlInt xgetGravida(); - + + /** + * Sets the gravida value (total number of pregnancies). + * + * @param p0 int the total number of pregnancies including current + */ void setGravida(final int p0); - + + /** + * Sets the gravida value using an XmlInt object. + * + * @param p0 XmlInt the gravida value as an XML integer object + */ void xsetGravida(final XmlInt p0); - + + /** + * Gets the number of term deliveries (pregnancies delivered at 37+ weeks). + * This is the "T" in GTPAL notation. + * + * @return int the number of term deliveries + */ int getTerm(); - + + /** + * Gets the term delivery count as an XmlInt object. + * + * @return XmlInt the term delivery count as an XML integer object + */ XmlInt xgetTerm(); - + + /** + * Sets the number of term deliveries. + * + * @param p0 int the number of pregnancies delivered at term (37+ weeks) + */ void setTerm(final int p0); - + + /** + * Sets the term delivery count using an XmlInt object. + * + * @param p0 XmlInt the term delivery count as an XML integer object + */ void xsetTerm(final XmlInt p0); - + + /** + * Gets the number of premature/preterm deliveries (delivered before 37 weeks). + * This is the "P" in GTPAL notation. + * + * @return int the number of premature deliveries + */ int getPremature(); - + + /** + * Gets the premature delivery count as an XmlInt object. + * + * @return XmlInt the premature delivery count as an XML integer object + */ XmlInt xgetPremature(); - + + /** + * Sets the number of premature/preterm deliveries. + * + * @param p0 int the number of pregnancies delivered before 37 weeks + */ void setPremature(final int p0); - + + /** + * Sets the premature delivery count using an XmlInt object. + * + * @param p0 XmlInt the premature delivery count as an XML integer object + */ void xsetPremature(final XmlInt p0); - + + /** + * Gets the number of abortions (spontaneous or induced pregnancy losses before 20 weeks). + * This is the "A" in GTPAL notation. + * + * @return int the number of abortions + */ int getAbortuses(); - + + /** + * Gets the abortion count as an XmlInt object. + * + * @return XmlInt the abortion count as an XML integer object + */ XmlInt xgetAbortuses(); - + + /** + * Sets the number of abortions (pregnancy losses before 20 weeks). + * + * @param p0 int the number of spontaneous or induced abortions + */ void setAbortuses(final int p0); - + + /** + * Sets the abortion count using an XmlInt object. + * + * @param p0 XmlInt the abortion count as an XML integer object + */ void xsetAbortuses(final XmlInt p0); - + + /** + * Gets the number of living children. + * This is the "L" in GTPAL notation and may differ from total births due to neonatal deaths. + * + * @return int the number of living children + */ int getLiving(); - + + /** + * Gets the living children count as an XmlInt object. + * + * @return XmlInt the living children count as an XML integer object + */ XmlInt xgetLiving(); - + + /** + * Sets the number of living children. + * + * @param p0 int the number of living children + */ void setLiving(final int p0); - + + /** + * Sets the living children count using an XmlInt object. + * + * @param p0 XmlInt the living children count as an XML integer object + */ void xsetLiving(final XmlInt p0); + /** + * Factory class for creating and parsing PregnancyHistory instances. + * This class provides static factory methods for creating new instances and + * parsing XML data from various sources into PregnancyHistory objects. + * + * @since 2026-01-23 + */ public static final class Factory { + /** + * Creates a new empty PregnancyHistory instance. + * + * @return PregnancyHistory a new empty instance + */ public static PregnancyHistory newInstance() { return (PregnancyHistory)XmlBeans.getContextTypeLoader().newInstance(PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Creates a new empty PregnancyHistory instance with specified XML options. + * + * @param options XmlOptions the XML options to use during creation + * @return PregnancyHistory a new empty instance + */ public static PregnancyHistory newInstance(final XmlOptions options) { return (PregnancyHistory)XmlBeans.getContextTypeLoader().newInstance(PregnancyHistory.type, options); } - + + /** + * Parses an XML string into a PregnancyHistory instance. + * + * @param xmlAsString String the XML content as a string + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PregnancyHistory parse(final String xmlAsString) throws XmlException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(xmlAsString, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses an XML string into a PregnancyHistory instance with specified options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PregnancyHistory parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(xmlAsString, PregnancyHistory.type, options); } - + + /** + * Parses an XML file into a PregnancyHistory instance. + * + * @param file File the XML file to parse + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading the file + */ public static PregnancyHistory parse(final File file) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(file, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses an XML file into a PregnancyHistory instance with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading the file + */ public static PregnancyHistory parse(final File file, final XmlOptions options) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(file, PregnancyHistory.type, options); } - + + /** + * Parses XML from a URL into a PregnancyHistory instance. + * + * @param u URL the URL pointing to the XML content + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the URL + */ public static PregnancyHistory parse(final URL u) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(u, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL into a PregnancyHistory instance with specified options. + * + * @param u URL the URL pointing to the XML content + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the URL + */ public static PregnancyHistory parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(u, PregnancyHistory.type, options); } - + + /** + * Parses XML from an input stream into a PregnancyHistory instance. + * + * @param is InputStream the input stream containing XML data + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the stream + */ public static PregnancyHistory parse(final InputStream is) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(is, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses XML from an input stream into a PregnancyHistory instance with specified options. + * + * @param is InputStream the input stream containing XML data + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the stream + */ public static PregnancyHistory parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(is, PregnancyHistory.type, options); } - + + /** + * Parses XML from a reader into a PregnancyHistory instance. + * + * @param r Reader the reader containing XML data + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the reader + */ public static PregnancyHistory parse(final Reader r) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(r, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses XML from a reader into a PregnancyHistory instance with specified options. + * + * @param r Reader the reader containing XML data + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws IOException if there is an error reading from the reader + */ public static PregnancyHistory parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(r, PregnancyHistory.type, options); } - + + /** + * Parses XML from an XML stream reader into a PregnancyHistory instance. + * + * @param sr XMLStreamReader the XML stream reader + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PregnancyHistory parse(final XMLStreamReader sr) throws XmlException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(sr, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses XML from an XML stream reader into a PregnancyHistory instance with specified options. + * + * @param sr XMLStreamReader the XML stream reader + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PregnancyHistory parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(sr, PregnancyHistory.type, options); } - + + /** + * Parses XML from a DOM node into a PregnancyHistory instance. + * + * @param node Node the DOM node containing XML data + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PregnancyHistory parse(final Node node) throws XmlException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(node, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM node into a PregnancyHistory instance with specified options. + * + * @param node Node the DOM node containing XML data + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + */ public static PregnancyHistory parse(final Node node, final XmlOptions options) throws XmlException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(node, PregnancyHistory.type, options); } - + + /** + * Parses XML from an XMLInputStream into a PregnancyHistory instance. + * + * @param xis XMLInputStream the XML input stream + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans + */ @Deprecated public static PregnancyHistory parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(xis, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLInputStream into a PregnancyHistory instance with specified options. + * + * @param xis XMLInputStream the XML input stream + * @param options XmlOptions the XML options to use during parsing + * @return PregnancyHistory the parsed pregnancy history object + * @throws XmlException if the XML is invalid or cannot be parsed + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans + */ @Deprecated public static PregnancyHistory parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (PregnancyHistory)XmlBeans.getContextTypeLoader().parse(xis, PregnancyHistory.type, options); } - + + /** + * Creates a new validating XMLInputStream for PregnancyHistory. + * + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream a validating XML input stream + * @throws XmlException if there is an error creating the validating stream + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PregnancyHistory.type, (XmlOptions)null); } - + + /** + * Creates a new validating XMLInputStream for PregnancyHistory with specified options. + * + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions the XML options to use during validation + * @return XMLInputStream a validating XML input stream + * @throws XmlException if there is an error creating the validating stream + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PregnancyHistory.type, options); } - + + /** + * Private constructor to prevent instantiation. + * This class only provides static factory methods. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/PrenatalGeneticScreeningType.java b/src/main/java/ca/openosp/openo/ar2005/PrenatalGeneticScreeningType.java index c4d9c6ab762..0129aabdb56 100644 --- a/src/main/java/ca/openosp/openo/ar2005/PrenatalGeneticScreeningType.java +++ b/src/main/java/ca/openosp/openo/ar2005/PrenatalGeneticScreeningType.java @@ -17,134 +17,584 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents prenatal genetic screening information for the British Columbia Antenatal Record (BCAR) 2005 form. + *

    + * This interface provides access to prenatal genetic screening test results and patient consent information + * collected during pregnancy care. It includes data for various screening tests used to assess risk of + * chromosomal abnormalities and neural tube defects in the developing fetus. + *

    + *

    + * Screening tests tracked include: + *

      + *
    • MS/SIPS/FTS - Maternal Serum/Integrated Prenatal Screening/First Trimester Screening
    • + *
    • EDB CVS - Estimated Due By Chorionic Villus Sampling
    • + *
    • MSAFP - Maternal Serum Alpha-Fetoprotein (for neural tube defects)
    • + *
    • Custom laboratory tests
    • + *
    + *

    + *

    + * This interface is part of the AR2005 package which implements data structures for the British Columbia + * Antenatal Record form used in prenatal care documentation. It follows the XMLBeans framework for + * XML data binding and serialization. + *

    + * + * @see CustomLab + * @see CurrentPregnancyType + * @see InitialLaboratoryInvestigations + * @see ARRecord + * @since 2026-01-24 + */ public interface PrenatalGeneticScreeningType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PrenatalGeneticScreeningType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("prenatalgeneticscreeningtype87f7type"); - + + /** + * Gets the MS/SIPS/FTS (Maternal Serum/Integrated Prenatal Screening/First Trimester Screening) test result. + *

    + * This field stores results from prenatal screening tests used to assess the risk of chromosomal + * abnormalities such as Down syndrome (Trisomy 21) and Edwards syndrome (Trisomy 18). + *

    + * + * @return String the MS/SIPS/FTS test result value + */ String getMSSIPSFTS(); - + + /** + * Gets the MS/SIPS/FTS test result as an XmlString object. + *

    + * This method provides access to the underlying XMLBeans string object, allowing for + * validation and XML-specific operations. + *

    + * + * @return XmlString the MS/SIPS/FTS test result as an XMLBeans string object + */ XmlString xgetMSSIPSFTS(); - + + /** + * Sets the MS/SIPS/FTS (Maternal Serum/Integrated Prenatal Screening/First Trimester Screening) test result. + *

    + * This method updates the prenatal screening test result value. The value should represent + * the screening outcome or risk assessment. + *

    + * + * @param p0 String the MS/SIPS/FTS test result value to set + */ void setMSSIPSFTS(final String p0); - + + /** + * Sets the MS/SIPS/FTS test result using an XmlString object. + *

    + * This method allows setting the value using an XMLBeans string object for XML-specific operations. + *

    + * + * @param p0 XmlString the MS/SIPS/FTS test result as an XMLBeans string object + */ void xsetMSSIPSFTS(final XmlString p0); - + + /** + * Gets the EDB CVS (Estimated Due By Chorionic Villus Sampling) date or result. + *

    + * Chorionic villus sampling is a prenatal diagnostic procedure performed between 10-13 weeks + * of pregnancy to detect chromosomal abnormalities and genetic disorders by sampling placental tissue. + * This field may contain the estimated due date based on CVS results or related diagnostic information. + *

    + * + * @return String the EDB CVS value + */ String getEDBCVS(); - + + /** + * Gets the EDB CVS value as an XmlString object. + *

    + * This method provides access to the underlying XMLBeans string object for XML-specific operations. + *

    + * + * @return XmlString the EDB CVS value as an XMLBeans string object + */ XmlString xgetEDBCVS(); - + + /** + * Sets the EDB CVS (Estimated Due By Chorionic Villus Sampling) date or result. + *

    + * This method updates the CVS-related information, which may include the estimated due date + * or diagnostic findings from chorionic villus sampling. + *

    + * + * @param p0 String the EDB CVS value to set + */ void setEDBCVS(final String p0); - + + /** + * Sets the EDB CVS value using an XmlString object. + *

    + * This method allows setting the value using an XMLBeans string object for XML-specific operations. + *

    + * + * @param p0 XmlString the EDB CVS value as an XMLBeans string object + */ void xsetEDBCVS(final XmlString p0); - + + /** + * Gets the MSAFP (Maternal Serum Alpha-Fetoprotein) test result. + *

    + * The MSAFP test is a prenatal screening blood test that measures the level of alpha-fetoprotein + * in the mother's blood. It is used to screen for neural tube defects (such as spina bifida), + * abdominal wall defects, and chromosomal abnormalities. This test is typically performed + * between 15-20 weeks of pregnancy. + *

    + * + * @return String the MSAFP test result value + */ String getMSAFP(); - + + /** + * Gets the MSAFP test result as an XmlString object. + *

    + * This method provides access to the underlying XMLBeans string object for XML-specific operations. + *

    + * + * @return XmlString the MSAFP test result as an XMLBeans string object + */ XmlString xgetMSAFP(); - + + /** + * Sets the MSAFP (Maternal Serum Alpha-Fetoprotein) test result. + *

    + * This method updates the MSAFP test result value, which should represent the screening + * outcome or measured AFP level. + *

    + * + * @param p0 String the MSAFP test result value to set + */ void setMSAFP(final String p0); - + + /** + * Sets the MSAFP test result using an XmlString object. + *

    + * This method allows setting the value using an XMLBeans string object for XML-specific operations. + *

    + * + * @param p0 XmlString the MSAFP test result as an XMLBeans string object + */ void xsetMSAFP(final XmlString p0); - + + /** + * Gets the first custom laboratory test entry. + *

    + * This method retrieves a custom laboratory test result that is not part of the standard + * prenatal genetic screening panel. Custom labs allow for documenting additional screening + * or diagnostic tests ordered by the healthcare provider. + *

    + * + * @return CustomLab the first custom laboratory test entry + */ CustomLab getCustomLab1(); - + + /** + * Sets the first custom laboratory test entry. + *

    + * This method updates the custom laboratory test information with a new or modified entry. + *

    + * + * @param p0 CustomLab the custom laboratory test entry to set + */ void setCustomLab1(final CustomLab p0); - + + /** + * Creates and adds a new first custom laboratory test entry. + *

    + * This method instantiates a new CustomLab object, adds it to the screening record, + * and returns it for further configuration. This is useful for building the XML structure + * programmatically. + *

    + * + * @return CustomLab a newly created custom laboratory test entry + */ CustomLab addNewCustomLab1(); - + + /** + * Gets the declined status indicating whether the patient declined genetic screening. + *

    + * This field documents patient consent decisions regarding prenatal genetic screening. + * When true, it indicates the patient has declined one or more genetic screening tests + * after being offered and counseled about the options. This is an important part of + * informed consent documentation in prenatal care. + *

    + * + * @return boolean true if genetic screening was declined by the patient, false otherwise + */ boolean getDeclined(); - + + /** + * Gets the declined status as an XmlBoolean object. + *

    + * This method provides access to the underlying XMLBeans boolean object for XML-specific operations. + *

    + * + * @return XmlBoolean the declined status as an XMLBeans boolean object + */ XmlBoolean xgetDeclined(); - + + /** + * Sets the declined status indicating whether the patient declined genetic screening. + *

    + * This method updates the patient's consent decision regarding prenatal genetic screening. + * Setting this to true documents that the patient has declined testing after appropriate + * counseling. + *

    + * + * @param p0 boolean true to indicate screening was declined, false otherwise + */ void setDeclined(final boolean p0); - + + /** + * Sets the declined status using an XmlBoolean object. + *

    + * This method allows setting the value using an XMLBeans boolean object for XML-specific operations. + *

    + * + * @param p0 XmlBoolean the declined status as an XMLBeans boolean object + */ void xsetDeclined(final XmlBoolean p0); - + + /** + * Factory class for creating and parsing PrenatalGeneticScreeningType instances. + *

    + * This inner class provides static factory methods following the XMLBeans pattern for + * creating new instances and parsing XML data into PrenatalGeneticScreeningType objects. + * It supports parsing from various sources including strings, files, URLs, streams, and DOM nodes. + *

    + */ public static final class Factory { + /** + * Creates a new empty PrenatalGeneticScreeningType instance with default options. + *

    + * This method instantiates a new object that can be populated with prenatal genetic + * screening data programmatically. + *

    + * + * @return PrenatalGeneticScreeningType a new empty instance + */ public static PrenatalGeneticScreeningType newInstance() { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().newInstance(PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Creates a new empty PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control parsing behavior, validation, + * and other XML processing settings. + *

    + * + * @param options XmlOptions the XML processing options to use + * @return PrenatalGeneticScreeningType a new empty instance configured with the specified options + */ public static PrenatalGeneticScreeningType newInstance(final XmlOptions options) { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().newInstance(PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses an XML string into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method deserializes XML content from a string representation into a strongly-typed + * PrenatalGeneticScreeningType object. + *

    + * + * @param xmlAsString String the XML content to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + */ public static PrenatalGeneticScreeningType parse(final String xmlAsString) throws XmlException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(xmlAsString, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses an XML string into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors. + *

    + * + * @param xmlAsString String the XML content to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + */ public static PrenatalGeneticScreeningType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(xmlAsString, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses an XML file into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method reads and deserializes XML content from a file into a strongly-typed object. + *

    + * + * @param file File the XML file to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading the file + */ public static PrenatalGeneticScreeningType parse(final File file) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(file, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses an XML file into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from a file. + *

    + * + * @param file File the XML file to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading the file + */ public static PrenatalGeneticScreeningType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(file, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses XML content from a URL into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method retrieves and deserializes XML content from a URL resource into a strongly-typed object. + *

    + * + * @param u URL the URL pointing to the XML content to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading from the URL + */ public static PrenatalGeneticScreeningType parse(final URL u) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(u, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses XML content from a URL into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from a URL. + *

    + * + * @param u URL the URL pointing to the XML content to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading from the URL + */ public static PrenatalGeneticScreeningType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(u, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses XML content from an InputStream into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method deserializes XML content from an input stream into a strongly-typed object. + *

    + * + * @param is InputStream the input stream containing XML content to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading from the stream + */ public static PrenatalGeneticScreeningType parse(final InputStream is) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(is, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses XML content from an InputStream into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from an input stream. + *

    + * + * @param is InputStream the input stream containing XML content to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading from the stream + */ public static PrenatalGeneticScreeningType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(is, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses XML content from a Reader into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method deserializes XML content from a character stream reader into a strongly-typed object. + *

    + * + * @param r Reader the reader containing XML content to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading from the reader + */ public static PrenatalGeneticScreeningType parse(final Reader r) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(r, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses XML content from a Reader into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from a character stream reader. + *

    + * + * @param r Reader the reader containing XML content to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws IOException if an I/O error occurs while reading from the reader + */ public static PrenatalGeneticScreeningType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(r, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses XML content from an XMLStreamReader into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method deserializes XML content from a StAX stream reader into a strongly-typed object, + * providing efficient streaming access to XML data. + *

    + * + * @param sr XMLStreamReader the XML stream reader positioned at the element to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + */ public static PrenatalGeneticScreeningType parse(final XMLStreamReader sr) throws XmlException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(sr, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses XML content from an XMLStreamReader into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from a StAX stream reader. + *

    + * + * @param sr XMLStreamReader the XML stream reader positioned at the element to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + */ public static PrenatalGeneticScreeningType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(sr, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses XML content from a DOM Node into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method deserializes XML content from a DOM (Document Object Model) node into a + * strongly-typed object, enabling integration with DOM-based XML processing. + *

    + * + * @param node Node the DOM node containing the XML element to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + */ public static PrenatalGeneticScreeningType parse(final Node node) throws XmlException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(node, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses XML content from a DOM Node into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from a DOM node. + *

    + * + * @param node Node the DOM node containing the XML element to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + */ public static PrenatalGeneticScreeningType parse(final Node node, final XmlOptions options) throws XmlException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(node, PrenatalGeneticScreeningType.type, options); } - + + /** + * Parses XML content from an XMLInputStream into a PrenatalGeneticScreeningType instance with default options. + *

    + * This method deserializes XML content from an XMLBeans-specific input stream. + *

    + * + * @param xis XMLInputStream the XML input stream to parse + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative parsing methods + */ @Deprecated public static PrenatalGeneticScreeningType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(xis, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Parses XML content from an XMLInputStream into a PrenatalGeneticScreeningType instance with custom XML options. + *

    + * This method allows specifying XMLBeans options to control validation, error handling, + * and other parsing behaviors when reading from an XMLBeans-specific input stream. + *

    + * + * @param xis XMLInputStream the XML input stream to parse + * @param options XmlOptions the XML processing options to use during parsing + * @return PrenatalGeneticScreeningType the parsed instance + * @throws XmlException if the XML is malformed or does not match the expected schema + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative parsing methods + */ @Deprecated public static PrenatalGeneticScreeningType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (PrenatalGeneticScreeningType)XmlBeans.getContextTypeLoader().parse(xis, PrenatalGeneticScreeningType.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper with default options. + *

    + * This method wraps an XMLInputStream with schema validation capabilities to ensure + * the XML content conforms to the PrenatalGeneticScreeningType schema. + *

    + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @return XMLInputStream a validating XML input stream + * @throws XmlException if validation setup fails or the XML is invalid + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative parsing methods with validation options + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PrenatalGeneticScreeningType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper with custom XML options. + *

    + * This method wraps an XMLInputStream with schema validation capabilities, allowing custom + * validation and error handling options to be specified. + *

    + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @param options XmlOptions the XML processing options to control validation behavior + * @return XMLInputStream a validating XML input stream + * @throws XmlException if validation setup fails or the XML is invalid + * @throws XMLStreamException if an error occurs during XML stream processing + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative parsing methods with validation options + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PrenatalGeneticScreeningType.type, options); } - + + /** + * Private constructor to prevent instantiation of the Factory class. + *

    + * This class provides only static methods and should not be instantiated. + *

    + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/PsychosocialType.java b/src/main/java/ca/openosp/openo/ar2005/PsychosocialType.java index 898d15cf67d..7165f348a81 100644 --- a/src/main/java/ca/openosp/openo/ar2005/PsychosocialType.java +++ b/src/main/java/ca/openosp/openo/ar2005/PsychosocialType.java @@ -15,138 +15,506 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XML type interface for psychosocial assessment data in antenatal care. + * + *

    This interface represents psychosocial risk factors and concerns assessed during + * pregnancy care as part of the British Columbia Antenatal Record (BCAR) form system. + * It captures critical social determinants of health that may impact maternal and fetal + * outcomes, including social support, mental health, substance use, and family dynamics.

    + * + *

    Psychosocial assessments are essential components of comprehensive prenatal care, + * helping healthcare providers identify patients who may benefit from additional support + * services, mental health interventions, or social work consultations during pregnancy + * and postpartum periods.

    + * + *

    This interface is part of the AR2005 (Antenatal Record 2005) package and follows + * the Apache XMLBeans framework for XML data binding. It provides getter, setter, and + * factory methods for managing psychosocial assessment data in a type-safe manner.

    + * + * @see YesNoNullType + * @see org.apache.xmlbeans.XmlObject + * @since 2026-01-18 + */ public interface PsychosocialType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(PsychosocialType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("psychosocialtype93f2type"); - + + /** + * Gets the poor social support indicator value. + * + *

    Assesses whether the patient has inadequate social support networks during pregnancy. + * Poor social support is a significant risk factor for maternal depression, anxiety, and + * adverse pregnancy outcomes. This assessment helps identify patients who may benefit from + * community resources, support groups, or social work interventions.

    + * + * @return YesNoNullType the poor social support indicator, or null if not set + */ YesNoNullType getPoortSocialSupport(); - + + /** + * Sets the poor social support indicator value. + * + * @param p0 YesNoNullType the poor social support indicator to set + */ void setPoortSocialSupport(final YesNoNullType p0); - + + /** + * Creates and adds a new poor social support indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * poor social support value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created poor social support indicator + */ YesNoNullType addNewPoortSocialSupport(); + /** + * Gets the relationship problems indicator value. + * + *

    Assesses whether the patient is experiencing relationship difficulties with their partner + * or other significant relationships. Relationship problems during pregnancy can contribute to + * maternal stress, mental health issues, and may impact prenatal care adherence and birth outcomes. + * This assessment helps identify patients who may benefit from couples counseling or family therapy.

    + * + * @return YesNoNullType the relationship problems indicator, or null if not set + */ YesNoNullType getRelationshipProblems(); - + + /** + * Sets the relationship problems indicator value. + * + * @param p0 YesNoNullType the relationship problems indicator to set + */ void setRelationshipProblems(final YesNoNullType p0); - + + /** + * Creates and adds a new relationship problems indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * relationship problems value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created relationship problems indicator + */ YesNoNullType addNewRelationshipProblems(); + /** + * Gets the emotional depression indicator value. + * + *

    Assesses whether the patient is experiencing symptoms of depression during pregnancy. + * Perinatal depression affects up to 20% of pregnant individuals and is associated with + * adverse maternal and fetal outcomes. Early identification enables timely interventions + * including counseling, therapy, or medication management when appropriate. This assessment + * is critical for maternal mental health screening and prevention of postpartum depression.

    + * + * @return YesNoNullType the emotional depression indicator, or null if not set + */ YesNoNullType getEmotionalDepression(); - + + /** + * Sets the emotional depression indicator value. + * + * @param p0 YesNoNullType the emotional depression indicator to set + */ void setEmotionalDepression(final YesNoNullType p0); - + + /** + * Creates and adds a new emotional depression indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * emotional depression value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created emotional depression indicator + */ YesNoNullType addNewEmotionalDepression(); + /** + * Gets the substance abuse indicator value. + * + *

    Assesses whether the patient has current or recent substance use concerns during pregnancy, + * including alcohol, tobacco, recreational drugs, or misuse of prescription medications. Substance + * use during pregnancy poses significant risks to fetal development and maternal health. Identification + * enables appropriate intervention, referral to addiction services, and enhanced monitoring throughout + * pregnancy. This assessment is conducted in a non-judgmental manner to facilitate honest disclosure + * and appropriate support.

    + * + * @return YesNoNullType the substance abuse indicator, or null if not set + */ YesNoNullType getSubstanceAbuse(); - + + /** + * Sets the substance abuse indicator value. + * + * @param p0 YesNoNullType the substance abuse indicator to set + */ void setSubstanceAbuse(final YesNoNullType p0); - + + /** + * Creates and adds a new substance abuse indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * substance abuse value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created substance abuse indicator + */ YesNoNullType addNewSubstanceAbuse(); + /** + * Gets the family violence indicator value. + * + *

    Assesses whether the patient is experiencing domestic violence, intimate partner violence, + * or other forms of family violence. Pregnancy is a time of increased risk for domestic violence, + * which poses serious threats to both maternal and fetal health. Routine screening enables early + * identification, safety planning, and referral to specialized domestic violence services, counseling, + * and legal resources. This sensitive assessment is conducted privately and confidentially to ensure + * patient safety.

    + * + * @return YesNoNullType the family violence indicator, or null if not set + */ YesNoNullType getFamilyViolence(); - + + /** + * Sets the family violence indicator value. + * + * @param p0 YesNoNullType the family violence indicator to set + */ void setFamilyViolence(final YesNoNullType p0); - + + /** + * Creates and adds a new family violence indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * family violence value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created family violence indicator + */ YesNoNullType addNewFamilyViolence(); + /** + * Gets the parenting concerns indicator value. + * + *

    Assesses whether the patient has concerns, anxiety, or uncertainty about their ability to + * parent or care for the newborn. This may include worries about parenting skills, financial + * resources, childcare arrangements, or management of other children in the household. Identifying + * parenting concerns allows healthcare providers to offer prenatal education, parenting classes, + * community resources, and psychosocial support to build parental confidence and competence.

    + * + * @return YesNoNullType the parenting concerns indicator, or null if not set + */ YesNoNullType getParentingConcerns(); - + + /** + * Sets the parenting concerns indicator value. + * + * @param p0 YesNoNullType the parenting concerns indicator to set + */ void setParentingConcerns(final YesNoNullType p0); - + + /** + * Creates and adds a new parenting concerns indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * parenting concerns value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created parenting concerns indicator + */ YesNoNullType addNewParentingConcerns(); + /** + * Gets the religious/cultural concerns indicator value. + * + *

    Assesses whether the patient has religious or cultural considerations that may impact + * their pregnancy care, birth planning, or postpartum care. This may include dietary restrictions, + * modesty requirements, preferences for same-gender providers, ritual practices, or traditional + * beliefs about pregnancy and childbirth. Identifying these concerns enables culturally competent, + * patient-centered care that respects individual values and beliefs while ensuring safe medical + * management.

    + * + * @return YesNoNullType the religious/cultural concerns indicator, or null if not set + */ YesNoNullType getReligiousCultural(); - + + /** + * Sets the religious/cultural concerns indicator value. + * + * @param p0 YesNoNullType the religious/cultural concerns indicator to set + */ void setReligiousCultural(final YesNoNullType p0); - + + /** + * Creates and adds a new religious/cultural concerns indicator. + * + *

    This factory method creates a new YesNoNullType instance and sets it as the + * religious/cultural concerns value for this psychosocial assessment.

    + * + * @return YesNoNullType the newly created religious/cultural concerns indicator + */ YesNoNullType addNewReligiousCultural(); - + + /** + * Factory class for creating and parsing PsychosocialType instances. + * + *

    This nested factory class provides static methods for instantiating PsychosocialType + * objects and parsing XML content into PsychosocialType instances. It follows the Apache + * XMLBeans factory pattern for type-safe XML data binding.

    + * + *

    The factory supports multiple input sources including strings, files, URLs, streams, + * readers, DOM nodes, and XML stream readers. Some methods are deprecated in favor of + * newer XML processing approaches.

    + */ public static final class Factory { + /** + * Creates a new empty PsychosocialType instance. + * + * @return PsychosocialType a new instance with default XML options + */ public static PsychosocialType newInstance() { return (PsychosocialType)XmlBeans.getContextTypeLoader().newInstance(PsychosocialType.type, (XmlOptions)null); } - + + /** + * Creates a new empty PsychosocialType instance with custom XML options. + * + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType a new instance with the specified options + */ public static PsychosocialType newInstance(final XmlOptions options) { return (PsychosocialType)XmlBeans.getContextTypeLoader().newInstance(PsychosocialType.type, options); } + /** + * Parses an XML string into a PsychosocialType instance. + * + * @param xmlAsString String the XML content to parse + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + */ public static PsychosocialType parse(final String xmlAsString) throws XmlException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(xmlAsString, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses an XML string into a PsychosocialType instance with custom options. + * + * @param xmlAsString String the XML content to parse + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + */ public static PsychosocialType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(xmlAsString, PsychosocialType.type, options); } - + + /** + * Parses an XML file into a PsychosocialType instance. + * + * @param file File the XML file to parse + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the file cannot be read + */ public static PsychosocialType parse(final File file) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(file, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses an XML file into a PsychosocialType instance with custom options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the file cannot be read + */ public static PsychosocialType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(file, PsychosocialType.type, options); } - + + /** + * Parses XML from a URL into a PsychosocialType instance. + * + * @param u URL the URL pointing to the XML content + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the URL content cannot be retrieved + */ public static PsychosocialType parse(final URL u) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(u, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL into a PsychosocialType instance with custom options. + * + * @param u URL the URL pointing to the XML content + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the URL content cannot be retrieved + */ public static PsychosocialType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(u, PsychosocialType.type, options); } + /** + * Parses XML from an input stream into a PsychosocialType instance. + * + * @param is InputStream the input stream containing XML content + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the stream cannot be read + */ public static PsychosocialType parse(final InputStream is) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(is, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses XML from an input stream into a PsychosocialType instance with custom options. + * + * @param is InputStream the input stream containing XML content + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the stream cannot be read + */ public static PsychosocialType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(is, PsychosocialType.type, options); } - + + /** + * Parses XML from a character reader into a PsychosocialType instance. + * + * @param r Reader the reader containing XML content + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the reader cannot be read + */ public static PsychosocialType parse(final Reader r) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(r, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses XML from a character reader into a PsychosocialType instance with custom options. + * + * @param r Reader the reader containing XML content + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws IOException if the reader cannot be read + */ public static PsychosocialType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(r, PsychosocialType.type, options); } - + + /** + * Parses XML from an XML stream reader into a PsychosocialType instance. + * + * @param sr XMLStreamReader the stream reader positioned at the start of the XML content + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + */ public static PsychosocialType parse(final XMLStreamReader sr) throws XmlException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(sr, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XML stream reader into a PsychosocialType instance with custom options. + * + * @param sr XMLStreamReader the stream reader positioned at the start of the XML content + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + */ public static PsychosocialType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(sr, PsychosocialType.type, options); } - + + /** + * Parses XML from a DOM node into a PsychosocialType instance. + * + * @param node Node the DOM node containing the XML content + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + */ public static PsychosocialType parse(final Node node) throws XmlException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(node, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM node into a PsychosocialType instance with custom options. + * + * @param node Node the DOM node containing the XML content + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + */ public static PsychosocialType parse(final Node node, final XmlOptions options) throws XmlException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(node, PsychosocialType.type, options); } + /** + * Parses XML from a legacy XMLInputStream into a PsychosocialType instance. + * + * @param xis XMLInputStream the XML input stream (deprecated API) + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws XMLStreamException if there is an error processing the XML stream + * @deprecated Use {@link #parse(InputStream)} or {@link #parse(XMLStreamReader)} instead + */ @Deprecated public static PsychosocialType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(xis, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Parses XML from a legacy XMLInputStream into a PsychosocialType instance with custom options. + * + * @param xis XMLInputStream the XML input stream (deprecated API) + * @param options XmlOptions the XML parsing and validation options to apply + * @return PsychosocialType the parsed instance + * @throws XmlException if the XML is malformed or doesn't match the schema + * @throws XMLStreamException if there is an error processing the XML stream + * @deprecated Use {@link #parse(InputStream, XmlOptions)} or {@link #parse(XMLStreamReader, XmlOptions)} instead + */ @Deprecated public static PsychosocialType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (PsychosocialType)XmlBeans.getContextTypeLoader().parse(xis, PsychosocialType.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper for schema validation. + * + * @param xis XMLInputStream the XML input stream to wrap with validation (deprecated API) + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if there is an error setting up validation + * @throws XMLStreamException if there is an error processing the XML stream + * @deprecated Use modern StAX-based validation approaches instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PsychosocialType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper for schema validation with custom options. + * + * @param xis XMLInputStream the XML input stream to wrap with validation (deprecated API) + * @param options XmlOptions the XML parsing and validation options to apply + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if there is an error setting up validation + * @throws XMLStreamException if there is an error processing the XML stream + * @deprecated Use modern StAX-based validation approaches instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, PsychosocialType.type, options); } - + + /** + * Private constructor to prevent instantiation of the factory class. + * + *

    All factory methods are static and should be accessed directly through the Factory class.

    + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/RecommendedImmunoprophylaxisType.java b/src/main/java/ca/openosp/openo/ar2005/RecommendedImmunoprophylaxisType.java index af0bd12f311..a1728c2fe21 100644 --- a/src/main/java/ca/openosp/openo/ar2005/RecommendedImmunoprophylaxisType.java +++ b/src/main/java/ca/openosp/openo/ar2005/RecommendedImmunoprophylaxisType.java @@ -18,140 +18,493 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XML Type interface for recommended immunoprophylaxis data in antenatal records. + * + *

    This interface represents the recommended immunoprophylaxis section of the + * AR2005 (Antenatal Record 2005) form used in Canadian healthcare. It manages + * critical maternal immunization and prophylaxis data including:

    + *
      + *
    • Rh-negative status and Rh immunoglobulin administration
    • + *
    • Rubella vaccination status
    • + *
    • Newborn Hepatitis B immunoglobulin requirements
    • + *
    • Hepatitis B vaccine recommendations
    • + *
    + * + *

    This is an Apache XMLBeans-generated interface that provides type-safe access + * to XML data conforming to the AR2005 schema. It includes both standard getters/setters + * and XMLBeans-specific methods (prefixed with 'x') for direct XML manipulation.

    + * + *

    Healthcare Context: Immunoprophylaxis during pregnancy is critical + * for preventing maternal-fetal disease transmission. This data tracks recommended + * interventions based on maternal serology and risk factors, ensuring appropriate + * prophylaxis for conditions like Rh incompatibility and Hepatitis B.

    + * + * @since 2026-01-24 + * @see org.apache.xmlbeans.XmlObject + * @see ca.openosp.openo.ar2005 + */ public interface RecommendedImmunoprophylaxisType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(RecommendedImmunoprophylaxisType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("recommendedimmunoprophylaxistype0e82type"); - + + /** + * Gets the Rh-negative status of the patient. + * + *

    Rh-negative status is critical for pregnancy management. Rh-negative mothers + * carrying Rh-positive fetuses require Rh immunoglobulin prophylaxis to prevent + * hemolytic disease of the newborn in subsequent pregnancies.

    + * + * @return boolean true if the patient is Rh-negative, false otherwise + */ boolean getRhNegative(); - + + /** + * Gets the Rh-negative status as an XMLBeans XmlBoolean object. + * + *

    This method provides direct access to the underlying XML representation + * of the Rh-negative status, allowing for XML-specific operations such as + * validation and schema compliance checking.

    + * + * @return XmlBoolean the Rh-negative status as an XML boolean type + */ XmlBoolean xgetRhNegative(); - + + /** + * Sets the Rh-negative status of the patient. + * + * @param p0 boolean true if the patient is Rh-negative, false otherwise + */ void setRhNegative(final boolean p0); - + + /** + * Sets the Rh-negative status using an XMLBeans XmlBoolean object. + * + *

    This method allows direct XML manipulation of the Rh-negative status field, + * useful when working with XML documents or performing schema validation.

    + * + * @param p0 XmlBoolean the Rh-negative status as an XML boolean type + */ void xsetRhNegative(final XmlBoolean p0); - + + /** + * Gets the date when Rh immunoglobulin (RhIg) was administered. + * + *

    RhIg is administered to Rh-negative mothers at approximately 28 weeks gestation + * and within 72 hours postpartum to prevent Rh sensitization. This field tracks + * when the prophylaxis was given.

    + * + * @return Calendar the date and time when RhIg was administered, or null if not yet given + */ Calendar getRhIgGiven(); - + + /** + * Gets the RhIg administration date as an XMLBeans XmlDate object. + * + * @return XmlDate the RhIg administration date as an XML date type + */ XmlDate xgetRhIgGiven(); - + + /** + * Checks if the RhIg administration date is nil (explicitly set to null in XML). + * + *

    This method distinguishes between a date that is unset versus a date that + * is explicitly marked as nil in the XML schema, which has different semantic + * meaning in healthcare data exchange.

    + * + * @return boolean true if the RhIg date is explicitly nil, false otherwise + */ boolean isNilRhIgGiven(); - + + /** + * Sets the date when Rh immunoglobulin was administered. + * + * @param p0 Calendar the date and time when RhIg was administered + */ void setRhIgGiven(final Calendar p0); - + + /** + * Sets the RhIg administration date using an XMLBeans XmlDate object. + * + * @param p0 XmlDate the RhIg administration date as an XML date type + */ void xsetRhIgGiven(final XmlDate p0); - + + /** + * Sets the RhIg administration date to nil (explicitly null in XML). + * + *

    This method explicitly marks the RhIg date as nil in the XML document, + * indicating that the value is intentionally absent or not applicable.

    + */ void setNilRhIgGiven(); - + + /** + * Gets the rubella vaccination recommendation status. + * + *

    Rubella (German measles) can cause severe congenital defects if contracted + * during pregnancy. Non-immune mothers are recommended to receive the MMR vaccine + * postpartum to protect future pregnancies.

    + * + * @return boolean true if rubella vaccination is recommended, false otherwise + */ boolean getRubella(); - + + /** + * Gets the rubella vaccination status as an XMLBeans XmlBoolean object. + * + * @return XmlBoolean the rubella vaccination recommendation as an XML boolean type + */ XmlBoolean xgetRubella(); - + + /** + * Sets the rubella vaccination recommendation status. + * + * @param p0 boolean true if rubella vaccination is recommended, false otherwise + */ void setRubella(final boolean p0); - + + /** + * Sets the rubella vaccination status using an XMLBeans XmlBoolean object. + * + * @param p0 XmlBoolean the rubella vaccination recommendation as an XML boolean type + */ void xsetRubella(final XmlBoolean p0); - + + /** + * Gets the newborn Hepatitis B immunoglobulin recommendation status. + * + *

    Newborns born to Hepatitis B surface antigen-positive mothers require + * Hepatitis B immunoglobulin (HBIG) within 12 hours of birth to prevent + * vertical transmission of the virus.

    + * + * @return boolean true if newborn HepB immunoglobulin is recommended, false otherwise + */ boolean getNewbornHepIG(); - + + /** + * Gets the newborn HepB immunoglobulin status as an XMLBeans XmlBoolean object. + * + * @return XmlBoolean the newborn HepB immunoglobulin recommendation as an XML boolean type + */ XmlBoolean xgetNewbornHepIG(); - + + /** + * Sets the newborn Hepatitis B immunoglobulin recommendation status. + * + * @param p0 boolean true if newborn HepB immunoglobulin is recommended, false otherwise + */ void setNewbornHepIG(final boolean p0); - + + /** + * Sets the newborn HepB immunoglobulin status using an XMLBeans XmlBoolean object. + * + * @param p0 XmlBoolean the newborn HepB immunoglobulin recommendation as an XML boolean type + */ void xsetNewbornHepIG(final XmlBoolean p0); - + + /** + * Gets the Hepatitis B vaccine recommendation status. + * + *

    Hepatitis B vaccine is recommended for all newborns, with accelerated schedules + * for infants born to HBsAg-positive mothers. This field tracks whether the vaccine + * is recommended as part of the newborn's immunization plan.

    + * + * @return boolean true if Hepatitis B vaccine is recommended, false otherwise + */ boolean getHepBVaccine(); - + + /** + * Gets the Hepatitis B vaccine status as an XMLBeans XmlBoolean object. + * + * @return XmlBoolean the Hepatitis B vaccine recommendation as an XML boolean type + */ XmlBoolean xgetHepBVaccine(); - + + /** + * Sets the Hepatitis B vaccine recommendation status. + * + * @param p0 boolean true if Hepatitis B vaccine is recommended, false otherwise + */ void setHepBVaccine(final boolean p0); - + + /** + * Sets the Hepatitis B vaccine status using an XMLBeans XmlBoolean object. + * + * @param p0 XmlBoolean the Hepatitis B vaccine recommendation as an XML boolean type + */ void xsetHepBVaccine(final XmlBoolean p0); - + + /** + * Factory class for creating and parsing RecommendedImmunoprophylaxisType instances. + * + *

    This inner class provides static factory methods for:

    + *
      + *
    • Creating new instances of RecommendedImmunoprophylaxisType
    • + *
    • Parsing XML from various sources (String, File, URL, streams, etc.)
    • + *
    • Validating XML against the schema
    • + *
    + * + *

    The Factory follows the XMLBeans pattern for type-safe XML object creation + * and parsing, ensuring all instances conform to the AR2005 schema.

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty instance of RecommendedImmunoprophylaxisType. + * + * @return RecommendedImmunoprophylaxisType a new instance with default values + */ public static RecommendedImmunoprophylaxisType newInstance() { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().newInstance(RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Creates a new instance with specified XML options. + * + * @param options XmlOptions configuration options for XML processing (validation, namespaces, etc.) + * @return RecommendedImmunoprophylaxisType a new instance with the specified options applied + */ public static RecommendedImmunoprophylaxisType newInstance(final XmlOptions options) { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().newInstance(RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses an XML string into a RecommendedImmunoprophylaxisType instance. + * + * @param xmlAsString String the XML content as a string + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static RecommendedImmunoprophylaxisType parse(final String xmlAsString) throws XmlException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(xmlAsString, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses an XML string with specified options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static RecommendedImmunoprophylaxisType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(xmlAsString, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses an XML file into a RecommendedImmunoprophylaxisType instance. + * + * @param file File the XML file to parse + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading the file + */ public static RecommendedImmunoprophylaxisType parse(final File file) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(file, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses an XML file with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading the file + */ public static RecommendedImmunoprophylaxisType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(file, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses XML from a URL into a RecommendedImmunoprophylaxisType instance. + * + * @param u URL the URL pointing to the XML content + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading from the URL + */ public static RecommendedImmunoprophylaxisType parse(final URL u) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(u, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL with specified options. + * + * @param u URL the URL pointing to the XML content + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading from the URL + */ public static RecommendedImmunoprophylaxisType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(u, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses XML from an input stream into a RecommendedImmunoprophylaxisType instance. + * + * @param is InputStream the input stream containing XML data + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading from the stream + */ public static RecommendedImmunoprophylaxisType parse(final InputStream is) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(is, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses XML from an input stream with specified options. + * + * @param is InputStream the input stream containing XML data + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading from the stream + */ public static RecommendedImmunoprophylaxisType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(is, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses XML from a character reader into a RecommendedImmunoprophylaxisType instance. + * + * @param r Reader the character reader containing XML data + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading from the reader + */ public static RecommendedImmunoprophylaxisType parse(final Reader r) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(r, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses XML from a character reader with specified options. + * + * @param r Reader the character reader containing XML data + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws IOException if there is an error reading from the reader + */ public static RecommendedImmunoprophylaxisType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(r, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses XML from an XMLStreamReader into a RecommendedImmunoprophylaxisType instance. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static RecommendedImmunoprophylaxisType parse(final XMLStreamReader sr) throws XmlException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(sr, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLStreamReader with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static RecommendedImmunoprophylaxisType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(sr, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses XML from a DOM Node into a RecommendedImmunoprophylaxisType instance. + * + * @param node Node the DOM node containing the XML data + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static RecommendedImmunoprophylaxisType parse(final Node node) throws XmlException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(node, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM Node with specified options. + * + * @param node Node the DOM node containing the XML data + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + */ public static RecommendedImmunoprophylaxisType parse(final Node node, final XmlOptions options) throws XmlException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(node, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Parses XML from a deprecated XMLInputStream into a RecommendedImmunoprophylaxisType instance. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader instead. + * @param xis XMLInputStream the XML input stream (deprecated) + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws XMLStreamException if there is an error reading from the stream + */ @Deprecated public static RecommendedImmunoprophylaxisType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(xis, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Parses XML from a deprecated XMLInputStream with specified options. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader instead. + * @param xis XMLInputStream the XML input stream (deprecated) + * @param options XmlOptions configuration options for parsing + * @return RecommendedImmunoprophylaxisType the parsed instance + * @throws XmlException if the XML is malformed or does not conform to the schema + * @throws XMLStreamException if there is an error reading from the stream + */ @Deprecated public static RecommendedImmunoprophylaxisType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (RecommendedImmunoprophylaxisType)XmlBeans.getContextTypeLoader().parse(xis, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Creates a validating XMLInputStream from a deprecated XMLInputStream. + * + *

    This method wraps the input stream with validation logic to ensure the XML + * conforms to the AR2005 schema during parsing.

    + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader with validation instead. + * @param xis XMLInputStream the XML input stream to validate (deprecated) + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if the XML does not conform to the schema + * @throws XMLStreamException if there is an error reading from the stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, RecommendedImmunoprophylaxisType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream with specified options. + * + * @deprecated XMLInputStream is deprecated in XMLBeans. Use XMLStreamReader with validation instead. + * @param xis XMLInputStream the XML input stream to validate (deprecated) + * @param options XmlOptions configuration options for validation + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if the XML does not conform to the schema + * @throws XMLStreamException if there is an error reading from the stream + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, RecommendedImmunoprophylaxisType.type, options); } - + + /** + * Private constructor to prevent instantiation of the Factory class. + * + *

    All methods in this class are static, so instances are not needed.

    + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/SignatureType.java b/src/main/java/ca/openosp/openo/ar2005/SignatureType.java index 33ed328a519..a53d8753bcf 100644 --- a/src/main/java/ca/openosp/openo/ar2005/SignatureType.java +++ b/src/main/java/ca/openosp/openo/ar2005/SignatureType.java @@ -18,136 +18,427 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XML type interface for handling signature and date information in the British Columbia Antenatal Record (AR2005) forms. + * This interface represents a signature complex type that captures healthcare provider signatures and their associated dates + * for medical documentation and audit purposes. + * + *

    The signature type supports both a primary signature/date pair and an optional secondary signature/date pair, + * allowing for scenarios requiring multiple healthcare provider sign-offs such as witness signatures or + * supervisory approvals.

    + * + *

    This class is generated from XML schema definitions and uses Apache XMLBeans for XML binding. + * It provides both standard Java property accessors and XMLBeans-specific accessor methods (prefixed with 'x') + * for advanced XML manipulation.

    + * + *

    Healthcare Context: In British Columbia's antenatal care system, signatures serve as legal attestations + * for clinical assessments, treatment plans, and patient consent. The dual signature capability supports + * collaborative care models where multiple providers may need to authenticate the same document.

    + * + * @see XmlObject + * @see org.apache.xmlbeans.XmlString + * @see org.apache.xmlbeans.XmlDate + * @since 2026-01-24 + */ public interface SignatureType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(SignatureType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("signaturetypee7b7type"); - + + /** + * Gets the primary signature value as a String. + * + * @return String the primary signature value + */ String getSignature(); - + + /** + * Gets the primary signature as an XmlString object for advanced XML manipulation. + * + * @return XmlString the primary signature as an XMLBeans type + */ XmlString xgetSignature(); - + + /** + * Sets the primary signature value. + * + * @param p0 String the signature value to set + */ void setSignature(final String p0); - + + /** + * Sets the primary signature using an XmlString object for advanced XML manipulation. + * + * @param p0 XmlString the signature value to set as an XMLBeans type + */ void xsetSignature(final XmlString p0); - + + /** + * Gets the primary signature date. + * + * @return Calendar the date associated with the primary signature + */ Calendar getDate(); - + + /** + * Gets the primary signature date as an XmlDate object for advanced XML manipulation. + * + * @return XmlDate the date associated with the primary signature as an XMLBeans type + */ XmlDate xgetDate(); - + + /** + * Sets the primary signature date. + * + * @param p0 Calendar the date to associate with the primary signature + */ void setDate(final Calendar p0); - + + /** + * Sets the primary signature date using an XmlDate object for advanced XML manipulation. + * + * @param p0 XmlDate the date to associate with the primary signature as an XMLBeans type + */ void xsetDate(final XmlDate p0); - + + /** + * Gets the secondary (witness or co-signer) signature value as a String. + * This field is optional and may not be set for all signature instances. + * + * @return String the secondary signature value, or null if not set + */ String getSignature2(); - + + /** + * Gets the secondary signature as an XmlString object for advanced XML manipulation. + * + * @return XmlString the secondary signature as an XMLBeans type + */ XmlString xgetSignature2(); - + + /** + * Checks if the secondary signature field has been set. + * + * @return boolean true if the secondary signature is present, false otherwise + */ boolean isSetSignature2(); - + + /** + * Sets the secondary signature value. + * + * @param p0 String the secondary signature value to set + */ void setSignature2(final String p0); - + + /** + * Sets the secondary signature using an XmlString object for advanced XML manipulation. + * + * @param p0 XmlString the secondary signature value to set as an XMLBeans type + */ void xsetSignature2(final XmlString p0); - + + /** + * Removes the secondary signature value, making it unset. + */ void unsetSignature2(); - + + /** + * Gets the secondary signature date. + * This field is optional and may not be set for all signature instances. + * + * @return Calendar the date associated with the secondary signature, or null if not set + */ Calendar getDate2(); - + + /** + * Gets the secondary signature date as an XmlDate object for advanced XML manipulation. + * + * @return XmlDate the date associated with the secondary signature as an XMLBeans type + */ XmlDate xgetDate2(); - + + /** + * Checks if the secondary signature date field has been set. + * + * @return boolean true if the secondary signature date is present, false otherwise + */ boolean isSetDate2(); - + + /** + * Sets the secondary signature date. + * + * @param p0 Calendar the date to associate with the secondary signature + */ void setDate2(final Calendar p0); - + + /** + * Sets the secondary signature date using an XmlDate object for advanced XML manipulation. + * + * @param p0 XmlDate the date to associate with the secondary signature as an XMLBeans type + */ void xsetDate2(final XmlDate p0); - + + /** + * Removes the secondary signature date value, making it unset. + */ void unsetDate2(); - + + /** + * Factory class for creating and parsing SignatureType instances from various XML sources. + * Provides static methods for XML deserialization from strings, files, streams, and DOM nodes. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty SignatureType instance with default settings. + * + * @return SignatureType a new instance with no signature or date values set + */ public static SignatureType newInstance() { return (SignatureType)XmlBeans.getContextTypeLoader().newInstance(SignatureType.type, (XmlOptions)null); } - + + /** + * Creates a new empty SignatureType instance with specified XML options. + * + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType a new instance with no signature or date values set + */ public static SignatureType newInstance(final XmlOptions options) { return (SignatureType)XmlBeans.getContextTypeLoader().newInstance(SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from an XML string. + * + * @param xmlAsString String the XML string to parse + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + */ public static SignatureType parse(final String xmlAsString) throws XmlException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(xmlAsString, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from an XML string with specified options. + * + * @param xmlAsString String the XML string to parse + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + */ public static SignatureType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(xmlAsString, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from an XML file. + * + * @param file File the XML file to parse + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading the file + */ public static SignatureType parse(final File file) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(file, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from an XML file with specified options. + * + * @param file File the XML file to parse + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading the file + */ public static SignatureType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(file, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from a URL pointing to an XML resource. + * + * @param u URL the URL of the XML resource to parse + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading from the URL + */ public static SignatureType parse(final URL u) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(u, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from a URL pointing to an XML resource with specified options. + * + * @param u URL the URL of the XML resource to parse + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading from the URL + */ public static SignatureType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(u, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from an InputStream containing XML data. + * + * @param is InputStream the input stream containing XML data + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static SignatureType parse(final InputStream is) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(is, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from an InputStream containing XML data with specified options. + * + * @param is InputStream the input stream containing XML data + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading from the stream + */ public static SignatureType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(is, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from a Reader containing XML character data. + * + * @param r Reader the reader containing XML character data + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static SignatureType parse(final Reader r) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(r, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from a Reader containing XML character data with specified options. + * + * @param r Reader the reader containing XML character data + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws IOException if an I/O error occurs reading from the reader + */ public static SignatureType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(r, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from an XMLStreamReader. + * + * @param sr XMLStreamReader the stream reader positioned at the SignatureType element + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + */ public static SignatureType parse(final XMLStreamReader sr) throws XmlException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(sr, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from an XMLStreamReader with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the SignatureType element + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + */ public static SignatureType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(sr, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from a DOM Node. + * + * @param node Node the DOM node representing the SignatureType element + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + */ public static SignatureType parse(final Node node) throws XmlException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(node, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from a DOM Node with specified options. + * + * @param node Node the DOM node representing the SignatureType element + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + */ public static SignatureType parse(final Node node, final XmlOptions options) throws XmlException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(node, SignatureType.type, options); } - + + /** + * Parses a SignatureType instance from an XMLInputStream. + * + * @param xis XMLInputStream the XML input stream to parse + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws XMLStreamException if an error occurs processing the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative parse methods with standard Java streams + */ @Deprecated public static SignatureType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(xis, SignatureType.type, (XmlOptions)null); } - + + /** + * Parses a SignatureType instance from an XMLInputStream with specified options. + * + * @param xis XMLInputStream the XML input stream to parse + * @param options XmlOptions configuration options for XML parsing and validation + * @return SignatureType the parsed signature instance + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws XMLStreamException if an error occurs processing the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative parse methods with standard Java streams + */ @Deprecated public static SignatureType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (SignatureType)XmlBeans.getContextTypeLoader().parse(xis, SignatureType.type, options); } - + + /** + * Creates a validating XMLInputStream wrapper for signature validation. + * + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws XMLStreamException if an error occurs processing the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative validation methods + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, SignatureType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream wrapper for signature validation with specified options. + * + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions configuration options for XML parsing and validation + * @return XMLInputStream a validating wrapper around the input stream + * @throws XmlException if the XML is invalid or does not conform to the SignatureType schema + * @throws XMLStreamException if an error occurs processing the XML stream + * @deprecated XMLInputStream is deprecated in XMLBeans; use alternative validation methods + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, SignatureType.type, options); } - + + /** + * Private constructor to prevent instantiation of this factory class. + */ private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/SubsequentVisitItemType.java b/src/main/java/ca/openosp/openo/ar2005/SubsequentVisitItemType.java index 7506aecfa83..c868add357f 100644 --- a/src/main/java/ca/openosp/openo/ar2005/SubsequentVisitItemType.java +++ b/src/main/java/ca/openosp/openo/ar2005/SubsequentVisitItemType.java @@ -19,112 +19,391 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * XMLBeans interface representing a subsequent prenatal visit record in the AR2005 (British Columbia Antenatal Record) system. + * + *

    This interface provides structured access to clinical data captured during follow-up prenatal appointments, + * including maternal vital signs, fetal measurements, and clinical observations. It is part of the BCAR (British + * Columbia Antenatal Record) form integration used for standardized prenatal care documentation throughout pregnancy.

    + * + *

    The interface supports tracking of key prenatal health indicators across multiple visits:

    + *
      + *
    • Visit date and gestational age (GA)
    • + *
    • Maternal measurements: weight, blood pressure (BP)
    • + *
    • Urinalysis results: protein (PR) and glucose (GI)
    • + *
    • Symphysis-fundal height (SFH) measurements
    • + *
    • Fetal presentation and position
    • + *
    • Fetal heart rate (FHR) and fetal movement (Fm)
    • + *
    • Clinical comments and observations
    • + *
    + * + *

    This is an XMLBeans-generated interface that provides type-safe access to XML document content + * conforming to the AR2005 schema. The interface includes nested type definitions (Ga, Weight, Bp) + * and a Factory class for parsing XML and creating new instances.

    + * + * @since 2026-01-24 + * @see ca.openosp.openo.ar2005 + * @see org.apache.xmlbeans.XmlObject + */ public interface SubsequentVisitItemType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(SubsequentVisitItemType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("subsequentvisititemtypeb4c8type"); - + + /** + * Gets the visit date for this subsequent prenatal appointment. + * + * @return Calendar the date and time of the prenatal visit + */ Calendar getDate(); - + + /** + * Gets the visit date as an XmlDate object for XML serialization. + * + * @return XmlDate the visit date in XMLBeans date format + */ XmlDate xgetDate(); - + + /** + * Checks if the visit date is nil (not set). + * + * @return boolean true if the date is nil, false otherwise + */ boolean isNilDate(); - + + /** + * Sets the visit date for this subsequent prenatal appointment. + * + * @param p0 Calendar the date and time of the prenatal visit + */ void setDate(final Calendar p0); - + + /** + * Sets the visit date using an XmlDate object for XML deserialization. + * + * @param p0 XmlDate the visit date in XMLBeans date format + */ void xsetDate(final XmlDate p0); - + + /** + * Sets the visit date to nil (not set). + */ void setNilDate(); - + + /** + * Gets the gestational age (GA) at the time of this visit. + * + * @return String the gestational age value (typically in weeks and days format) + */ String getGa(); - + + /** + * Gets the gestational age as a Ga type object for XML serialization. + * + * @return Ga the gestational age in XMLBeans Ga type format + */ Ga xgetGa(); - + + /** + * Sets the gestational age at the time of this visit. + * + * @param p0 String the gestational age value (typically in weeks and days format) + */ void setGa(final String p0); - + + /** + * Sets the gestational age using a Ga type object for XML deserialization. + * + * @param p0 Ga the gestational age in XMLBeans Ga type format + */ void xsetGa(final Ga p0); - + + /** + * Gets the maternal weight measurement recorded during this visit. + * + * @return float the weight value (typically in kilograms) + */ float getWeight(); - + + /** + * Gets the maternal weight as a Weight type object for XML serialization. + * + * @return Weight the weight value in XMLBeans Weight type format + */ Weight xgetWeight(); - + + /** + * Checks if the weight measurement is nil (not recorded). + * + * @return boolean true if the weight is nil, false otherwise + */ boolean isNilWeight(); - + + /** + * Sets the maternal weight measurement for this visit. + * + * @param p0 float the weight value (typically in kilograms) + */ void setWeight(final float p0); - + + /** + * Sets the maternal weight using a Weight type object for XML deserialization. + * + * @param p0 Weight the weight value in XMLBeans Weight type format + */ void xsetWeight(final Weight p0); - + + /** + * Sets the weight measurement to nil (not recorded). + */ void setNilWeight(); - + + /** + * Gets the maternal blood pressure (BP) measurement recorded during this visit. + * + * @return String the blood pressure value (typically in systolic/diastolic format, e.g., "120/80") + */ String getBp(); - + + /** + * Gets the blood pressure as a Bp type object for XML serialization. + * + * @return Bp the blood pressure value in XMLBeans Bp type format + */ Bp xgetBp(); - + + /** + * Sets the maternal blood pressure measurement for this visit. + * + * @param p0 String the blood pressure value (typically in systolic/diastolic format, e.g., "120/80") + */ void setBp(final String p0); - + + /** + * Sets the blood pressure using a Bp type object for XML deserialization. + * + * @param p0 Bp the blood pressure value in XMLBeans Bp type format + */ void xsetBp(final Bp p0); - + + /** + * Gets the urine protein (PR) test result from urinalysis. + * + * @return String the protein level in urine (e.g., "negative", "trace", "+", "++", "+++") + */ String getUrinePR(); - + + /** + * Gets the urine protein test result as an XmlString object for XML serialization. + * + * @return XmlString the protein level in XMLBeans string format + */ XmlString xgetUrinePR(); - + + /** + * Sets the urine protein test result from urinalysis. + * + * @param p0 String the protein level in urine (e.g., "negative", "trace", "+", "++", "+++") + */ void setUrinePR(final String p0); - + + /** + * Sets the urine protein test result using an XmlString object for XML deserialization. + * + * @param p0 XmlString the protein level in XMLBeans string format + */ void xsetUrinePR(final XmlString p0); - + + /** + * Gets the urine glucose (GI) test result from urinalysis. + * + * @return String the glucose level in urine (e.g., "negative", "trace", "+", "++", "+++") + */ String getUrineGI(); - + + /** + * Gets the urine glucose test result as an XmlString object for XML serialization. + * + * @return XmlString the glucose level in XMLBeans string format + */ XmlString xgetUrineGI(); - + + /** + * Sets the urine glucose test result from urinalysis. + * + * @param p0 String the glucose level in urine (e.g., "negative", "trace", "+", "++", "+++") + */ void setUrineGI(final String p0); - + + /** + * Sets the urine glucose test result using an XmlString object for XML deserialization. + * + * @param p0 XmlString the glucose level in XMLBeans string format + */ void xsetUrineGI(final XmlString p0); - + + /** + * Gets the symphysis-fundal height (SFH) measurement. + *

    SFH is measured from the pubic symphysis to the top of the uterine fundus and is used to + * assess fetal growth and amniotic fluid volume during pregnancy.

    + * + * @return String the SFH measurement (typically in centimeters) + */ String getSFH(); - + + /** + * Gets the symphysis-fundal height as an XmlString object for XML serialization. + * + * @return XmlString the SFH measurement in XMLBeans string format + */ XmlString xgetSFH(); - + + /** + * Sets the symphysis-fundal height measurement. + * + * @param p0 String the SFH measurement (typically in centimeters) + */ void setSFH(final String p0); - + + /** + * Sets the symphysis-fundal height using an XmlString object for XML deserialization. + * + * @param p0 XmlString the SFH measurement in XMLBeans string format + */ void xsetSFH(final XmlString p0); - + + /** + * Gets the fetal presentation and position. + *

    This describes how the fetus is positioned in the uterus (e.g., vertex/cephalic, breech) + * and the specific position (e.g., LOA - left occiput anterior, ROA - right occiput anterior).

    + * + * @return String the fetal presentation and position description + */ String getPresentationPosition(); - + + /** + * Gets the fetal presentation and position as an XmlString object for XML serialization. + * + * @return XmlString the presentation and position in XMLBeans string format + */ XmlString xgetPresentationPosition(); - + + /** + * Sets the fetal presentation and position. + * + * @param p0 String the fetal presentation and position description + */ void setPresentationPosition(final String p0); - + + /** + * Sets the fetal presentation and position using an XmlString object for XML deserialization. + * + * @param p0 XmlString the presentation and position in XMLBeans string format + */ void xsetPresentationPosition(final XmlString p0); - + + /** + * Gets the fetal heart rate (FHR) and fetal movement (Fm) observations. + *

    FHR is typically measured in beats per minute (bpm). Fetal movement indicates whether + * the mother reports feeling the baby move (quickening typically begins around 18-25 weeks).

    + * + * @return String the FHR and fetal movement observation (e.g., "140 bpm, +") + */ String getFHRFm(); - + + /** + * Gets the FHR and fetal movement as an XmlString object for XML serialization. + * + * @return XmlString the FHR and fetal movement in XMLBeans string format + */ XmlString xgetFHRFm(); - + + /** + * Sets the fetal heart rate and fetal movement observations. + * + * @param p0 String the FHR and fetal movement observation (e.g., "140 bpm, +") + */ void setFHRFm(final String p0); - + + /** + * Sets the FHR and fetal movement using an XmlString object for XML deserialization. + * + * @param p0 XmlString the FHR and fetal movement in XMLBeans string format + */ void xsetFHRFm(final XmlString p0); - + + /** + * Gets clinical comments or notes recorded during this visit. + *

    This field captures any additional observations, concerns, patient questions, + * or clinical notes that don't fit in the structured fields above.

    + * + * @return String the clinical comments or notes + */ String getComments(); - + + /** + * Gets the clinical comments as an XmlString object for XML serialization. + * + * @return XmlString the comments in XMLBeans string format + */ XmlString xgetComments(); - + + /** + * Sets clinical comments or notes for this visit. + * + * @param p0 String the clinical comments or notes + */ void setComments(final String p0); - + + /** + * Sets the clinical comments using an XmlString object for XML deserialization. + * + * @param p0 XmlString the comments in XMLBeans string format + */ void xsetComments(final XmlString p0); - + + /** + * XMLBeans type definition for gestational age (GA) values. + *

    This nested interface provides type-safe access to gestational age data within + * the SubsequentVisitItemType XML structure. Gestational age is typically expressed + * in weeks and days format (e.g., "32+4" meaning 32 weeks and 4 days).

    + * + * @see org.apache.xmlbeans.XmlString + */ public interface Ga extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Ga.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("gab9beelemtype"); - + + /** + * Factory class for creating and managing Ga type instances. + *

    Provides methods to create new Ga objects from various sources.

    + */ public static final class Factory { + /** + * Creates a new Ga instance from an existing object value. + * + * @param obj Object the source object to create the Ga instance from + * @return Ga the newly created Ga instance + */ public static Ga newValue(final Object obj) { return (Ga)Ga.type.newValue(obj); } - + + /** + * Creates a new empty Ga instance. + * + * @return Ga the newly created Ga instance + */ public static Ga newInstance() { return (Ga)XmlBeans.getContextTypeLoader().newInstance(Ga.type, (XmlOptions)null); } - + + /** + * Creates a new empty Ga instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return Ga the newly created Ga instance + */ public static Ga newInstance(final XmlOptions options) { return (Ga)XmlBeans.getContextTypeLoader().newInstance(Ga.type, options); } @@ -133,21 +412,50 @@ private Factory() { } } } - + + /** + * XMLBeans type definition for maternal weight values. + *

    This nested interface provides type-safe access to weight measurements within + * the SubsequentVisitItemType XML structure. Weight is typically recorded in kilograms + * and monitored throughout pregnancy to assess maternal and fetal health.

    + * + * @see org.apache.xmlbeans.XmlFloat + */ public interface Weight extends XmlFloat { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Weight.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("weightc2dcelemtype"); - + + /** + * Factory class for creating and managing Weight type instances. + *

    Provides methods to create new Weight objects from various sources.

    + */ public static final class Factory { + /** + * Creates a new Weight instance from an existing object value. + * + * @param obj Object the source object to create the Weight instance from + * @return Weight the newly created Weight instance + */ public static Weight newValue(final Object obj) { return (Weight)Weight.type.newValue(obj); } - + + /** + * Creates a new empty Weight instance. + * + * @return Weight the newly created Weight instance + */ public static Weight newInstance() { return (Weight)XmlBeans.getContextTypeLoader().newInstance(Weight.type, (XmlOptions)null); } - + + /** + * Creates a new empty Weight instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return Weight the newly created Weight instance + */ public static Weight newInstance(final XmlOptions options) { return (Weight)XmlBeans.getContextTypeLoader().newInstance(Weight.type, options); } @@ -156,21 +464,51 @@ private Factory() { } } } - + + /** + * XMLBeans type definition for maternal blood pressure (BP) values. + *

    This nested interface provides type-safe access to blood pressure measurements within + * the SubsequentVisitItemType XML structure. Blood pressure is typically recorded in systolic/diastolic + * format (e.g., "120/80") and is a critical vital sign monitored throughout pregnancy to detect + * conditions such as gestational hypertension or preeclampsia.

    + * + * @see org.apache.xmlbeans.XmlString + */ public interface Bp extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Bp.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("bp6632elemtype"); - + + /** + * Factory class for creating and managing Bp type instances. + *

    Provides methods to create new Bp objects from various sources.

    + */ public static final class Factory { + /** + * Creates a new Bp instance from an existing object value. + * + * @param obj Object the source object to create the Bp instance from + * @return Bp the newly created Bp instance + */ public static Bp newValue(final Object obj) { return (Bp)Bp.type.newValue(obj); } - + + /** + * Creates a new empty Bp instance. + * + * @return Bp the newly created Bp instance + */ public static Bp newInstance() { return (Bp)XmlBeans.getContextTypeLoader().newInstance(Bp.type, (XmlOptions)null); } - + + /** + * Creates a new empty Bp instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return Bp the newly created Bp instance + */ public static Bp newInstance(final XmlOptions options) { return (Bp)XmlBeans.getContextTypeLoader().newInstance(Bp.type, options); } @@ -179,88 +517,256 @@ private Factory() { } } } - + + /** + * Factory class for creating and parsing SubsequentVisitItemType instances. + *

    This factory provides multiple methods to create new instances or parse existing + * XML documents into SubsequentVisitItemType objects. It supports parsing from various + * sources including String, File, URL, InputStream, Reader, Node, and XMLStreamReader.

    + */ public static final class Factory { + /** + * Creates a new empty SubsequentVisitItemType instance. + * + * @return SubsequentVisitItemType the newly created instance + */ public static SubsequentVisitItemType newInstance() { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().newInstance(SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Creates a new empty SubsequentVisitItemType instance with the specified XML options. + * + * @param options XmlOptions the XML options to use for instance creation + * @return SubsequentVisitItemType the newly created instance + */ public static SubsequentVisitItemType newInstance(final XmlOptions options) { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().newInstance(SubsequentVisitItemType.type, options); } - + + /** + * Parses an XML string into a SubsequentVisitItemType instance. + * + * @param xmlAsString String the XML content as a string + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + */ public static SubsequentVisitItemType parse(final String xmlAsString) throws XmlException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(xmlAsString, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses an XML string into a SubsequentVisitItemType instance with the specified XML options. + * + * @param xmlAsString String the XML content as a string + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + */ public static SubsequentVisitItemType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(xmlAsString, SubsequentVisitItemType.type, options); } - + + /** + * Parses an XML file into a SubsequentVisitItemType instance. + * + * @param file File the XML file to parse + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading the file + */ public static SubsequentVisitItemType parse(final File file) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(file, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses an XML file into a SubsequentVisitItemType instance with the specified XML options. + * + * @param file File the XML file to parse + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading the file + */ public static SubsequentVisitItemType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(file, SubsequentVisitItemType.type, options); } - + + /** + * Parses XML from a URL into a SubsequentVisitItemType instance. + * + * @param u URL the URL pointing to the XML content + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading from the URL + */ public static SubsequentVisitItemType parse(final URL u) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(u, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses XML from a URL into a SubsequentVisitItemType instance with the specified XML options. + * + * @param u URL the URL pointing to the XML content + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading from the URL + */ public static SubsequentVisitItemType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(u, SubsequentVisitItemType.type, options); } - + + /** + * Parses XML from an InputStream into a SubsequentVisitItemType instance. + * + * @param is InputStream the input stream containing XML content + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading from the input stream + */ public static SubsequentVisitItemType parse(final InputStream is) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(is, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses XML from an InputStream into a SubsequentVisitItemType instance with the specified XML options. + * + * @param is InputStream the input stream containing XML content + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading from the input stream + */ public static SubsequentVisitItemType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(is, SubsequentVisitItemType.type, options); } - + + /** + * Parses XML from a Reader into a SubsequentVisitItemType instance. + * + * @param r Reader the reader containing XML content + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading from the reader + */ public static SubsequentVisitItemType parse(final Reader r) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(r, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses XML from a Reader into a SubsequentVisitItemType instance with the specified XML options. + * + * @param r Reader the reader containing XML content + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws IOException if there is an error reading from the reader + */ public static SubsequentVisitItemType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(r, SubsequentVisitItemType.type, options); } - + + /** + * Parses XML from an XMLStreamReader into a SubsequentVisitItemType instance. + * + * @param sr XMLStreamReader the XML stream reader + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + */ public static SubsequentVisitItemType parse(final XMLStreamReader sr) throws XmlException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(sr, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLStreamReader into a SubsequentVisitItemType instance with the specified XML options. + * + * @param sr XMLStreamReader the XML stream reader + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + */ public static SubsequentVisitItemType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(sr, SubsequentVisitItemType.type, options); } - + + /** + * Parses XML from a DOM Node into a SubsequentVisitItemType instance. + * + * @param node Node the DOM node containing XML content + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + */ public static SubsequentVisitItemType parse(final Node node) throws XmlException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(node, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses XML from a DOM Node into a SubsequentVisitItemType instance with the specified XML options. + * + * @param node Node the DOM node containing XML content + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + */ public static SubsequentVisitItemType parse(final Node node, final XmlOptions options) throws XmlException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(node, SubsequentVisitItemType.type, options); } - + + /** + * Parses XML from an XMLInputStream into a SubsequentVisitItemType instance. + * + * @param xis XMLInputStream the XML input stream + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated, use alternative parse methods instead + */ @Deprecated public static SubsequentVisitItemType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(xis, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Parses XML from an XMLInputStream into a SubsequentVisitItemType instance with the specified XML options. + * + * @param xis XMLInputStream the XML input stream + * @param options XmlOptions the XML options to use for parsing + * @return SubsequentVisitItemType the parsed instance + * @throws XmlException if the XML is not valid or cannot be parsed + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated, use alternative parse methods instead + */ @Deprecated public static SubsequentVisitItemType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (SubsequentVisitItemType)XmlBeans.getContextTypeLoader().parse(xis, SubsequentVisitItemType.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream. + * + * @param xis XMLInputStream the XML input stream to validate + * @return XMLInputStream the validating XML input stream + * @throws XmlException if the XML is not valid + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated, use alternative validation methods instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, SubsequentVisitItemType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with the specified XML options. + * + * @param xis XMLInputStream the XML input stream to validate + * @param options XmlOptions the XML options to use for validation + * @return XMLInputStream the validating XML input stream + * @throws XmlException if the XML is not valid + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated XMLInputStream is deprecated, use alternative validation methods instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, SubsequentVisitItemType.type, options); diff --git a/src/main/java/ca/openosp/openo/ar2005/UltrasoundType.java b/src/main/java/ca/openosp/openo/ar2005/UltrasoundType.java index c8b62d32b83..d7257503168 100644 --- a/src/main/java/ca/openosp/openo/ar2005/UltrasoundType.java +++ b/src/main/java/ca/openosp/openo/ar2005/UltrasoundType.java @@ -18,143 +18,443 @@ import org.apache.xmlbeans.SchemaType; import org.apache.xmlbeans.XmlObject; +/** + * Represents ultrasound examination data for the Antenatal Record 2005 (AR2005) system. + * + * This interface provides methods to manage ultrasound examination information including + * the examination date, gestational age (GA), and results. It is part of the British Columbia + * Antenatal Record (BCAR) forms used for pregnancy care tracking in the OpenO EMR system. + * + * The interface is generated by Apache XMLBeans and provides both high-level property + * accessors (getters/setters) and low-level XML type accessors (xget/xset) for fine-grained + * control over the underlying XML representation. + * + * @see XmlObject + * @see ca.openosp.openo.ar2005 + * @since 2026-01-23 + */ public interface UltrasoundType extends XmlObject { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(UltrasoundType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("ultrasoundtype4a74type"); - + + /** + * Gets the date of the ultrasound examination. + * + * @return Calendar the ultrasound examination date + */ Calendar getDate(); - + + /** + * Gets the date of the ultrasound examination as an XML date type. + * + * This method provides low-level access to the underlying XML representation + * of the date field for fine-grained control over XML processing. + * + * @return XmlDate the ultrasound examination date as XML type + */ XmlDate xgetDate(); - + + /** + * Sets the date of the ultrasound examination. + * + * @param p0 Calendar the ultrasound examination date to set + */ void setDate(final Calendar p0); - + + /** + * Sets the date of the ultrasound examination using an XML date type. + * + * This method provides low-level access to set the underlying XML representation + * of the date field for fine-grained control over XML processing. + * + * @param p0 XmlDate the ultrasound examination date to set as XML type + */ void xsetDate(final XmlDate p0); - + + /** + * Gets the gestational age (GA) at the time of the ultrasound examination. + * + * @return String the gestational age value + */ String getGa(); - + + /** + * Gets the gestational age (GA) as an XML string type. + * + * This method provides low-level access to the underlying XML representation + * of the gestational age field. + * + * @return Ga the gestational age as a constrained XML string type + */ Ga xgetGa(); - + + /** + * Sets the gestational age (GA) at the time of the ultrasound examination. + * + * @param p0 String the gestational age value to set + */ void setGa(final String p0); - + + /** + * Sets the gestational age (GA) using an XML string type. + * + * This method provides low-level access to set the underlying XML representation + * of the gestational age field. + * + * @param p0 Ga the gestational age to set as a constrained XML string type + */ void xsetGa(final Ga p0); - + + /** + * Gets the results of the ultrasound examination. + * + * @return String the ultrasound examination results + */ String getResults(); - + + /** + * Gets the results of the ultrasound examination as an XML string type. + * + * This method provides low-level access to the underlying XML representation + * of the results field. + * + * @return XmlString the ultrasound examination results as XML type + */ XmlString xgetResults(); - + + /** + * Sets the results of the ultrasound examination. + * + * @param p0 String the ultrasound examination results to set + */ void setResults(final String p0); - + + /** + * Sets the results of the ultrasound examination using an XML string type. + * + * This method provides low-level access to set the underlying XML representation + * of the results field. + * + * @param p0 XmlString the ultrasound examination results to set as XML type + */ void xsetResults(final XmlString p0); - + + /** + * Represents a constrained XML string type for gestational age (GA) values. + * + * This interface provides a type-safe representation of gestational age within + * the ultrasound data structure, ensuring values conform to the expected schema + * constraints defined in the AR2005 XML schema. + * + * @see XmlString + * @since 2026-01-23 + */ public interface Ga extends XmlString { public static final SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Ga.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s9C023B7D67311A3187802DA7FD51EA38").resolveHandle("gab8beelemtype"); - + + /** + * Factory class for creating Ga instances. + * + * Provides static methods to create new Ga objects with or without + * XML processing options for schema validation and other XMLBeans features. + * + * @since 2026-01-23 + */ public static final class Factory { + /** + * Creates a new Ga instance from an object value. + * + * @param obj Object the value to convert to a Ga instance + * @return Ga a new Ga instance initialized with the given value + */ public static Ga newValue(final Object obj) { return (Ga)Ga.type.newValue(obj); } - + + /** + * Creates a new Ga instance with default XML processing options. + * + * @return Ga a new empty Ga instance + */ public static Ga newInstance() { return (Ga)XmlBeans.getContextTypeLoader().newInstance(Ga.type, (XmlOptions)null); } - + + /** + * Creates a new Ga instance with specified XML processing options. + * + * @param options XmlOptions the XML processing options for schema validation and other features + * @return Ga a new empty Ga instance configured with the given options + */ public static Ga newInstance(final XmlOptions options) { return (Ga)XmlBeans.getContextTypeLoader().newInstance(Ga.type, options); } - + private Factory() { } } } - + + /** + * Factory class for creating and parsing UltrasoundType instances. + * + * Provides comprehensive static methods to create new UltrasoundType objects + * and parse XML content from various sources including strings, files, URLs, + * streams, readers, and DOM nodes. All parsing methods support optional + * XML processing options for schema validation and other XMLBeans features. + * + * @since 2026-01-23 + */ public static final class Factory { + /** + * Creates a new UltrasoundType instance with default XML processing options. + * + * @return UltrasoundType a new empty UltrasoundType instance + */ public static UltrasoundType newInstance() { return (UltrasoundType)XmlBeans.getContextTypeLoader().newInstance(UltrasoundType.type, (XmlOptions)null); } - + + /** + * Creates a new UltrasoundType instance with specified XML processing options. + * + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType a new empty UltrasoundType instance configured with the given options + */ public static UltrasoundType newInstance(final XmlOptions options) { return (UltrasoundType)XmlBeans.getContextTypeLoader().newInstance(UltrasoundType.type, options); } - + + /** + * Parses an XML string into an UltrasoundType instance with default options. + * + * @param xmlAsString String the XML content to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + */ public static UltrasoundType parse(final String xmlAsString) throws XmlException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(xmlAsString, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses an XML string into an UltrasoundType instance with specified options. + * + * @param xmlAsString String the XML content to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + */ public static UltrasoundType parse(final String xmlAsString, final XmlOptions options) throws XmlException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(xmlAsString, UltrasoundType.type, options); } - + + /** + * Parses an XML file into an UltrasoundType instance with default options. + * + * @param file File the file containing XML content to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error reading the file + */ public static UltrasoundType parse(final File file) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(file, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses an XML file into an UltrasoundType instance with specified options. + * + * @param file File the file containing XML content to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error reading the file + */ public static UltrasoundType parse(final File file, final XmlOptions options) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(file, UltrasoundType.type, options); } - + + /** + * Parses XML content from a URL into an UltrasoundType instance with default options. + * + * @param u URL the URL to fetch XML content from + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error fetching content from the URL + */ public static UltrasoundType parse(final URL u) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(u, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses XML content from a URL into an UltrasoundType instance with specified options. + * + * @param u URL the URL to fetch XML content from + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error fetching content from the URL + */ public static UltrasoundType parse(final URL u, final XmlOptions options) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(u, UltrasoundType.type, options); } - + + /** + * Parses XML content from an input stream into an UltrasoundType instance with default options. + * + * @param is InputStream the input stream containing XML content to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error reading from the input stream + */ public static UltrasoundType parse(final InputStream is) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(is, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses XML content from an input stream into an UltrasoundType instance with specified options. + * + * @param is InputStream the input stream containing XML content to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error reading from the input stream + */ public static UltrasoundType parse(final InputStream is, final XmlOptions options) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(is, UltrasoundType.type, options); } - + + /** + * Parses XML content from a reader into an UltrasoundType instance with default options. + * + * @param r Reader the reader containing XML content to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error reading from the reader + */ public static UltrasoundType parse(final Reader r) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(r, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses XML content from a reader into an UltrasoundType instance with specified options. + * + * @param r Reader the reader containing XML content to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws IOException if there is an error reading from the reader + */ public static UltrasoundType parse(final Reader r, final XmlOptions options) throws XmlException, IOException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(r, UltrasoundType.type, options); } - + + /** + * Parses XML content from an XMLStreamReader into an UltrasoundType instance with default options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + */ public static UltrasoundType parse(final XMLStreamReader sr) throws XmlException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(sr, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses XML content from an XMLStreamReader into an UltrasoundType instance with specified options. + * + * @param sr XMLStreamReader the stream reader positioned at the XML content to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + */ public static UltrasoundType parse(final XMLStreamReader sr, final XmlOptions options) throws XmlException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(sr, UltrasoundType.type, options); } - + + /** + * Parses XML content from a DOM node into an UltrasoundType instance with default options. + * + * @param node Node the DOM node containing XML content to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + */ public static UltrasoundType parse(final Node node) throws XmlException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(node, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses XML content from a DOM node into an UltrasoundType instance with specified options. + * + * @param node Node the DOM node containing XML content to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + */ public static UltrasoundType parse(final Node node, final XmlOptions options) throws XmlException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(node, UltrasoundType.type, options); } - + + /** + * Parses XML content from an XMLInputStream into an UltrasoundType instance with default options. + * + * @param xis XMLInputStream the XML input stream to parse + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws XMLStreamException if there is an error reading from the XML stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static UltrasoundType parse(final XMLInputStream xis) throws XmlException, XMLStreamException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(xis, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Parses XML content from an XMLInputStream into an UltrasoundType instance with specified options. + * + * @param xis XMLInputStream the XML input stream to parse + * @param options XmlOptions the XML processing options for schema validation and other features + * @return UltrasoundType the parsed UltrasoundType instance + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws XMLStreamException if there is an error reading from the XML stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static UltrasoundType parse(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return (UltrasoundType)XmlBeans.getContextTypeLoader().parse(xis, UltrasoundType.type, options); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with default options. + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws XMLStreamException if there is an error reading from the XML stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, UltrasoundType.type, (XmlOptions)null); } - + + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with specified options. + * + * @param xis XMLInputStream the XML input stream to wrap with validation + * @param options XmlOptions the XML processing options for schema validation and other features + * @return XMLInputStream a validating XML input stream + * @throws XmlException if the XML is invalid or does not conform to the schema + * @throws XMLStreamException if there is an error reading from the XML stream + * @deprecated XMLInputStream is deprecated in favor of XMLStreamReader + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(final XMLInputStream xis, final XmlOptions options) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(xis, UltrasoundType.type, options); } - + private Factory() { } } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/AR1Impl.java b/src/main/java/ca/openosp/openo/ar2005/impl/AR1Impl.java index ca4af9bdb75..72ed2025d11 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/AR1Impl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/AR1Impl.java @@ -20,6 +20,84 @@ import ca.openosp.openo.ar2005.AR1; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the AR1 (Antenatal Record 1) interface for British Columbia Antenatal Record (BCAR) forms. + * + * This class provides the concrete implementation of the AR1 interface, which represents the primary + * antenatal record form used in British Columbia healthcare facilities for comprehensive pregnancy + * care documentation. It extends Apache XMLBeans' XmlComplexContentImpl to provide XML binding + * capabilities for serialization, deserialization, and XML document manipulation. + * + *

    The AR1 form is a standardized medical form used throughout BC to ensure consistent, high-quality + * prenatal care documentation. This implementation handles the complete lifecycle of antenatal record + * data including:

    + * + *
      + *
    • Patient Demographics: Patient identification, contact information, and health insurance details
    • + *
    • Partner Information: Partner demographics and family history for genetic counseling
    • + *
    • Healthcare Providers: Primary care provider, obstetrician, and care team assignments
    • + *
    • Pregnancy Details: Current pregnancy information, estimated due date, and dating methods
    • + *
    • Obstetrical History: Previous pregnancies, deliveries, complications, and risk factors
    • + *
    • Medical History: Comprehensive medical history, medications, allergies, and physical examination
    • + *
    • Laboratory Results: Blood type, infectious disease screening, genetic testing, and prenatal labs
    • + *
    • Clinical Documentation: Provider notes, care plans, and ongoing clinical observations
    • + *
    • Regulatory Compliance: Provider signatures and audit trails for legal and compliance requirements
    • + *
    + * + *

    XML Binding Architecture:

    + *

    This implementation uses Apache XMLBeans for XML-to-Java binding. Each element in the AR1 XML schema + * is mapped to QName constants (e.g., ID$0, PATIENTINFORMATION$14) which are used to access and manipulate + * the underlying XML store. The implementation provides both strongly-typed methods (getId(), getPatientInformation()) + * and XML-aware methods (xgetId(), xsetId()) for flexible data access.

    + * + *

    Thread Safety:

    + *

    All accessor methods are synchronized on the XMLBeans monitor to ensure thread-safe access to the + * underlying XML document store. This prevents concurrent modification issues when multiple threads + * access the same AR1 form instance.

    + * + *

    Healthcare Data Protection:

    + *

    This class handles Protected Health Information (PHI) and must comply with PIPEDA privacy regulations + * for Canadian healthcare data. All form data is considered confidential patient information and must be + * handled with appropriate security measures including access controls, audit logging, and encryption + * during storage and transmission.

    + * + *

    Usage Example:

    + *
    {@code
    + * // Create new AR1 form
    + * AR1 ar1Form = AR1.Factory.newInstance();
    + *
    + * // Set basic identifiers
    + * ar1Form.setId(12345);
    + * ar1Form.setDemographicNo(67890);
    + * ar1Form.setProviderNo("P001");
    + * ar1Form.setFormCreated(Calendar.getInstance());
    + *
    + * // Add patient information
    + * PatientInformation patient = ar1Form.addNewPatientInformation();
    + * patient.setFirstName("Jane");
    + * patient.setLastName("Doe");
    + *
    + * // Add pregnancy history
    + * PregnancyHistory pregnancy = ar1Form.addNewPregnancyHistory();
    + * pregnancy.setEstimatedDueDate(Calendar.getInstance());
    + *
    + * // Serialize to XML
    + * String xmlString = ar1Form.xmlText();
    + * }
    + * + * @see AR1 + * @see PatientInformation + * @see PartnerInformation + * @see PractitionerInformation + * @see PregnancyHistory + * @see ObstetricalHistory + * @see MedicalHistoryAndPhysicalExam + * @see InitialLaboratoryInvestigations + * @see SignatureType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * + * @since 2026-01-24 + */ public class AR1Impl extends XmlComplexContentImpl implements AR1 { private static final long serialVersionUID = 1L; @@ -40,11 +118,29 @@ public class AR1Impl extends XmlComplexContentImpl implements AR1 private static final QName COMMENTS$28; private static final QName EXTRACOMMENTS$30; private static final QName SIGNATURES$32; - + + /** + * Constructs a new AR1Impl instance with the specified schema type. + * + * This constructor is called by the XMLBeans framework during XML parsing and object + * instantiation. It initializes the underlying XML complex content implementation with + * the AR1 schema type definition. + * + * @param sType SchemaType the XMLBeans schema type for AR1 elements + */ public AR1Impl(final SchemaType sType) { super(sType); } - + + /** + * Gets the unique identifier for this AR1 form record. + * + * This method retrieves the integer ID value from the underlying XML store. The ID uniquely + * identifies this antenatal record within the EMR system and is used for database persistence + * and record retrieval operations. + * + * @return int the unique form identifier, or 0 if not set + */ public int getId() { synchronized (this.monitor()) { this.check_orphaned(); @@ -56,7 +152,15 @@ public int getId() { return target.getIntValue(); } } - + + /** + * Gets the unique identifier as an XmlInt object for XML serialization. + * + * This method returns the ID as an XMLBeans XmlInt type, which preserves XML-specific + * metadata such as validation state and allows for more fine-grained XML manipulation. + * + * @return XmlInt the form identifier as XML integer type, or null if not set + */ public XmlInt xgetId() { synchronized (this.monitor()) { this.check_orphaned(); @@ -65,7 +169,15 @@ public XmlInt xgetId() { return target; } } - + + /** + * Sets the unique identifier for this AR1 form record. + * + * This method sets the integer ID value in the underlying XML store. If the ID element + * does not exist in the XML document, it will be created automatically. + * + * @param id int the unique form identifier to set + */ public void setId(final int id) { synchronized (this.monitor()) { this.check_orphaned(); @@ -77,7 +189,15 @@ public void setId(final int id) { target.setIntValue(id); } } - + + /** + * Sets the unique identifier using an XmlInt object for XML deserialization. + * + * This method sets the ID from an XMLBeans XmlInt type, which is typically used during + * XML deserialization or when copying XML elements between documents. + * + * @param id XmlInt the form identifier as XML integer type + */ public void xsetId(final XmlInt id) { synchronized (this.monitor()) { this.check_orphaned(); @@ -89,7 +209,16 @@ public void xsetId(final XmlInt id) { target.set((XmlObject)id); } } - + + /** + * Gets the version identifier for form revision tracking. + * + * This method retrieves the version ID which tracks different versions of the same AR1 + * record across edits. It enables version history tracking and supports concurrent editing + * scenarios where multiple healthcare providers may access the same patient record. + * + * @return int the version identifier, or 0 if not set + */ public int getVersionID() { synchronized (this.monitor()) { this.check_orphaned(); @@ -101,7 +230,12 @@ public int getVersionID() { return target.getIntValue(); } } - + + /** + * Gets the version identifier as an XmlInt object for XML serialization. + * + * @return XmlInt the version identifier as XML integer type, or null if not set + */ public XmlInt xgetVersionID() { synchronized (this.monitor()) { this.check_orphaned(); @@ -110,7 +244,15 @@ public XmlInt xgetVersionID() { return target; } } - + + /** + * Sets the version identifier for form revision tracking. + * + * This method should be incremented each time the AR1 form is edited to maintain + * an audit trail of changes and support optimistic locking for concurrent updates. + * + * @param versionID int the version identifier to set + */ public void setVersionID(final int versionID) { synchronized (this.monitor()) { this.check_orphaned(); @@ -122,7 +264,12 @@ public void setVersionID(final int versionID) { target.setIntValue(versionID); } } - + + /** + * Sets the version identifier using an XmlInt object for XML deserialization. + * + * @param versionID XmlInt the version identifier as XML integer type + */ public void xsetVersionID(final XmlInt versionID) { synchronized (this.monitor()) { this.check_orphaned(); @@ -134,7 +281,16 @@ public void xsetVersionID(final XmlInt versionID) { target.set((XmlObject)versionID); } } - + + /** + * Gets the episode identifier linking this form to a specific care episode. + * + * Episodes group related encounters, forms, and clinical data for continuity of care + * tracking. This allows healthcare providers to view all pregnancy-related documentation + * as part of a single care episode spanning the entire prenatal period. + * + * @return int the episode identifier, or 0 if not set + */ public int getEpisodeId() { synchronized (this.monitor()) { this.check_orphaned(); @@ -146,7 +302,12 @@ public int getEpisodeId() { return target.getIntValue(); } } - + + /** + * Gets the episode identifier as an XmlInt object for XML serialization. + * + * @return XmlInt the episode identifier as XML integer type, or null if not set + */ public XmlInt xgetEpisodeId() { synchronized (this.monitor()) { this.check_orphaned(); @@ -155,7 +316,12 @@ public XmlInt xgetEpisodeId() { return target; } } - + + /** + * Sets the episode identifier linking this form to a specific care episode. + * + * @param episodeId int the episode identifier to set + */ public void setEpisodeId(final int episodeId) { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +333,12 @@ public void setEpisodeId(final int episodeId) { target.setIntValue(episodeId); } } - + + /** + * Sets the episode identifier using an XmlInt object for XML deserialization. + * + * @param episodeId XmlInt the episode identifier as XML integer type + */ public void xsetEpisodeId(final XmlInt episodeId) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +350,16 @@ public void xsetEpisodeId(final XmlInt episodeId) { target.set((XmlObject)episodeId); } } - + + /** + * Gets the demographic number (patient identifier) for the pregnant patient. + * + * This method retrieves the patient's unique demographic identifier which links the + * antenatal record to the patient's master demographic information including name, + * date of birth, health insurance number, and contact details. + * + * @return int the patient's demographic number, or 0 if not set + */ public int getDemographicNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -191,7 +371,12 @@ public int getDemographicNo() { return target.getIntValue(); } } - + + /** + * Gets the demographic number as an XmlInt object for XML serialization. + * + * @return XmlInt the demographic number as XML integer type, or null if not set + */ public XmlInt xgetDemographicNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -200,7 +385,12 @@ public XmlInt xgetDemographicNo() { return target; } } - + + /** + * Sets the demographic number (patient identifier) for the pregnant patient. + * + * @param demographicNo int the patient's demographic number to set + */ public void setDemographicNo(final int demographicNo) { synchronized (this.monitor()) { this.check_orphaned(); @@ -212,7 +402,12 @@ public void setDemographicNo(final int demographicNo) { target.setIntValue(demographicNo); } } - + + /** + * Sets the demographic number using an XmlInt object for XML deserialization. + * + * @param demographicNo XmlInt the demographic number as XML integer type + */ public void xsetDemographicNo(final XmlInt demographicNo) { synchronized (this.monitor()) { this.check_orphaned(); @@ -224,7 +419,16 @@ public void xsetDemographicNo(final XmlInt demographicNo) { target.set((XmlObject)demographicNo); } } - + + /** + * Gets the provider number identifying the healthcare practitioner responsible for this record. + * + * The provider number is the unique identifier for the healthcare practitioner (physician, + * midwife, or nurse practitioner) who created or is primarily responsible for this antenatal + * record. This links the form to the provider's credentials and billing information. + * + * @return String the provider's unique identifier, or null if not set + */ public String getProviderNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -236,7 +440,12 @@ public String getProviderNo() { return target.getStringValue(); } } - + + /** + * Gets the provider number as an XmlString object for XML serialization. + * + * @return XmlString the provider number as XML string type, or null if not set + */ public XmlString xgetProviderNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -245,7 +454,12 @@ public XmlString xgetProviderNo() { return target; } } - + + /** + * Sets the provider number identifying the healthcare practitioner. + * + * @param providerNo String the provider's unique identifier to set + */ public void setProviderNo(final String providerNo) { synchronized (this.monitor()) { this.check_orphaned(); @@ -257,7 +471,12 @@ public void setProviderNo(final String providerNo) { target.setStringValue(providerNo); } } - + + /** + * Sets the provider number using an XmlString object for XML deserialization. + * + * @param providerNo XmlString the provider number as XML string type + */ public void xsetProviderNo(final XmlString providerNo) { synchronized (this.monitor()) { this.check_orphaned(); @@ -269,7 +488,16 @@ public void xsetProviderNo(final XmlString providerNo) { target.set((XmlObject)providerNo); } } - + + /** + * Gets the date and time when this AR1 form was originally created. + * + * This timestamp records when the antenatal record was first initiated in the system, + * providing an audit trail for form creation and supporting regulatory compliance + * requirements for medical record keeping. + * + * @return Calendar the form creation timestamp, or null if not set + */ public Calendar getFormCreated() { synchronized (this.monitor()) { this.check_orphaned(); @@ -281,7 +509,12 @@ public Calendar getFormCreated() { return target.getCalendarValue(); } } - + + /** + * Gets the form creation date as an XmlDate object for XML serialization. + * + * @return XmlDate the creation date as XML date type, or null if not set + */ public XmlDate xgetFormCreated() { synchronized (this.monitor()) { this.check_orphaned(); @@ -290,7 +523,12 @@ public XmlDate xgetFormCreated() { return target; } } - + + /** + * Sets the date and time when this AR1 form was originally created. + * + * @param formCreated Calendar the form creation timestamp to set + */ public void setFormCreated(final Calendar formCreated) { synchronized (this.monitor()) { this.check_orphaned(); @@ -302,7 +540,12 @@ public void setFormCreated(final Calendar formCreated) { target.setCalendarValue(formCreated); } } - + + /** + * Sets the form creation date using an XmlDate object for XML deserialization. + * + * @param formCreated XmlDate the creation date as XML date type + */ public void xsetFormCreated(final XmlDate formCreated) { synchronized (this.monitor()) { this.check_orphaned(); @@ -314,7 +557,16 @@ public void xsetFormCreated(final XmlDate formCreated) { target.set((XmlObject)formCreated); } } - + + /** + * Gets the date and time of the most recent edit to this AR1 form. + * + * This timestamp is updated each time the antenatal record is modified, providing + * an audit trail for form modifications and supporting regulatory compliance + * requirements. It enables tracking of when clinical information was last updated. + * + * @return Calendar the last edit timestamp, or null if the form has never been edited + */ public Calendar getFormEdited() { synchronized (this.monitor()) { this.check_orphaned(); @@ -326,7 +578,12 @@ public Calendar getFormEdited() { return target.getCalendarValue(); } } - + + /** + * Gets the last edit timestamp as an XmlDateTime object for XML serialization. + * + * @return XmlDateTime the edit timestamp as XML datetime type, or null if not set + */ public XmlDateTime xgetFormEdited() { synchronized (this.monitor()) { this.check_orphaned(); @@ -335,7 +592,12 @@ public XmlDateTime xgetFormEdited() { return target; } } - + + /** + * Sets the date and time of the most recent edit to this AR1 form. + * + * @param formEdited Calendar the last edit timestamp to set + */ public void setFormEdited(final Calendar formEdited) { synchronized (this.monitor()) { this.check_orphaned(); @@ -347,7 +609,12 @@ public void setFormEdited(final Calendar formEdited) { target.setCalendarValue(formEdited); } } - + + /** + * Sets the last edit timestamp using an XmlDateTime object for XML deserialization. + * + * @param formEdited XmlDateTime the edit timestamp as XML datetime type + */ public void xsetFormEdited(final XmlDateTime formEdited) { synchronized (this.monitor()) { this.check_orphaned(); @@ -359,7 +626,17 @@ public void xsetFormEdited(final XmlDateTime formEdited) { target.set((XmlObject)formEdited); } } - + + /** + * Gets the patient information section containing demographic and contact details. + * + * This section includes the pregnant patient's complete demographic information such as + * name, date of birth, address, phone numbers, emergency contacts, and other identifying + * information required for the antenatal record. This is Protected Health Information (PHI) + * and must be handled in compliance with PIPEDA privacy regulations. + * + * @return PatientInformation the patient information section, or null if not set + */ public PatientInformation getPatientInformation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -371,7 +648,12 @@ public PatientInformation getPatientInformation() { return target; } } - + + /** + * Sets the patient information section. + * + * @param patientInformation PatientInformation the patient information section to set + */ public void setPatientInformation(final PatientInformation patientInformation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -383,7 +665,16 @@ public void setPatientInformation(final PatientInformation patientInformation) { target.set((XmlObject)patientInformation); } } - + + /** + * Creates and adds a new patient information section to this AR1 form. + * + * This method creates a new empty PatientInformation object, adds it to the XML document, + * and returns it for population with patient demographic data. Use this method when + * initially creating an AR1 form or when the patient information section needs to be replaced. + * + * @return PatientInformation the newly created patient information section + */ public PatientInformation addNewPatientInformation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -392,7 +683,16 @@ public PatientInformation addNewPatientInformation() { return target; } } - + + /** + * Gets the partner information section containing details about the patient's partner. + * + * This section includes the partner's name, contact information, and relevant family history + * for genetic counseling and support planning. Partner information is important for + * identifying genetic risk factors and planning family-centered care during pregnancy. + * + * @return PartnerInformation the partner information section, or null if not set + */ public PartnerInformation getPartnerInformation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -404,7 +704,12 @@ public PartnerInformation getPartnerInformation() { return target; } } - + + /** + * Sets the partner information section. + * + * @param partnerInformation PartnerInformation the partner information section to set + */ public void setPartnerInformation(final PartnerInformation partnerInformation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -416,7 +721,15 @@ public void setPartnerInformation(final PartnerInformation partnerInformation) { target.set((XmlObject)partnerInformation); } } - + + /** + * Creates and adds a new partner information section to this AR1 form. + * + * This method creates a new empty PartnerInformation object and adds it to the form + * for subsequent population with partner demographic and family history data. + * + * @return PartnerInformation the newly created partner information section + */ public PartnerInformation addNewPartnerInformation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -425,7 +738,16 @@ public PartnerInformation addNewPartnerInformation() { return target; } } - + + /** + * Gets the practitioner information section containing healthcare provider details. + * + * This section includes information about the primary care provider, obstetrician, + * and other healthcare professionals involved in the patient's antenatal care. + * It supports care coordination by documenting all members of the prenatal care team. + * + * @return PractitionerInformation the practitioner information section, or null if not set + */ public PractitionerInformation getPractitionerInformation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -437,7 +759,12 @@ public PractitionerInformation getPractitionerInformation() { return target; } } - + + /** + * Sets the practitioner information section. + * + * @param practitionerInformation PractitionerInformation the practitioner information section to set + */ public void setPractitionerInformation(final PractitionerInformation practitionerInformation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -449,7 +776,15 @@ public void setPractitionerInformation(final PractitionerInformation practitione target.set((XmlObject)practitionerInformation); } } - + + /** + * Creates and adds a new practitioner information section to this AR1 form. + * + * This method creates a new empty PractitionerInformation object for documenting + * the healthcare providers involved in the patient's prenatal care. + * + * @return PractitionerInformation the newly created practitioner information section + */ public PractitionerInformation addNewPractitionerInformation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -458,7 +793,16 @@ public PractitionerInformation addNewPractitionerInformation() { return target; } } - + + /** + * Gets the pregnancy history section containing information about the current pregnancy. + * + * This section includes estimated due date, dating methods (LMP, ultrasound), pregnancy + * symptoms, and current pregnancy progression details. It is essential for tracking + * the timeline and development of the current pregnancy. + * + * @return PregnancyHistory the pregnancy history section, or null if not set + */ public PregnancyHistory getPregnancyHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -470,7 +814,12 @@ public PregnancyHistory getPregnancyHistory() { return target; } } - + + /** + * Sets the pregnancy history section. + * + * @param pregnancyHistory PregnancyHistory the pregnancy history section to set + */ public void setPregnancyHistory(final PregnancyHistory pregnancyHistory) { synchronized (this.monitor()) { this.check_orphaned(); @@ -482,7 +831,15 @@ public void setPregnancyHistory(final PregnancyHistory pregnancyHistory) { target.set((XmlObject)pregnancyHistory); } } - + + /** + * Creates and adds a new pregnancy history section to this AR1 form. + * + * This method creates a new empty PregnancyHistory object for documenting the + * current pregnancy timeline, symptoms, and progression. + * + * @return PregnancyHistory the newly created pregnancy history section + */ public PregnancyHistory addNewPregnancyHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -491,7 +848,16 @@ public PregnancyHistory addNewPregnancyHistory() { return target; } } - + + /** + * Gets the obstetrical history section containing past pregnancy and delivery records. + * + * This section includes gravida/para status, previous pregnancy outcomes, complications, + * delivery methods, birth weights, and other historical obstetrical information. This + * data is critical for risk assessment and planning appropriate care for the current pregnancy. + * + * @return ObstetricalHistory the obstetrical history section, or null if not set + */ public ObstetricalHistory getObstetricalHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -503,7 +869,12 @@ public ObstetricalHistory getObstetricalHistory() { return target; } } - + + /** + * Sets the obstetrical history section. + * + * @param obstetricalHistory ObstetricalHistory the obstetrical history section to set + */ public void setObstetricalHistory(final ObstetricalHistory obstetricalHistory) { synchronized (this.monitor()) { this.check_orphaned(); @@ -515,7 +886,15 @@ public void setObstetricalHistory(final ObstetricalHistory obstetricalHistory) { target.set((XmlObject)obstetricalHistory); } } - + + /** + * Creates and adds a new obstetrical history section to this AR1 form. + * + * This method creates a new empty ObstetricalHistory object for documenting + * previous pregnancies, deliveries, and obstetrical outcomes. + * + * @return ObstetricalHistory the newly created obstetrical history section + */ public ObstetricalHistory addNewObstetricalHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -524,7 +903,17 @@ public ObstetricalHistory addNewObstetricalHistory() { return target; } } - + + /** + * Gets the medical history and physical examination section. + * + * This section includes comprehensive medical history, current medications, allergies, + * family history of genetic conditions, physical examination findings, and baseline + * vital signs. This comprehensive medical assessment forms the foundation for + * pregnancy care planning and risk stratification. + * + * @return MedicalHistoryAndPhysicalExam the medical history and physical exam section, or null if not set + */ public MedicalHistoryAndPhysicalExam getMedicalHistoryAndPhysicalExam() { synchronized (this.monitor()) { this.check_orphaned(); @@ -536,7 +925,12 @@ public MedicalHistoryAndPhysicalExam getMedicalHistoryAndPhysicalExam() { return target; } } - + + /** + * Sets the medical history and physical examination section. + * + * @param medicalHistoryAndPhysicalExam MedicalHistoryAndPhysicalExam the medical history and physical exam section to set + */ public void setMedicalHistoryAndPhysicalExam(final MedicalHistoryAndPhysicalExam medicalHistoryAndPhysicalExam) { synchronized (this.monitor()) { this.check_orphaned(); @@ -548,7 +942,15 @@ public void setMedicalHistoryAndPhysicalExam(final MedicalHistoryAndPhysicalExam target.set((XmlObject)medicalHistoryAndPhysicalExam); } } - + + /** + * Creates and adds a new medical history and physical examination section to this AR1 form. + * + * This method creates a new empty MedicalHistoryAndPhysicalExam object for documenting + * the patient's medical background and baseline physical assessment. + * + * @return MedicalHistoryAndPhysicalExam the newly created medical history and physical exam section + */ public MedicalHistoryAndPhysicalExam addNewMedicalHistoryAndPhysicalExam() { synchronized (this.monitor()) { this.check_orphaned(); @@ -557,7 +959,17 @@ public MedicalHistoryAndPhysicalExam addNewMedicalHistoryAndPhysicalExam() { return target; } } - + + /** + * Gets the initial laboratory investigations section containing baseline test results. + * + * This section includes blood type, Rh factor, antibody screens, infectious disease + * screening (rubella, hepatitis, HIV, syphilis), genetic testing results, and other + * routine prenatal laboratory investigations. These baseline tests are essential for + * identifying risk factors and planning appropriate prenatal care. + * + * @return InitialLaboratoryInvestigations the initial laboratory investigations section, or null if not set + */ public InitialLaboratoryInvestigations getInitialLaboratoryInvestigations() { synchronized (this.monitor()) { this.check_orphaned(); @@ -569,7 +981,12 @@ public InitialLaboratoryInvestigations getInitialLaboratoryInvestigations() { return target; } } - + + /** + * Sets the initial laboratory investigations section. + * + * @param initialLaboratoryInvestigations InitialLaboratoryInvestigations the initial laboratory investigations section to set + */ public void setInitialLaboratoryInvestigations(final InitialLaboratoryInvestigations initialLaboratoryInvestigations) { synchronized (this.monitor()) { this.check_orphaned(); @@ -581,7 +998,15 @@ public void setInitialLaboratoryInvestigations(final InitialLaboratoryInvestigat target.set((XmlObject)initialLaboratoryInvestigations); } } - + + /** + * Creates and adds a new initial laboratory investigations section to this AR1 form. + * + * This method creates a new empty InitialLaboratoryInvestigations object for documenting + * baseline prenatal laboratory test results. + * + * @return InitialLaboratoryInvestigations the newly created initial laboratory investigations section + */ public InitialLaboratoryInvestigations addNewInitialLaboratoryInvestigations() { synchronized (this.monitor()) { this.check_orphaned(); @@ -590,7 +1015,17 @@ public InitialLaboratoryInvestigations addNewInitialLaboratoryInvestigations() { return target; } } - + + /** + * Gets the primary comments field for clinical notes and observations. + * + * This field is used for documenting additional clinical information, care plans, + * provider observations, and other notes relevant to the patient's antenatal care. + * It provides a free-text area for healthcare providers to record information that + * doesn't fit into the structured sections of the form. + * + * @return String the clinical comments text, or null if not set + */ public String getComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -602,7 +1037,12 @@ public String getComments() { return target.getStringValue(); } } - + + /** + * Gets the comments as an XmlString object for XML serialization. + * + * @return XmlString the comments as XML string type, or null if not set + */ public XmlString xgetComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -611,7 +1051,12 @@ public XmlString xgetComments() { return target; } } - + + /** + * Sets the primary comments field for clinical notes. + * + * @param comments String the clinical comments text to set + */ public void setComments(final String comments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -623,7 +1068,12 @@ public void setComments(final String comments) { target.setStringValue(comments); } } - + + /** + * Sets the comments using an XmlString object for XML deserialization. + * + * @param comments XmlString the comments as XML string type + */ public void xsetComments(final XmlString comments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -635,7 +1085,17 @@ public void xsetComments(final XmlString comments) { target.set((XmlObject)comments); } } - + + /** + * Gets the extra comments field for supplementary clinical documentation. + * + * This field provides additional space for extended notes beyond the primary comments + * section when more detailed documentation is required. It can be used for documenting + * complex clinical situations, detailed care plans, or additional observations that + * require more space than the primary comments field provides. + * + * @return String the extra comments text, or null if not set + */ public String getExtraComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -647,7 +1107,12 @@ public String getExtraComments() { return target.getStringValue(); } } - + + /** + * Gets the extra comments as an XmlString object for XML serialization. + * + * @return XmlString the extra comments as XML string type, or null if not set + */ public XmlString xgetExtraComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -656,7 +1121,12 @@ public XmlString xgetExtraComments() { return target; } } - + + /** + * Sets the extra comments field for supplementary documentation. + * + * @param extraComments String the extra comments text to set + */ public void setExtraComments(final String extraComments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -668,7 +1138,12 @@ public void setExtraComments(final String extraComments) { target.setStringValue(extraComments); } } - + + /** + * Sets the extra comments using an XmlString object for XML deserialization. + * + * @param extraComments XmlString the extra comments as XML string type + */ public void xsetExtraComments(final XmlString extraComments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -680,7 +1155,18 @@ public void xsetExtraComments(final XmlString extraComments) { target.set((XmlObject)extraComments); } } - + + /** + * Gets the signatures section containing provider signatures for regulatory compliance. + * + * This section includes electronic or digital signatures from healthcare providers who + * reviewed and approved the antenatal record. Provider signatures are required for + * regulatory compliance and provide an audit trail of who created and reviewed the + * clinical documentation. Signatures verify the authenticity and accuracy of the + * documented information. + * + * @return SignatureType the signatures section, or null if not set + */ public SignatureType getSignatures() { synchronized (this.monitor()) { this.check_orphaned(); @@ -692,7 +1178,12 @@ public SignatureType getSignatures() { return target; } } - + + /** + * Sets the signatures section. + * + * @param signatures SignatureType the signatures section to set + */ public void setSignatures(final SignatureType signatures) { synchronized (this.monitor()) { this.check_orphaned(); @@ -704,7 +1195,15 @@ public void setSignatures(final SignatureType signatures) { target.set((XmlObject)signatures); } } - + + /** + * Creates and adds a new signatures section to this AR1 form. + * + * This method creates a new empty SignatureType object for collecting provider + * signatures and approvals for the antenatal record. + * + * @return SignatureType the newly created signatures section + */ public SignatureType addNewSignatures() { synchronized (this.monitor()) { this.check_orphaned(); @@ -713,7 +1212,7 @@ public SignatureType addNewSignatures() { return target; } } - + static { ID$0 = new QName("http://www.oscarmcmaster.org/AR2005", "id"); VERSIONID$2 = new QName("http://www.oscarmcmaster.org/AR2005", "VersionID"); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/AR2Impl.java b/src/main/java/ca/openosp/openo/ar2005/impl/AR2Impl.java index 009da4875ac..17663c99c1f 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/AR2Impl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/AR2Impl.java @@ -15,6 +15,45 @@ import ca.openosp.openo.ar2005.AR2; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for the AR2 (Antenatal Record 2005) medical form. + * + * This class provides the XMLBeans implementation for managing antenatal care records, + * which are critical healthcare documents used during pregnancy care in Canadian healthcare + * settings. The AR2005 form captures comprehensive pregnancy-related information including + * risk factors, recommended immunizations, subsequent visit tracking, ultrasound results, + * additional laboratory investigations, discussion topics with patients, and healthcare + * provider signatures. + * + * This implementation extends {@link XmlComplexContentImpl} to leverage Apache XMLBeans + * framework for XML serialization and deserialization of antenatal record data. It provides + * thread-safe access to all form elements through synchronized methods that interact with + * the underlying XML store. + * + * The class manages seven primary data categories: + *
      + *
    • Risk Factor Lists - Array of pregnancy-related risk factors
    • + *
    • Recommended Immunoprophylaxis - Vaccination recommendations for pregnancy
    • + *
    • Subsequent Visit Lists - Array of follow-up visit records
    • + *
    • Ultrasound - Array of ultrasound examination results
    • + *
    • Additional Lab Investigations - Supplementary laboratory test information
    • + *
    • Discussion Topics - Patient education and counseling topics covered
    • + *
    • Signatures - Healthcare provider signature information for audit compliance
    • + *
    + * + * All data access methods are synchronized to ensure thread-safety when multiple + * healthcare providers may be accessing or updating the same antenatal record. + * + * @see AR2 + * @see RiskFactorItemType + * @see RecommendedImmunoprophylaxisType + * @see SubsequentVisitItemType + * @see UltrasoundType + * @see AdditionalLabInvestigationsType + * @see DiscussionTopicsType + * @see SignatureType + * @since 2026-01-24 + */ public class AR2Impl extends XmlComplexContentImpl implements AR2 { private static final long serialVersionUID = 1L; @@ -25,11 +64,31 @@ public class AR2Impl extends XmlComplexContentImpl implements AR2 private static final QName ADDITIONALLABINVESTIGATIONS$8; private static final QName DISCUSSIONTOPICS$10; private static final QName SIGNATURES$12; - + + /** + * Constructs a new AR2Impl instance with the specified schema type. + * + * This constructor initializes the XMLBeans implementation for the AR2005 + * antenatal record form by delegating to the parent XmlComplexContentImpl + * constructor with the provided schema type definition. + * + * @param sType SchemaType the XMLBeans schema type definition for this AR2 document + */ public AR2Impl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves all risk factor items from the antenatal record. + * + * This method returns an array of all pregnancy-related risk factors documented + * in the AR2005 form. Risk factors may include medical history, current pregnancy + * complications, genetic factors, or other clinical concerns relevant to pregnancy care. + * + * The method is thread-safe and uses synchronized access to the underlying XML store. + * + * @return RiskFactorItemType[] array of risk factor items, or empty array if none exist + */ public RiskFactorItemType[] getRiskFactorListArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -40,7 +99,17 @@ public RiskFactorItemType[] getRiskFactorListArray() { return result; } } - + + /** + * Retrieves a specific risk factor item by index from the antenatal record. + * + * This method provides indexed access to individual risk factor items in the + * pregnancy risk assessment list. + * + * @param i int the zero-based index of the risk factor item to retrieve + * @return RiskFactorItemType the risk factor item at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public RiskFactorItemType getRiskFactorListArray(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -52,21 +121,47 @@ public RiskFactorItemType getRiskFactorListArray(final int i) { return target; } } - + + /** + * Returns the number of risk factor items in the antenatal record. + * + * This method provides a count of all documented pregnancy risk factors, + * which is useful for iteration and validation purposes. + * + * @return int the count of risk factor items + */ public int sizeOfRiskFactorListArray() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(AR2Impl.RISKFACTORLIST$0); } } - + + /** + * Replaces all risk factor items with a new array of risk factors. + * + * This method completely replaces the existing risk factor list with the + * provided array, removing all previous risk factor entries. + * + * @param riskFactorListArray RiskFactorItemType[] the new array of risk factor items + */ public void setRiskFactorListArray(final RiskFactorItemType[] riskFactorListArray) { synchronized (this.monitor()) { this.check_orphaned(); this.arraySetterHelper((XmlObject[])riskFactorListArray, AR2Impl.RISKFACTORLIST$0); } } - + + /** + * Updates a specific risk factor item at the given index. + * + * This method replaces an existing risk factor item at the specified position + * with a new risk factor item, maintaining the order of other items. + * + * @param i int the zero-based index of the risk factor item to update + * @param riskFactorList RiskFactorItemType the new risk factor item to set at the index + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setRiskFactorListArray(final int i, final RiskFactorItemType riskFactorList) { synchronized (this.monitor()) { this.check_orphaned(); @@ -78,7 +173,17 @@ public void setRiskFactorListArray(final int i, final RiskFactorItemType riskFac target.set((XmlObject)riskFactorList); } } - + + /** + * Inserts a new risk factor item at the specified index. + * + * This method creates and inserts a new risk factor item at the given position, + * shifting subsequent items to higher indices. The new item is initialized but + * empty and must be populated by the caller. + * + * @param i int the zero-based index at which to insert the new risk factor item + * @return RiskFactorItemType the newly created risk factor item ready for population + */ public RiskFactorItemType insertNewRiskFactorList(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +192,16 @@ public RiskFactorItemType insertNewRiskFactorList(final int i) { return target; } } - + + /** + * Adds a new risk factor item to the end of the risk factor list. + * + * This method appends a new risk factor item after all existing items in the + * antenatal record. The new item is initialized but empty and must be populated + * by the caller with specific risk factor details. + * + * @return RiskFactorItemType the newly created risk factor item ready for population + */ public RiskFactorItemType addNewRiskFactorList() { synchronized (this.monitor()) { this.check_orphaned(); @@ -96,14 +210,32 @@ public RiskFactorItemType addNewRiskFactorList() { return target; } } - + + /** + * Removes a risk factor item at the specified index. + * + * This method deletes the risk factor item at the given position from the + * antenatal record, shifting subsequent items to lower indices. + * + * @param i int the zero-based index of the risk factor item to remove + */ public void removeRiskFactorList(final int i) { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(AR2Impl.RISKFACTORLIST$0, i); } } - + + /** + * Retrieves the recommended immunoprophylaxis information for the pregnancy. + * + * This method returns the vaccination and immunization recommendations documented + * for the pregnant patient, including recommendations for vaccines such as influenza, + * Tdap (tetanus, diphtheria, pertussis), and other pregnancy-appropriate immunizations + * as per Canadian healthcare guidelines. + * + * @return RecommendedImmunoprophylaxisType the immunoprophylaxis recommendations, or null if not set + */ public RecommendedImmunoprophylaxisType getRecommendedImmunoprophylaxis() { synchronized (this.monitor()) { this.check_orphaned(); @@ -115,7 +247,15 @@ public RecommendedImmunoprophylaxisType getRecommendedImmunoprophylaxis() { return target; } } - + + /** + * Sets the recommended immunoprophylaxis information for the pregnancy. + * + * This method updates or creates the immunization recommendations section of the + * antenatal record with new vaccination guidance for the pregnant patient. + * + * @param recommendedImmunoprophylaxis RecommendedImmunoprophylaxisType the immunoprophylaxis recommendations to set + */ public void setRecommendedImmunoprophylaxis(final RecommendedImmunoprophylaxisType recommendedImmunoprophylaxis) { synchronized (this.monitor()) { this.check_orphaned(); @@ -127,7 +267,15 @@ public void setRecommendedImmunoprophylaxis(final RecommendedImmunoprophylaxisTy target.set((XmlObject)recommendedImmunoprophylaxis); } } - + + /** + * Creates and adds a new recommended immunoprophylaxis element to the antenatal record. + * + * This method initializes a new immunoprophylaxis recommendations section that can + * be populated with pregnancy-specific vaccination guidance. + * + * @return RecommendedImmunoprophylaxisType the newly created immunoprophylaxis element ready for population + */ public RecommendedImmunoprophylaxisType addNewRecommendedImmunoprophylaxis() { synchronized (this.monitor()) { this.check_orphaned(); @@ -136,7 +284,16 @@ public RecommendedImmunoprophylaxisType addNewRecommendedImmunoprophylaxis() { return target; } } - + + /** + * Retrieves all subsequent visit records from the antenatal care plan. + * + * This method returns an array of all follow-up prenatal visits documented in + * the AR2005 form. Each visit entry typically includes date, gestational age, + * vital signs, fetal assessment, and clinical notes from that visit. + * + * @return SubsequentVisitItemType[] array of subsequent visit items, or empty array if none exist + */ public SubsequentVisitItemType[] getSubsequentVisitListArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -147,7 +304,17 @@ public SubsequentVisitItemType[] getSubsequentVisitListArray() { return result; } } - + + /** + * Retrieves a specific subsequent visit record by index. + * + * This method provides indexed access to individual prenatal follow-up visit + * records in chronological order. + * + * @param i int the zero-based index of the subsequent visit item to retrieve + * @return SubsequentVisitItemType the subsequent visit item at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public SubsequentVisitItemType getSubsequentVisitListArray(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -159,21 +326,47 @@ public SubsequentVisitItemType getSubsequentVisitListArray(final int i) { return target; } } - + + /** + * Returns the number of subsequent visit records in the antenatal care plan. + * + * This method provides a count of all documented prenatal follow-up visits, + * which is useful for tracking the frequency of antenatal care. + * + * @return int the count of subsequent visit items + */ public int sizeOfSubsequentVisitListArray() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(AR2Impl.SUBSEQUENTVISITLIST$4); } } - + + /** + * Replaces all subsequent visit records with a new array of visit entries. + * + * This method completely replaces the existing subsequent visit list with the + * provided array, removing all previous visit records. + * + * @param subsequentVisitListArray SubsequentVisitItemType[] the new array of subsequent visit items + */ public void setSubsequentVisitListArray(final SubsequentVisitItemType[] subsequentVisitListArray) { synchronized (this.monitor()) { this.check_orphaned(); this.arraySetterHelper((XmlObject[])subsequentVisitListArray, AR2Impl.SUBSEQUENTVISITLIST$4); } } - + + /** + * Updates a specific subsequent visit record at the given index. + * + * This method replaces an existing prenatal visit record at the specified position + * with updated visit information. + * + * @param i int the zero-based index of the subsequent visit item to update + * @param subsequentVisitList SubsequentVisitItemType the new subsequent visit item to set at the index + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setSubsequentVisitListArray(final int i, final SubsequentVisitItemType subsequentVisitList) { synchronized (this.monitor()) { this.check_orphaned(); @@ -185,7 +378,16 @@ public void setSubsequentVisitListArray(final int i, final SubsequentVisitItemTy target.set((XmlObject)subsequentVisitList); } } - + + /** + * Inserts a new subsequent visit record at the specified index. + * + * This method creates and inserts a new prenatal visit record at the given position, + * shifting subsequent items to higher indices. + * + * @param i int the zero-based index at which to insert the new subsequent visit item + * @return SubsequentVisitItemType the newly created subsequent visit item ready for population + */ public SubsequentVisitItemType insertNewSubsequentVisitList(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -194,7 +396,15 @@ public SubsequentVisitItemType insertNewSubsequentVisitList(final int i) { return target; } } - + + /** + * Adds a new subsequent visit record to the end of the visit list. + * + * This method appends a new prenatal visit record after all existing visits, + * typically used when documenting a new follow-up appointment. + * + * @return SubsequentVisitItemType the newly created subsequent visit item ready for population + */ public SubsequentVisitItemType addNewSubsequentVisitList() { synchronized (this.monitor()) { this.check_orphaned(); @@ -203,14 +413,32 @@ public SubsequentVisitItemType addNewSubsequentVisitList() { return target; } } - + + /** + * Removes a subsequent visit record at the specified index. + * + * This method deletes the prenatal visit record at the given position, + * shifting subsequent items to lower indices. + * + * @param i int the zero-based index of the subsequent visit item to remove + */ public void removeSubsequentVisitList(final int i) { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(AR2Impl.SUBSEQUENTVISITLIST$4, i); } } - + + /** + * Retrieves all ultrasound examination records from the antenatal record. + * + * This method returns an array of all prenatal ultrasound results documented + * in the AR2005 form. Ultrasound records typically include dating scans, + * anatomy surveys, growth assessments, and other diagnostic imaging performed + * during pregnancy. + * + * @return UltrasoundType[] array of ultrasound items, or empty array if none exist + */ public UltrasoundType[] getUltrasoundArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -221,7 +449,17 @@ public UltrasoundType[] getUltrasoundArray() { return result; } } - + + /** + * Retrieves a specific ultrasound examination record by index. + * + * This method provides indexed access to individual prenatal ultrasound + * examination results. + * + * @param i int the zero-based index of the ultrasound item to retrieve + * @return UltrasoundType the ultrasound item at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public UltrasoundType getUltrasoundArray(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -233,21 +471,46 @@ public UltrasoundType getUltrasoundArray(final int i) { return target; } } - + + /** + * Returns the number of ultrasound examination records in the antenatal record. + * + * This method provides a count of all documented prenatal ultrasound examinations. + * + * @return int the count of ultrasound items + */ public int sizeOfUltrasoundArray() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(AR2Impl.ULTRASOUND$6); } } - + + /** + * Replaces all ultrasound examination records with a new array of results. + * + * This method completely replaces the existing ultrasound list with the + * provided array, removing all previous ultrasound records. + * + * @param ultrasoundArray UltrasoundType[] the new array of ultrasound items + */ public void setUltrasoundArray(final UltrasoundType[] ultrasoundArray) { synchronized (this.monitor()) { this.check_orphaned(); this.arraySetterHelper((XmlObject[])ultrasoundArray, AR2Impl.ULTRASOUND$6); } } - + + /** + * Updates a specific ultrasound examination record at the given index. + * + * This method replaces an existing ultrasound record at the specified position + * with updated examination results. + * + * @param i int the zero-based index of the ultrasound item to update + * @param ultrasound UltrasoundType the new ultrasound item to set at the index + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setUltrasoundArray(final int i, final UltrasoundType ultrasound) { synchronized (this.monitor()) { this.check_orphaned(); @@ -259,7 +522,16 @@ public void setUltrasoundArray(final int i, final UltrasoundType ultrasound) { target.set((XmlObject)ultrasound); } } - + + /** + * Inserts a new ultrasound examination record at the specified index. + * + * This method creates and inserts a new ultrasound record at the given position, + * shifting subsequent items to higher indices. + * + * @param i int the zero-based index at which to insert the new ultrasound item + * @return UltrasoundType the newly created ultrasound item ready for population + */ public UltrasoundType insertNewUltrasound(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -268,7 +540,15 @@ public UltrasoundType insertNewUltrasound(final int i) { return target; } } - + + /** + * Adds a new ultrasound examination record to the end of the ultrasound list. + * + * This method appends a new ultrasound record after all existing examinations, + * typically used when documenting a new prenatal ultrasound scan. + * + * @return UltrasoundType the newly created ultrasound item ready for population + */ public UltrasoundType addNewUltrasound() { synchronized (this.monitor()) { this.check_orphaned(); @@ -277,14 +557,32 @@ public UltrasoundType addNewUltrasound() { return target; } } - + + /** + * Removes an ultrasound examination record at the specified index. + * + * This method deletes the ultrasound record at the given position, + * shifting subsequent items to lower indices. + * + * @param i int the zero-based index of the ultrasound item to remove + */ public void removeUltrasound(final int i) { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(AR2Impl.ULTRASOUND$6, i); } } - + + /** + * Retrieves the additional laboratory investigations information from the antenatal record. + * + * This method returns supplementary laboratory test information beyond the standard + * prenatal screening panel. Additional investigations may include specialized tests + * ordered based on specific maternal risk factors, abnormal findings, or clinical + * indications during pregnancy care. + * + * @return AdditionalLabInvestigationsType the additional lab investigations, or null if not set + */ public AdditionalLabInvestigationsType getAdditionalLabInvestigations() { synchronized (this.monitor()) { this.check_orphaned(); @@ -296,7 +594,15 @@ public AdditionalLabInvestigationsType getAdditionalLabInvestigations() { return target; } } - + + /** + * Sets the additional laboratory investigations information for the antenatal record. + * + * This method updates or creates the supplementary lab investigations section + * with new test information ordered for this pregnancy. + * + * @param additionalLabInvestigations AdditionalLabInvestigationsType the additional lab investigations to set + */ public void setAdditionalLabInvestigations(final AdditionalLabInvestigationsType additionalLabInvestigations) { synchronized (this.monitor()) { this.check_orphaned(); @@ -308,7 +614,15 @@ public void setAdditionalLabInvestigations(final AdditionalLabInvestigationsType target.set((XmlObject)additionalLabInvestigations); } } - + + /** + * Creates and adds a new additional laboratory investigations element to the antenatal record. + * + * This method initializes a new supplementary lab investigations section that can + * be populated with specialized test orders and results. + * + * @return AdditionalLabInvestigationsType the newly created additional lab investigations element ready for population + */ public AdditionalLabInvestigationsType addNewAdditionalLabInvestigations() { synchronized (this.monitor()) { this.check_orphaned(); @@ -317,7 +631,17 @@ public AdditionalLabInvestigationsType addNewAdditionalLabInvestigations() { return target; } } - + + /** + * Retrieves the discussion topics information from the antenatal record. + * + * This method returns the patient education and counseling topics that have been + * discussed during prenatal care. Topics typically include nutrition, exercise, + * warning signs, labor preparation, breastfeeding, postpartum care, and other + * important pregnancy-related subjects for patient education and informed consent. + * + * @return DiscussionTopicsType the discussion topics, or null if not set + */ public DiscussionTopicsType getDiscussionTopics() { synchronized (this.monitor()) { this.check_orphaned(); @@ -329,7 +653,15 @@ public DiscussionTopicsType getDiscussionTopics() { return target; } } - + + /** + * Sets the discussion topics information for the antenatal record. + * + * This method updates or creates the patient education section with new + * discussion topics covered during prenatal counseling sessions. + * + * @param discussionTopics DiscussionTopicsType the discussion topics to set + */ public void setDiscussionTopics(final DiscussionTopicsType discussionTopics) { synchronized (this.monitor()) { this.check_orphaned(); @@ -341,7 +673,15 @@ public void setDiscussionTopics(final DiscussionTopicsType discussionTopics) { target.set((XmlObject)discussionTopics); } } - + + /** + * Creates and adds a new discussion topics element to the antenatal record. + * + * This method initializes a new patient education section that can be + * populated with topics covered during prenatal counseling. + * + * @return DiscussionTopicsType the newly created discussion topics element ready for population + */ public DiscussionTopicsType addNewDiscussionTopics() { synchronized (this.monitor()) { this.check_orphaned(); @@ -350,7 +690,18 @@ public DiscussionTopicsType addNewDiscussionTopics() { return target; } } - + + /** + * Retrieves the signature information from the antenatal record. + * + * This method returns the healthcare provider signature data documenting the + * clinicians who have contributed to the antenatal care. Signatures are essential + * for audit trails, regulatory compliance, and medicolegal documentation in + * Canadian healthcare settings. The signature section typically includes provider + * identification, credentials, and attestation of care provided. + * + * @return SignatureType the signature information, or null if not set + */ public SignatureType getSignatures() { synchronized (this.monitor()) { this.check_orphaned(); @@ -362,7 +713,16 @@ public SignatureType getSignatures() { return target; } } - + + /** + * Sets the signature information for the antenatal record. + * + * This method updates or creates the provider signature section with + * authentication and attestation information for regulatory compliance + * and audit trail purposes. + * + * @param signatures SignatureType the signature information to set + */ public void setSignatures(final SignatureType signatures) { synchronized (this.monitor()) { this.check_orphaned(); @@ -374,7 +734,16 @@ public void setSignatures(final SignatureType signatures) { target.set((XmlObject)signatures); } } - + + /** + * Creates and adds a new signature element to the antenatal record. + * + * This method initializes a new provider signature section that can be + * populated with healthcare provider authentication and attestation details + * for compliance and audit purposes. + * + * @return SignatureType the newly created signature element ready for population + */ public SignatureType addNewSignatures() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordDocumentImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordDocumentImpl.java index 979641cdb79..6b5a8407fbb 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordDocumentImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordDocumentImpl.java @@ -7,15 +7,50 @@ import ca.openosp.openo.ar2005.ARRecordDocument; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for the AR2005 (Antenatal Record 2005) document structure. + * + * This class provides XML Beans-based implementation for managing British Columbia + * Antenatal Record documents in OpenO EMR. The AR2005 format is used for tracking + * prenatal care information including patient demographics, medical history, and + * pregnancy-related clinical data. + * + * The implementation extends {@link XmlComplexContentImpl} to leverage XML Beans + * functionality for XML serialization and deserialization, providing thread-safe + * access to the underlying AR record data through synchronized methods. + * + * @see ARRecordDocument + * @see ARRecord + * @see ca.openosp.openo.ar2005 + * @since 2026-01-24 + */ public class ARRecordDocumentImpl extends XmlComplexContentImpl implements ARRecordDocument { private static final long serialVersionUID = 1L; private static final QName ARRECORD$0; - + + /** + * Constructs a new ARRecordDocument implementation with the specified schema type. + * + * This constructor initializes the XML Beans complex content implementation + * with the AR2005 schema type definition, setting up the internal XML store + * for managing antenatal record data. + * + * @param sType SchemaType the XML schema type definition for AR2005 documents + */ public ARRecordDocumentImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the AR2005 antenatal record from this document. + * + * This method provides thread-safe access to the ARRecord element within + * the XML document structure. The method synchronizes on the internal + * monitor to ensure safe concurrent access to the underlying XML store. + * + * @return ARRecord the antenatal record data, or null if no record is present + */ public ARRecord getARRecord() { synchronized (this.monitor()) { this.check_orphaned(); @@ -27,7 +62,20 @@ public ARRecord getARRecord() { return target; } } - + + /** + * Sets or replaces the AR2005 antenatal record in this document. + * + * This method provides thread-safe modification of the ARRecord element + * within the XML document structure. If an ARRecord element already exists, + * it will be replaced with the provided record. If no element exists, a new + * one will be created and populated with the provided data. + * + * The method synchronizes on the internal monitor to ensure safe concurrent + * access when modifying the underlying XML store. + * + * @param arRecord ARRecord the antenatal record data to set in this document + */ public void setARRecord(final ARRecord arRecord) { synchronized (this.monitor()) { this.check_orphaned(); @@ -39,7 +87,19 @@ public void setARRecord(final ARRecord arRecord) { target.set((XmlObject)arRecord); } } - + + /** + * Creates and adds a new empty AR2005 antenatal record to this document. + * + * This method provides thread-safe creation of a new ARRecord element + * within the XML document structure. The newly created record will be + * empty and can be populated with antenatal care data after creation. + * + * The method synchronizes on the internal monitor to ensure safe concurrent + * access when adding the new element to the underlying XML store. + * + * @return ARRecord the newly created and added antenatal record element + */ public ARRecord addNewARRecord() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordImpl.java index 3e342583fce..21ba727dd45 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordImpl.java @@ -8,16 +8,57 @@ import ca.openosp.openo.ar2005.ARRecord; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for ARRecord XML schema type, providing access to BC Antenatal Record data. + * + *

    This class implements the ARRecord interface using Apache XMLBeans framework to handle + * XML serialization and deserialization of British Columbia Antenatal Record (BCAR) forms. + * It manages two primary elements: AR1 (patient demographics and pregnancy history) and + * AR2 (clinical assessments and prenatal care tracking).

    + * + *

    The implementation extends XmlComplexContentImpl to provide thread-safe access to XML + * element store operations. All getter and setter methods are synchronized using the XMLBeans + * monitor pattern to ensure data consistency in concurrent environments.

    + * + *

    Healthcare Context: BCAR forms are standardized prenatal care records + * used throughout British Columbia to track maternal health, fetal development, and pregnancy + * outcomes. This implementation supports electronic data capture and exchange of antenatal + * records between healthcare providers and facilities.

    + * + * @see ca.openosp.openo.ar2005.ARRecord + * @see ca.openosp.openo.ar2005.AR1 + * @see ca.openosp.openo.ar2005.AR2 + * @since 2026-01-24 + */ public class ARRecordImpl extends XmlComplexContentImpl implements ARRecord { private static final long serialVersionUID = 1L; private static final QName AR1$0; private static final QName AR2$2; - + + /** + * Constructs a new ARRecordImpl instance with the specified schema type. + * + *

    This constructor is typically invoked by the XMLBeans framework during + * XML parsing or programmatic document creation. It initializes the underlying + * XML store with the appropriate schema type definition for ARRecord validation.

    + * + * @param sType SchemaType the schema type definition for ARRecord, must not be null + */ public ARRecordImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the AR1 (demographics and pregnancy history) element from this antenatal record. + * + *

    AR1 contains patient identification, demographic information, obstetric history, + * and initial pregnancy assessment data. This method is thread-safe and uses the XMLBeans + * monitor pattern to synchronize access to the underlying XML store.

    + * + * @return AR1 the AR1 element containing patient demographics and pregnancy history, + * or null if the element has not been set + */ public AR1 getAR1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -29,7 +70,17 @@ public AR1 getAR1() { return target; } } - + + /** + * Sets the AR1 (demographics and pregnancy history) element for this antenatal record. + * + *

    This method replaces any existing AR1 element with the provided value. If no AR1 + * element exists in the XML store, a new element is created. The operation is thread-safe + * and synchronized using the XMLBeans monitor pattern.

    + * + * @param ar1 AR1 the AR1 element containing patient demographics and pregnancy history + * to set in this record, must not be null + */ public void setAR1(final AR1 ar1) { synchronized (this.monitor()) { this.check_orphaned(); @@ -41,7 +92,17 @@ public void setAR1(final AR1 ar1) { target.set((XmlObject)ar1); } } - + + /** + * Creates and adds a new AR1 element to this antenatal record. + * + *

    This method creates a new, empty AR1 element in the XML store and returns it + * for population with patient demographics and pregnancy history data. The caller + * is responsible for setting the appropriate values on the returned AR1 object. + * The operation is thread-safe and synchronized using the XMLBeans monitor pattern.

    + * + * @return AR1 a new, empty AR1 element that has been added to this record + */ public AR1 addNewAR1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +111,17 @@ public AR1 addNewAR1() { return target; } } - + + /** + * Retrieves the AR2 (clinical assessments and prenatal care) element from this antenatal record. + * + *

    AR2 contains ongoing prenatal visits, clinical assessments, laboratory results, + * ultrasound findings, and pregnancy complications tracking. This method is thread-safe + * and uses the XMLBeans monitor pattern to synchronize access to the underlying XML store.

    + * + * @return AR2 the AR2 element containing clinical assessments and prenatal care data, + * or null if the element has not been set + */ public AR2 getAR2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -62,7 +133,17 @@ public AR2 getAR2() { return target; } } - + + /** + * Sets the AR2 (clinical assessments and prenatal care) element for this antenatal record. + * + *

    This method replaces any existing AR2 element with the provided value. If no AR2 + * element exists in the XML store, a new element is created. The operation is thread-safe + * and synchronized using the XMLBeans monitor pattern.

    + * + * @param ar2 AR2 the AR2 element containing clinical assessments and prenatal care data + * to set in this record, must not be null + */ public void setAR2(final AR2 ar2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -74,7 +155,17 @@ public void setAR2(final AR2 ar2) { target.set((XmlObject)ar2); } } - + + /** + * Creates and adds a new AR2 element to this antenatal record. + * + *

    This method creates a new, empty AR2 element in the XML store and returns it + * for population with clinical assessment and prenatal care data. The caller is + * responsible for setting the appropriate values on the returned AR2 object. + * The operation is thread-safe and synchronized using the XMLBeans monitor pattern.

    + * + * @return AR2 a new, empty AR2 element that has been added to this record + */ public AR2 addNewAR2() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetDocumentImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetDocumentImpl.java index d9e2aa515b9..4fbbdc9fd55 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetDocumentImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetDocumentImpl.java @@ -7,15 +7,58 @@ import ca.openosp.openo.ar2005.ARRecordSetDocument; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for the ARRecordSetDocument interface, providing XML document handling + * for British Columbia Antenatal Record (BCAR) AR2005 record sets. + * + *

    This class is part of the AR2005 XML schema implementation and provides thread-safe operations + * for managing ARRecordSet elements within an XML document structure. It extends Apache XMLBeans' + * XmlComplexContentImpl to provide XML serialization and deserialization capabilities for healthcare + * antenatal records.

    + * + *

    The AR2005 namespace (http://www.oscarmcmaster.org/AR2005) is used for British Columbia's + * standardized antenatal record format, which includes pregnancy history, obstetrical history, + * medical history, physical examinations, and other maternal care information.

    + * + *

    All operations in this class are synchronized on the internal monitor to ensure thread safety + * when accessing or modifying the underlying XML store.

    + * + * @see ca.openosp.openo.ar2005.ARRecordSetDocument + * @see ca.openosp.openo.ar2005.ARRecordSet + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-24 + */ public class ARRecordSetDocumentImpl extends XmlComplexContentImpl implements ARRecordSetDocument { private static final long serialVersionUID = 1L; private static final QName ARRECORDSET$0; - + + /** + * Constructs a new ARRecordSetDocumentImpl with the specified schema type. + * + *

    This constructor is typically invoked by the Apache XMLBeans framework during + * XML document parsing or when creating new document instances. It initializes the + * underlying XML complex content structure with the provided schema type definition.

    + * + * @param sType SchemaType the schema type definition for this document implementation + */ public ARRecordSetDocumentImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the ARRecordSet element from this document. + * + *

    This method performs a thread-safe lookup of the ARRecordSet element within the + * XML document structure. The ARRecordSet contains the collection of individual antenatal + * records (ARRecord instances) for a patient's pregnancy care.

    + * + *

    The method is synchronized on the internal monitor to ensure thread safety when + * accessing the underlying XML store.

    + * + * @return ARRecordSet the ARRecordSet element, or null if no ARRecordSet element exists + * in this document + */ public ARRecordSet getARRecordSet() { synchronized (this.monitor()) { this.check_orphaned(); @@ -27,7 +70,21 @@ public ARRecordSet getARRecordSet() { return target; } } - + + /** + * Sets or replaces the ARRecordSet element in this document. + * + *

    This method performs a thread-safe update of the ARRecordSet element within the + * XML document structure. If an ARRecordSet element already exists, it will be replaced + * with the provided one. If no ARRecordSet element exists, a new one will be created + * and populated with the provided data.

    + * + *

    The method is synchronized on the internal monitor to ensure thread safety when + * modifying the underlying XML store.

    + * + * @param arRecordSet ARRecordSet the ARRecordSet element to set in this document, + * containing the collection of antenatal records + */ public void setARRecordSet(final ARRecordSet arRecordSet) { synchronized (this.monitor()) { this.check_orphaned(); @@ -39,7 +96,24 @@ public void setARRecordSet(final ARRecordSet arRecordSet) { target.set((XmlObject)arRecordSet); } } - + + /** + * Creates and adds a new empty ARRecordSet element to this document. + * + *

    This method performs a thread-safe creation of a new ARRecordSet element within the + * XML document structure. Unlike setARRecordSet(), this method always creates a new element + * and returns it for further population. The returned ARRecordSet can then be populated with + * individual ARRecord elements representing antenatal care records.

    + * + *

    This is typically used when building a new AR2005 document from scratch, allowing the + * caller to populate the record set incrementally.

    + * + *

    The method is synchronized on the internal monitor to ensure thread safety when + * modifying the underlying XML store.

    + * + * @return ARRecordSet the newly created and added ARRecordSet element, ready to be populated + * with antenatal records + */ public ARRecordSet addNewARRecordSet() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetImpl.java index 674c790a362..cfa225a7b24 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/ARRecordSetImpl.java @@ -9,15 +9,59 @@ import ca.openosp.openo.ar2005.ARRecordSet; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Apache XMLBeans implementation for managing collections of Antenatal Record (AR) 2005 healthcare forms. + * + *

    This implementation class provides the underlying data structure and operations for the {@link ARRecordSet} + * interface. It uses Apache XMLBeans to manage a collection of {@link ARRecord} objects, which represent + * standardized antenatal care documentation used in Canadian healthcare settings.

    + * + *

    The AR2005 form set is part of the British Columbia Antenatal Record (BCAR) system, used for tracking + * pregnancy care, prenatal visits, lab results, and maternal health assessments. This implementation provides + * thread-safe access to the underlying XML store through synchronized methods.

    + * + *

    This class extends {@link XmlComplexContentImpl} to leverage XMLBeans' built-in XML serialization, + * deserialization, and validation capabilities. All operations are protected by monitor synchronization to + * ensure thread safety when accessing or modifying the record collection.

    + * + * @see ARRecordSet + * @see ARRecord + * @see XmlComplexContentImpl + * @since 2026-01-24 + */ public class ARRecordSetImpl extends XmlComplexContentImpl implements ARRecordSet { private static final long serialVersionUID = 1L; private static final QName ARRECORD$0; + /** + * Constructs a new ARRecordSet implementation with the specified XMLBeans schema type. + * + *

    This constructor is typically called by the XMLBeans framework during XML parsing + * and deserialization operations. It initializes the underlying XML store with the + * appropriate schema type for AR2005 record set validation.

    + * + * @param sType SchemaType the XMLBeans schema type defining the structure and validation + * rules for this AR record set + */ public ARRecordSetImpl(final SchemaType sType) { super(sType); } + /** + * Retrieves all antenatal records in this record set as an array. + * + *

    This method returns a complete snapshot of all {@link ARRecord} objects currently + * stored in this record set. The returned array is a copy, so modifications to the array + * itself will not affect the underlying XML store (though modifications to individual + * ARRecord objects will be reflected).

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * consistent reads when multiple threads access the record set concurrently.

    + * + * @return ARRecord[] array containing all antenatal records in this set, or an empty + * array if no records exist + */ public ARRecord[] getARRecordArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -29,6 +73,20 @@ public ARRecord[] getARRecordArray() { } } + /** + * Retrieves the antenatal record at the specified index position in this record set. + * + *

    This method provides indexed access to individual AR records within the collection. + * The index is zero-based, following standard Java array conventions.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * consistent reads when multiple threads access the record set concurrently.

    + * + * @param i int the zero-based index of the antenatal record to retrieve + * @return ARRecord the antenatal record at the specified index position + * @throws IndexOutOfBoundsException if the index is negative or greater than or equal + * to the number of records in the set + */ public ARRecord getARRecordArray(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -41,6 +99,17 @@ public ARRecord getARRecordArray(final int i) { } } + /** + * Returns the total number of antenatal records currently in this record set. + * + *

    This method provides the count of AR records stored in the collection, which can be + * used for iteration, validation, or capacity checking purposes.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * accurate counts when multiple threads access the record set concurrently.

    + * + * @return int the number of antenatal records in this set, or 0 if the set is empty + */ public int sizeOfARRecordArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -48,6 +117,19 @@ public int sizeOfARRecordArray() { } } + /** + * Replaces the entire collection of antenatal records with the provided array. + * + *

    This method performs a complete replacement of all AR records in this record set. + * Any existing records are removed and replaced with the records from the provided array. + * This operation is useful for bulk updates or when restoring a saved record set state.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * data integrity when multiple threads access the record set concurrently.

    + * + * @param arRecordArray ARRecord[] array of antenatal records to set as the new collection; + * may be empty but should not be null + */ public void setARRecordArray(final ARRecord[] arRecordArray) { synchronized (this.monitor()) { this.check_orphaned(); @@ -55,6 +137,21 @@ public void setARRecordArray(final ARRecord[] arRecordArray) { } } + /** + * Replaces the antenatal record at the specified index position with a new record. + * + *

    This method updates a single AR record at the given index position. The existing + * record at that position is replaced with the provided record. This is useful for + * updating individual patient records within a collection without affecting other records.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * data integrity when multiple threads access the record set concurrently.

    + * + * @param i int the zero-based index of the record position to update + * @param arRecord ARRecord the new antenatal record to set at the specified position + * @throws IndexOutOfBoundsException if the index is negative or greater than or equal + * to the number of records in the set + */ public void setARRecordArray(final int i, final ARRecord arRecord) { synchronized (this.monitor()) { this.check_orphaned(); @@ -67,6 +164,22 @@ public void setARRecordArray(final int i, final ARRecord arRecord) { } } + /** + * Inserts a new, empty antenatal record at the specified index position in this record set. + * + *

    This method creates a new AR record and inserts it at the given position, shifting + * any existing records at or after that position to higher indices (adds one to their indices). + * The newly created record is initialized with default values and can be populated with + * patient antenatal data after insertion.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * data integrity when multiple threads access the record set concurrently.

    + * + * @param i int the zero-based index position where the new record should be inserted; + * must be between 0 and the current size of the record set (inclusive) + * @return ARRecord the newly created and inserted antenatal record, ready to be populated + * with patient data + */ public ARRecord insertNewARRecord(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -76,6 +189,20 @@ public ARRecord insertNewARRecord(final int i) { } } + /** + * Appends a new, empty antenatal record to the end of this record set. + * + *

    This method creates a new AR record and adds it as the last element in the collection. + * The newly created record is initialized with default values and can be populated with + * patient antenatal data after creation. This is the most common method for adding new + * patient records to the set.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * data integrity when multiple threads access the record set concurrently.

    + * + * @return ARRecord the newly created antenatal record appended to the end of the set, + * ready to be populated with patient data + */ public ARRecord addNewARRecord() { synchronized (this.monitor()) { this.check_orphaned(); @@ -85,6 +212,23 @@ public ARRecord addNewARRecord() { } } + /** + * Removes the antenatal record at the specified index position from this record set. + * + *

    This method deletes the AR record at the given position and shifts any subsequent + * records to lower indices (subtracts one from their indices). This operation permanently + * removes the record from the collection.

    + * + *

    Healthcare Context: Removing patient records should be performed with + * caution and in accordance with healthcare data retention policies and regulatory requirements. + * Consider archiving rather than deletion for audit trail and compliance purposes.

    + * + *

    This operation is thread-safe and synchronized on the internal monitor to ensure + * data integrity when multiple threads access the record set concurrently.

    + * + * @param i int the zero-based index of the antenatal record to remove; must be between + * 0 and the current size minus one (inclusive) + */ public void removeARRecord(final int i) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/AdditionalLabInvestigationsTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/AdditionalLabInvestigationsTypeImpl.java index 972e13fbc82..6876679e476 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/AdditionalLabInvestigationsTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/AdditionalLabInvestigationsTypeImpl.java @@ -11,6 +11,21 @@ import ca.openosp.openo.ar2005.AdditionalLabInvestigationsType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XMLBeans implementation class for additional laboratory investigations data in British Columbia Antenatal Record (BCAR) forms. + * + * This class provides XML binding and data access methods for prenatal laboratory test results including hemoglobin, + * blood group, Rh factor, antibody screening, glucose challenge test (GCT), glucose tolerance test (GTT), + * Group B Streptococcus (GBS) screening, and up to four custom laboratory investigations. It supports the AR2005 + * XML schema used for British Columbia prenatal care documentation. + * + * All public methods are thread-safe through synchronization on the internal monitor object. The class follows + * the XMLBeans pattern with paired getter/setter methods for both String values and XMLBeans typed values. + * + * @see ca.openosp.openo.ar2005.AdditionalLabInvestigationsType + * @see ca.openosp.openo.ar2005.CustomLab + * @since 2026-01-24 + */ public class AdditionalLabInvestigationsTypeImpl extends XmlComplexContentImpl implements AdditionalLabInvestigationsType { private static final long serialVersionUID = 1L; @@ -25,11 +40,21 @@ public class AdditionalLabInvestigationsTypeImpl extends XmlComplexContentImpl i private static final QName CUSTOMLAB2$16; private static final QName CUSTOMLAB3$18; private static final QName CUSTOMLAB4$20; - + + /** + * Constructs a new AdditionalLabInvestigationsTypeImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type for this implementation + */ public AdditionalLabInvestigationsTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the hemoglobin (Hb) value. + * + * @return String the hemoglobin level value, or null if not set + */ public String getHb() { synchronized (this.monitor()) { this.check_orphaned(); @@ -41,7 +66,12 @@ public String getHb() { return target.getStringValue(); } } - + + /** + * Gets the hemoglobin (Hb) value as an XMLBeans XmlString. + * + * @return XmlString the hemoglobin XML element, or null if not set + */ public XmlString xgetHb() { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +80,12 @@ public XmlString xgetHb() { return target; } } - + + /** + * Sets the hemoglobin (Hb) value. + * + * @param hb String the hemoglobin level value to set + */ public void setHb(final String hb) { synchronized (this.monitor()) { this.check_orphaned(); @@ -62,7 +97,12 @@ public void setHb(final String hb) { target.setStringValue(hb); } } - + + /** + * Sets the hemoglobin (Hb) value as an XMLBeans XmlString. + * + * @param hb XmlString the hemoglobin XML element to set + */ public void xsetHb(final XmlString hb) { synchronized (this.monitor()) { this.check_orphaned(); @@ -74,7 +114,12 @@ public void xsetHb(final XmlString hb) { target.set((XmlObject)hb); } } - + + /** + * Gets the blood group value. + * + * @return BloodGroup.Enum the blood group enumeration value (A, B, AB, O), or null if not set + */ public BloodGroup.Enum getBloodGroup() { synchronized (this.monitor()) { this.check_orphaned(); @@ -86,7 +131,12 @@ public BloodGroup.Enum getBloodGroup() { return (BloodGroup.Enum)target.getEnumValue(); } } - + + /** + * Gets the blood group value as an XMLBeans BloodGroup type. + * + * @return BloodGroup the blood group XML element, or null if not set + */ public BloodGroup xgetBloodGroup() { synchronized (this.monitor()) { this.check_orphaned(); @@ -95,7 +145,12 @@ public BloodGroup xgetBloodGroup() { return target; } } - + + /** + * Sets the blood group value. + * + * @param bloodGroup BloodGroup.Enum the blood group enumeration value to set (A, B, AB, O) + */ public void setBloodGroup(final BloodGroup.Enum bloodGroup) { synchronized (this.monitor()) { this.check_orphaned(); @@ -107,7 +162,12 @@ public void setBloodGroup(final BloodGroup.Enum bloodGroup) { target.setEnumValue((StringEnumAbstractBase)bloodGroup); } } - + + /** + * Sets the blood group value as an XMLBeans BloodGroup type. + * + * @param bloodGroup BloodGroup the blood group XML element to set + */ public void xsetBloodGroup(final BloodGroup bloodGroup) { synchronized (this.monitor()) { this.check_orphaned(); @@ -119,7 +179,12 @@ public void xsetBloodGroup(final BloodGroup bloodGroup) { target.set((XmlObject)bloodGroup); } } - + + /** + * Gets the Rh factor value. + * + * @return Rh.Enum the Rh factor enumeration value (positive or negative), or null if not set + */ public Rh.Enum getRh() { synchronized (this.monitor()) { this.check_orphaned(); @@ -131,7 +196,12 @@ public Rh.Enum getRh() { return (Rh.Enum)target.getEnumValue(); } } - + + /** + * Gets the Rh factor value as an XMLBeans Rh type. + * + * @return Rh the Rh factor XML element, or null if not set + */ public Rh xgetRh() { synchronized (this.monitor()) { this.check_orphaned(); @@ -140,7 +210,12 @@ public Rh xgetRh() { return target; } } - + + /** + * Sets the Rh factor value. + * + * @param rh Rh.Enum the Rh factor enumeration value to set (positive or negative) + */ public void setRh(final Rh.Enum rh) { synchronized (this.monitor()) { this.check_orphaned(); @@ -152,7 +227,12 @@ public void setRh(final Rh.Enum rh) { target.setEnumValue((StringEnumAbstractBase)rh); } } - + + /** + * Sets the Rh factor value as an XMLBeans Rh type. + * + * @param rh Rh the Rh factor XML element to set + */ public void xsetRh(final Rh rh) { synchronized (this.monitor()) { this.check_orphaned(); @@ -164,7 +244,12 @@ public void xsetRh(final Rh rh) { target.set((XmlObject)rh); } } - + + /** + * Gets the repeat antibody screen (ABS) value. + * + * @return String the repeat antibody screen result value, or null if not set + */ public String getRepeatABS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -176,7 +261,12 @@ public String getRepeatABS() { return target.getStringValue(); } } - + + /** + * Gets the repeat antibody screen (ABS) value as an XMLBeans XmlString. + * + * @return XmlString the repeat antibody screen XML element, or null if not set + */ public XmlString xgetRepeatABS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -185,7 +275,12 @@ public XmlString xgetRepeatABS() { return target; } } - + + /** + * Sets the repeat antibody screen (ABS) value. + * + * @param repeatABS String the repeat antibody screen result value to set + */ public void setRepeatABS(final String repeatABS) { synchronized (this.monitor()) { this.check_orphaned(); @@ -197,7 +292,12 @@ public void setRepeatABS(final String repeatABS) { target.setStringValue(repeatABS); } } - + + /** + * Sets the repeat antibody screen (ABS) value as an XMLBeans XmlString. + * + * @param repeatABS XmlString the repeat antibody screen XML element to set + */ public void xsetRepeatABS(final XmlString repeatABS) { synchronized (this.monitor()) { this.check_orphaned(); @@ -209,7 +309,12 @@ public void xsetRepeatABS(final XmlString repeatABS) { target.set((XmlObject)repeatABS); } } - + + /** + * Gets the Glucose Challenge Test (GCT) value. + * + * @return String the glucose challenge test result value, or null if not set + */ public String getGCT() { synchronized (this.monitor()) { this.check_orphaned(); @@ -221,7 +326,12 @@ public String getGCT() { return target.getStringValue(); } } - + + /** + * Gets the Glucose Challenge Test (GCT) value as an XMLBeans XmlString. + * + * @return XmlString the glucose challenge test XML element, or null if not set + */ public XmlString xgetGCT() { synchronized (this.monitor()) { this.check_orphaned(); @@ -230,7 +340,12 @@ public XmlString xgetGCT() { return target; } } - + + /** + * Sets the Glucose Challenge Test (GCT) value. + * + * @param gct String the glucose challenge test result value to set + */ public void setGCT(final String gct) { synchronized (this.monitor()) { this.check_orphaned(); @@ -242,7 +357,12 @@ public void setGCT(final String gct) { target.setStringValue(gct); } } - + + /** + * Sets the Glucose Challenge Test (GCT) value as an XMLBeans XmlString. + * + * @param gct XmlString the glucose challenge test XML element to set + */ public void xsetGCT(final XmlString gct) { synchronized (this.monitor()) { this.check_orphaned(); @@ -254,7 +374,12 @@ public void xsetGCT(final XmlString gct) { target.set((XmlObject)gct); } } - + + /** + * Gets the Glucose Tolerance Test (GTT) value. + * + * @return String the glucose tolerance test result value, or null if not set + */ public String getGTT() { synchronized (this.monitor()) { this.check_orphaned(); @@ -266,7 +391,12 @@ public String getGTT() { return target.getStringValue(); } } - + + /** + * Gets the Glucose Tolerance Test (GTT) value as an XMLBeans XmlString. + * + * @return XmlString the glucose tolerance test XML element, or null if not set + */ public XmlString xgetGTT() { synchronized (this.monitor()) { this.check_orphaned(); @@ -275,7 +405,12 @@ public XmlString xgetGTT() { return target; } } - + + /** + * Sets the Glucose Tolerance Test (GTT) value. + * + * @param gtt String the glucose tolerance test result value to set + */ public void setGTT(final String gtt) { synchronized (this.monitor()) { this.check_orphaned(); @@ -287,7 +422,12 @@ public void setGTT(final String gtt) { target.setStringValue(gtt); } } - + + /** + * Sets the Glucose Tolerance Test (GTT) value as an XMLBeans XmlString. + * + * @param gtt XmlString the glucose tolerance test XML element to set + */ public void xsetGTT(final XmlString gtt) { synchronized (this.monitor()) { this.check_orphaned(); @@ -299,7 +439,12 @@ public void xsetGTT(final XmlString gtt) { target.set((XmlObject)gtt); } } - + + /** + * Gets the Group B Streptococcus (GBS) screening value. + * + * @return GBS.Enum the GBS screening result enumeration value, or null if not set + */ public GBS.Enum getGBS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -311,7 +456,12 @@ public GBS.Enum getGBS() { return (GBS.Enum)target.getEnumValue(); } } - + + /** + * Gets the Group B Streptococcus (GBS) screening value as an XMLBeans GBS type. + * + * @return GBS the GBS screening XML element, or null if not set + */ public GBS xgetGBS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -320,7 +470,12 @@ public GBS xgetGBS() { return target; } } - + + /** + * Sets the Group B Streptococcus (GBS) screening value. + * + * @param gbs GBS.Enum the GBS screening result enumeration value to set + */ public void setGBS(final GBS.Enum gbs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -332,7 +487,12 @@ public void setGBS(final GBS.Enum gbs) { target.setEnumValue((StringEnumAbstractBase)gbs); } } - + + /** + * Sets the Group B Streptococcus (GBS) screening value as an XMLBeans GBS type. + * + * @param gbs GBS the GBS screening XML element to set + */ public void xsetGBS(final GBS gbs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -344,7 +504,12 @@ public void xsetGBS(final GBS gbs) { target.set((XmlObject)gbs); } } - + + /** + * Gets the first custom laboratory investigation. + * + * @return CustomLab the first custom lab configuration and results, or null if not set + */ public CustomLab getCustomLab1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -356,7 +521,12 @@ public CustomLab getCustomLab1() { return target; } } - + + /** + * Sets the first custom laboratory investigation. + * + * @param customLab1 CustomLab the first custom lab configuration and results to set + */ public void setCustomLab1(final CustomLab customLab1) { synchronized (this.monitor()) { this.check_orphaned(); @@ -368,7 +538,12 @@ public void setCustomLab1(final CustomLab customLab1) { target.set((XmlObject)customLab1); } } - + + /** + * Adds a new first custom laboratory investigation element. + * + * @return CustomLab the newly created custom lab element + */ public CustomLab addNewCustomLab1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -377,7 +552,12 @@ public CustomLab addNewCustomLab1() { return target; } } - + + /** + * Gets the second custom laboratory investigation. + * + * @return CustomLab the second custom lab configuration and results, or null if not set + */ public CustomLab getCustomLab2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -389,7 +569,12 @@ public CustomLab getCustomLab2() { return target; } } - + + /** + * Sets the second custom laboratory investigation. + * + * @param customLab2 CustomLab the second custom lab configuration and results to set + */ public void setCustomLab2(final CustomLab customLab2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -401,7 +586,12 @@ public void setCustomLab2(final CustomLab customLab2) { target.set((XmlObject)customLab2); } } - + + /** + * Adds a new second custom laboratory investigation element. + * + * @return CustomLab the newly created custom lab element + */ public CustomLab addNewCustomLab2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -410,7 +600,12 @@ public CustomLab addNewCustomLab2() { return target; } } - + + /** + * Gets the third custom laboratory investigation. + * + * @return CustomLab the third custom lab configuration and results, or null if not set + */ public CustomLab getCustomLab3() { synchronized (this.monitor()) { this.check_orphaned(); @@ -422,7 +617,12 @@ public CustomLab getCustomLab3() { return target; } } - + + /** + * Sets the third custom laboratory investigation. + * + * @param customLab3 CustomLab the third custom lab configuration and results to set + */ public void setCustomLab3(final CustomLab customLab3) { synchronized (this.monitor()) { this.check_orphaned(); @@ -434,7 +634,12 @@ public void setCustomLab3(final CustomLab customLab3) { target.set((XmlObject)customLab3); } } - + + /** + * Adds a new third custom laboratory investigation element. + * + * @return CustomLab the newly created custom lab element + */ public CustomLab addNewCustomLab3() { synchronized (this.monitor()) { this.check_orphaned(); @@ -443,7 +648,12 @@ public CustomLab addNewCustomLab3() { return target; } } - + + /** + * Gets the fourth custom laboratory investigation. + * + * @return CustomLab the fourth custom lab configuration and results, or null if not set + */ public CustomLab getCustomLab4() { synchronized (this.monitor()) { this.check_orphaned(); @@ -455,7 +665,12 @@ public CustomLab getCustomLab4() { return target; } } - + + /** + * Sets the fourth custom laboratory investigation. + * + * @param customLab4 CustomLab the fourth custom lab configuration and results to set + */ public void setCustomLab4(final CustomLab customLab4) { synchronized (this.monitor()) { this.check_orphaned(); @@ -467,7 +682,12 @@ public void setCustomLab4(final CustomLab customLab4) { target.set((XmlObject)customLab4); } } - + + /** + * Adds a new fourth custom laboratory investigation element. + * + * @return CustomLab the newly created custom lab element + */ public CustomLab addNewCustomLab4() { synchronized (this.monitor()) { this.check_orphaned(); @@ -490,41 +710,95 @@ public CustomLab addNewCustomLab4() { CUSTOMLAB3$18 = new QName("http://www.oscarmcmaster.org/AR2005", "customLab3"); CUSTOMLAB4$20 = new QName("http://www.oscarmcmaster.org/AR2005", "customLab4"); } - + + /** + * XMLBeans implementation class for the BloodGroup enumeration type. + * + * This class provides the XMLBeans binding for blood group enumeration values (A, B, AB, O). + * + * @since 2026-01-24 + */ public static class BloodGroupImpl extends JavaStringEnumerationHolderEx implements BloodGroup { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new BloodGroupImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type for this enumeration + */ public BloodGroupImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new BloodGroupImpl instance with the specified schema type and validation flag. + * + * @param sType SchemaType the XMLBeans schema type for this enumeration + * @param b boolean flag controlling validation behavior + */ protected BloodGroupImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation class for the Rh factor enumeration type. + * + * This class provides the XMLBeans binding for Rh factor enumeration values (positive or negative). + * + * @since 2026-01-24 + */ public static class RhImpl extends JavaStringEnumerationHolderEx implements Rh { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new RhImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type for this enumeration + */ public RhImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new RhImpl instance with the specified schema type and validation flag. + * + * @param sType SchemaType the XMLBeans schema type for this enumeration + * @param b boolean flag controlling validation behavior + */ protected RhImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation class for the GBS (Group B Streptococcus) enumeration type. + * + * This class provides the XMLBeans binding for GBS screening result enumeration values. + * + * @since 2026-01-24 + */ public static class GBSImpl extends JavaStringEnumerationHolderEx implements GBS { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new GBSImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type for this enumeration + */ public GBSImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new GBSImpl instance with the specified schema type and validation flag. + * + * @param sType SchemaType the XMLBeans schema type for this enumeration + * @param b boolean flag controlling validation behavior + */ protected GBSImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/BirthAttendantsImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/BirthAttendantsImpl.java index 227bdc48516..26813e551d2 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/BirthAttendantsImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/BirthAttendantsImpl.java @@ -9,6 +9,29 @@ import ca.openosp.openo.ar2005.BirthAttendants; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XML Beans implementation for the BirthAttendants element in the British Columbia Antenatal Record (BCAR) AR2005 form. + * + *

    This class provides XML serialization and deserialization capabilities for tracking the healthcare professionals + * who attended a birth. The BCAR AR2005 form is used throughout British Columbia for standardized prenatal care + * documentation and captures essential information about pregnancy, delivery, and postnatal care.

    + * + *

    Birth attendants tracked by this implementation include:

    + *
      + *
    • OBS (Obstetrician) - Medical doctor specializing in pregnancy and childbirth
    • + *
    • FP (Family Physician) - General practitioner providing maternity care
    • + *
    • Midwife - Licensed midwife providing maternity care
    • + *
    • Other - Free-text field for other healthcare providers
    • + *
    + * + *

    This implementation extends Apache XMLBeans' XmlComplexContentImpl to provide type-safe access to the + * XML structure defined in the AR2005 schema. All accessor methods are thread-safe through monitor synchronization + * and interact with the underlying XML store through the XMLBeans framework.

    + * + * @see ca.openosp.openo.ar2005.BirthAttendants + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-23 + */ public class BirthAttendantsImpl extends XmlComplexContentImpl implements BirthAttendants { private static final long serialVersionUID = 1L; @@ -16,11 +39,29 @@ public class BirthAttendantsImpl extends XmlComplexContentImpl implements BirthA private static final QName FP$2; private static final QName MIDWIFE$4; private static final QName OTHER$6; - + + /** + * Constructs a new BirthAttendantsImpl instance with the specified schema type. + * + *

    This constructor is typically called by the Apache XMLBeans framework during XML parsing + * and deserialization. It initializes the underlying XML store with the appropriate schema type + * definition for the BirthAttendants element.

    + * + * @param sType SchemaType the schema type definition for this XML element, must not be null + */ public BirthAttendantsImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves whether an obstetrician was present as a birth attendant. + * + *

    Obstetricians are medical doctors who specialize in pregnancy, childbirth, and the postpartum period. + * This method returns the primitive boolean value indicating presence or absence of an obstetrician + * at the birth.

    + * + * @return boolean true if an obstetrician attended the birth, false otherwise + */ public boolean getOBS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -29,7 +70,16 @@ public boolean getOBS() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XML representation of the OBS (obstetrician) birth attendant indicator. + * + *

    This method returns the underlying XmlBoolean object rather than the primitive boolean value, + * allowing access to XML-specific features such as nil values, validation state, and schema type information. + * Used primarily for XML processing and serialization tasks.

    + * + * @return XmlBoolean the XML boolean object representing obstetrician attendance, or null if not set + */ public XmlBoolean xgetOBS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -38,7 +88,15 @@ public XmlBoolean xgetOBS() { return target; } } - + + /** + * Sets whether an obstetrician was present as a birth attendant. + * + *

    This method updates the primitive boolean value in the underlying XML store. If the XML element + * does not exist, it will be created automatically. This is thread-safe through monitor synchronization.

    + * + * @param obs boolean true to indicate an obstetrician attended the birth, false otherwise + */ public void setOBS(final boolean obs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +108,16 @@ public void setOBS(final boolean obs) { target.setBooleanValue(obs); } } - + + /** + * Sets the XML representation of the OBS (obstetrician) birth attendant indicator. + * + *

    This method allows setting the value using an XmlBoolean object rather than a primitive boolean, + * preserving XML-specific attributes such as nil state and validation metadata. The provided XmlBoolean + * is copied into the underlying XML store. If the element does not exist, it will be created.

    + * + * @param obs XmlBoolean the XML boolean object to set, must not be null + */ public void xsetOBS(final XmlBoolean obs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -62,7 +129,16 @@ public void xsetOBS(final XmlBoolean obs) { target.set((XmlObject)obs); } } - + + /** + * Retrieves whether a family physician was present as a birth attendant. + * + *

    Family physicians (FPs) are general practitioners who provide comprehensive maternity care including + * prenatal visits, delivery, and postnatal care. This method returns the primitive boolean value + * indicating presence or absence of a family physician at the birth.

    + * + * @return boolean true if a family physician attended the birth, false otherwise + */ public boolean getFP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -71,7 +147,16 @@ public boolean getFP() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XML representation of the FP (family physician) birth attendant indicator. + * + *

    This method returns the underlying XmlBoolean object rather than the primitive boolean value, + * allowing access to XML-specific features such as nil values, validation state, and schema type information. + * Used primarily for XML processing and serialization tasks.

    + * + * @return XmlBoolean the XML boolean object representing family physician attendance, or null if not set + */ public XmlBoolean xgetFP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -80,7 +165,15 @@ public XmlBoolean xgetFP() { return target; } } - + + /** + * Sets whether a family physician was present as a birth attendant. + * + *

    This method updates the primitive boolean value in the underlying XML store. If the XML element + * does not exist, it will be created automatically. This is thread-safe through monitor synchronization.

    + * + * @param fp boolean true to indicate a family physician attended the birth, false otherwise + */ public void setFP(final boolean fp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -92,7 +185,16 @@ public void setFP(final boolean fp) { target.setBooleanValue(fp); } } - + + /** + * Sets the XML representation of the FP (family physician) birth attendant indicator. + * + *

    This method allows setting the value using an XmlBoolean object rather than a primitive boolean, + * preserving XML-specific attributes such as nil state and validation metadata. The provided XmlBoolean + * is copied into the underlying XML store. If the element does not exist, it will be created.

    + * + * @param fp XmlBoolean the XML boolean object to set, must not be null + */ public void xsetFP(final XmlBoolean fp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -104,7 +206,17 @@ public void xsetFP(final XmlBoolean fp) { target.set((XmlObject)fp); } } - + + /** + * Retrieves whether a midwife was present as a birth attendant. + * + *

    Midwives are healthcare professionals who specialize in pregnancy, childbirth, postpartum care, + * and newborn care. In British Columbia, registered midwives are licensed primary care providers for + * women during pregnancy and birth. This method returns the primitive boolean value indicating + * presence or absence of a midwife at the birth.

    + * + * @return boolean true if a midwife attended the birth, false otherwise + */ public boolean getMidwife() { synchronized (this.monitor()) { this.check_orphaned(); @@ -113,7 +225,16 @@ public boolean getMidwife() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XML representation of the midwife birth attendant indicator. + * + *

    This method returns the underlying XmlBoolean object rather than the primitive boolean value, + * allowing access to XML-specific features such as nil values, validation state, and schema type information. + * Used primarily for XML processing and serialization tasks.

    + * + * @return XmlBoolean the XML boolean object representing midwife attendance, or null if not set + */ public XmlBoolean xgetMidwife() { synchronized (this.monitor()) { this.check_orphaned(); @@ -122,7 +243,15 @@ public XmlBoolean xgetMidwife() { return target; } } - + + /** + * Sets whether a midwife was present as a birth attendant. + * + *

    This method updates the primitive boolean value in the underlying XML store. If the XML element + * does not exist, it will be created automatically. This is thread-safe through monitor synchronization.

    + * + * @param midwife boolean true to indicate a midwife attended the birth, false otherwise + */ public void setMidwife(final boolean midwife) { synchronized (this.monitor()) { this.check_orphaned(); @@ -134,7 +263,16 @@ public void setMidwife(final boolean midwife) { target.setBooleanValue(midwife); } } - + + /** + * Sets the XML representation of the midwife birth attendant indicator. + * + *

    This method allows setting the value using an XmlBoolean object rather than a primitive boolean, + * preserving XML-specific attributes such as nil state and validation metadata. The provided XmlBoolean + * is copied into the underlying XML store. If the element does not exist, it will be created.

    + * + * @param midwife XmlBoolean the XML boolean object to set, must not be null + */ public void xsetMidwife(final XmlBoolean midwife) { synchronized (this.monitor()) { this.check_orphaned(); @@ -146,7 +284,16 @@ public void xsetMidwife(final XmlBoolean midwife) { target.set((XmlObject)midwife); } } - + + /** + * Retrieves the free-text description of other birth attendants not covered by standard categories. + * + *

    This field allows documentation of healthcare providers or support persons who attended the birth + * but do not fall into the standard categories of obstetrician, family physician, or midwife. Examples + * might include doulas, nurse practitioners, resident physicians, or traditional birth attendants.

    + * + * @return String the description of other birth attendants, or null if not specified + */ public String getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -158,7 +305,16 @@ public String getOther() { return target.getStringValue(); } } - + + /** + * Retrieves the XML representation of the other birth attendants description. + * + *

    This method returns the underlying XmlString object rather than the primitive String value, + * allowing access to XML-specific features such as nil values, validation state, and schema type information. + * Used primarily for XML processing and serialization tasks.

    + * + * @return XmlString the XML string object representing other birth attendants, or null if not set + */ public XmlString xgetOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +323,15 @@ public XmlString xgetOther() { return target; } } - + + /** + * Sets the free-text description of other birth attendants not covered by standard categories. + * + *

    This method updates the string value in the underlying XML store. If the XML element does not exist, + * it will be created automatically. This is thread-safe through monitor synchronization.

    + * + * @param other String the description of other birth attendants, may be null + */ public void setOther(final String other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +343,16 @@ public void setOther(final String other) { target.setStringValue(other); } } - + + /** + * Sets the XML representation of the other birth attendants description. + * + *

    This method allows setting the value using an XmlString object rather than a primitive String, + * preserving XML-specific attributes such as nil state and validation metadata. The provided XmlString + * is copied into the underlying XML store. If the element does not exist, it will be created.

    + * + * @param other XmlString the XML string object to set, must not be null + */ public void xsetOther(final XmlString other) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/CurrentPregnancyTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/CurrentPregnancyTypeImpl.java index ab1ee3cdf55..17747b5c0b6 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/CurrentPregnancyTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/CurrentPregnancyTypeImpl.java @@ -10,6 +10,27 @@ import ca.openosp.openo.ar2005.CurrentPregnancyType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the CurrentPregnancyType interface for managing current pregnancy data in antenatal records. + * + * This class is part of the British Columbia Antenatal Record (BCAR) AR2005 form implementation and handles + * XML serialization/deserialization of current pregnancy health assessment data. It tracks critical prenatal + * health indicators including lifestyle factors, nutritional status, and environmental risk exposures that + * may affect maternal and fetal health outcomes. + * + * The implementation extends Apache XMLBeans framework classes to provide XML schema binding functionality + * for the AR2005 antenatal record system. All data elements are stored as YesNoNullType values to support + * the standard yes/no/unknown clinical documentation pattern used in obstetric care. + * + * Healthcare context: This implementation supports standardized prenatal risk assessment and documentation + * required for comprehensive antenatal care in British Columbia, Canada. The data collected helps healthcare + * providers identify and manage pregnancy-related health risks early in prenatal care. + * + * @see CurrentPregnancyType + * @see YesNoNullType + * @see ca.openosp.openo.ar2005 + * @since 2026-01-24 + */ public class CurrentPregnancyTypeImpl extends XmlComplexContentImpl implements CurrentPregnancyType { private static final long serialVersionUID = 1L; @@ -22,11 +43,28 @@ public class CurrentPregnancyTypeImpl extends XmlComplexContentImpl implements C private static final QName DIETARYRES$12; private static final QName CALCIUMADEQUATE$14; private static final QName FOLATE$16; - + + /** + * Constructs a new CurrentPregnancyType implementation instance with the specified schema type. + * + * This constructor is called by the XMLBeans framework during XML deserialization to create + * a new instance bound to the AR2005 schema definition for current pregnancy data elements. + * + * @param sType SchemaType the XML schema type definition for current pregnancy elements + */ public CurrentPregnancyTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the bleeding status indicator for the current pregnancy. + * + * Bleeding during pregnancy can be a sign of complications such as miscarriage, placental issues, + * or cervical changes. This field documents whether the patient has experienced any vaginal bleeding + * during the current pregnancy, which is critical for risk assessment and clinical management. + * + * @return YesNoNullType the bleeding status (yes/no/unknown), or null if not set + */ public YesNoNullType getBleeding() { synchronized (this.monitor()) { this.check_orphaned(); @@ -38,7 +76,15 @@ public YesNoNullType getBleeding() { return target; } } - + + /** + * Sets the bleeding status indicator for the current pregnancy. + * + * Updates the patient's bleeding status in the antenatal record. Healthcare providers use this + * to document any episodes of vaginal bleeding reported or observed during prenatal care. + * + * @param bleeding YesNoNullType the bleeding status to set (yes/no/unknown) + */ public void setBleeding(final YesNoNullType bleeding) { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +96,15 @@ public void setBleeding(final YesNoNullType bleeding) { target.set((XmlObject)bleeding); } } - + + /** + * Creates and adds a new bleeding status element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the bleeding field and adds it + * to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new bleeding status element that can be configured + */ public YesNoNullType addNewBleeding() { synchronized (this.monitor()) { this.check_orphaned(); @@ -59,7 +113,16 @@ public YesNoNullType addNewBleeding() { return target; } } - + + /** + * Retrieves the nausea status indicator for the current pregnancy. + * + * Nausea and vomiting are common pregnancy symptoms, but severe cases (hyperemesis gravidarum) + * can lead to dehydration and require medical intervention. This field documents whether the + * patient is experiencing nausea, which helps assess nutritional status and need for intervention. + * + * @return YesNoNullType the nausea status (yes/no/unknown), or null if not set + */ public YesNoNullType getNausea() { synchronized (this.monitor()) { this.check_orphaned(); @@ -71,7 +134,15 @@ public YesNoNullType getNausea() { return target; } } - + + /** + * Sets the nausea status indicator for the current pregnancy. + * + * Updates the patient's nausea status in the antenatal record. Healthcare providers use this + * to monitor pregnancy-related symptoms and determine if intervention is needed. + * + * @param nausea YesNoNullType the nausea status to set (yes/no/unknown) + */ public void setNausea(final YesNoNullType nausea) { synchronized (this.monitor()) { this.check_orphaned(); @@ -83,7 +154,15 @@ public void setNausea(final YesNoNullType nausea) { target.set((XmlObject)nausea); } } - + + /** + * Creates and adds a new nausea status element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the nausea field and adds it + * to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new nausea status element that can be configured + */ public YesNoNullType addNewNausea() { synchronized (this.monitor()) { this.check_orphaned(); @@ -92,7 +171,16 @@ public YesNoNullType addNewNausea() { return target; } } - + + /** + * Retrieves the smoking status indicator for the current pregnancy. + * + * Smoking during pregnancy is a major risk factor for complications including low birth weight, + * preterm birth, and sudden infant death syndrome (SIDS). This field documents whether the + * patient is currently smoking, which is essential for risk assessment and counseling. + * + * @return YesNoNullType the smoking status (yes/no/unknown), or null if not set + */ public YesNoNullType getSmoking() { synchronized (this.monitor()) { this.check_orphaned(); @@ -104,7 +192,15 @@ public YesNoNullType getSmoking() { return target; } } - + + /** + * Sets the smoking status indicator for the current pregnancy. + * + * Updates the patient's smoking status in the antenatal record. Healthcare providers use this + * to identify patients who need smoking cessation counseling and support during pregnancy. + * + * @param smoking YesNoNullType the smoking status to set (yes/no/unknown) + */ public void setSmoking(final YesNoNullType smoking) { synchronized (this.monitor()) { this.check_orphaned(); @@ -116,7 +212,15 @@ public void setSmoking(final YesNoNullType smoking) { target.set((XmlObject)smoking); } } - + + /** + * Creates and adds a new smoking status element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the smoking field and adds it + * to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new smoking status element that can be configured + */ public YesNoNullType addNewSmoking() { synchronized (this.monitor()) { this.check_orphaned(); @@ -125,7 +229,16 @@ public YesNoNullType addNewSmoking() { return target; } } - + + /** + * Retrieves the cigarettes per day enumeration value for the current pregnancy. + * + * For patients who smoke, this field quantifies the daily cigarette consumption level. + * The quantity of smoking is directly correlated with the severity of health risks to + * both the mother and fetus, making this important for risk stratification and counseling. + * + * @return CigsPerDay.Enum the cigarettes per day enumeration value, or null if not set + */ public CigsPerDay.Enum getCigsPerDay() { synchronized (this.monitor()) { this.check_orphaned(); @@ -137,7 +250,15 @@ public CigsPerDay.Enum getCigsPerDay() { return (CigsPerDay.Enum)target.getEnumValue(); } } - + + /** + * Retrieves the cigarettes per day element as an XMLBeans type. + * + * This method returns the low-level XMLBeans representation of the cigarettes per day field, + * providing access to the underlying XML structure and schema validation capabilities. + * + * @return CigsPerDay the XMLBeans type representation of cigarettes per day, or null if not set + */ public CigsPerDay xgetCigsPerDay() { synchronized (this.monitor()) { this.check_orphaned(); @@ -146,7 +267,15 @@ public CigsPerDay xgetCigsPerDay() { return target; } } - + + /** + * Sets the cigarettes per day enumeration value for the current pregnancy. + * + * Updates the patient's daily cigarette consumption level in the antenatal record. This + * quantitative data helps healthcare providers tailor smoking cessation interventions. + * + * @param cigsPerDay CigsPerDay.Enum the cigarettes per day enumeration value to set + */ public void setCigsPerDay(final CigsPerDay.Enum cigsPerDay) { synchronized (this.monitor()) { this.check_orphaned(); @@ -158,7 +287,15 @@ public void setCigsPerDay(final CigsPerDay.Enum cigsPerDay) { target.setEnumValue((StringEnumAbstractBase)cigsPerDay); } } - + + /** + * Sets the cigarettes per day element using an XMLBeans type. + * + * This method accepts the low-level XMLBeans representation of the cigarettes per day field, + * allowing direct manipulation of the underlying XML structure with schema validation. + * + * @param cigsPerDay CigsPerDay the XMLBeans type representation to set + */ public void xsetCigsPerDay(final CigsPerDay cigsPerDay) { synchronized (this.monitor()) { this.check_orphaned(); @@ -170,7 +307,16 @@ public void xsetCigsPerDay(final CigsPerDay cigsPerDay) { target.set((XmlObject)cigsPerDay); } } - + + /** + * Retrieves the alcohol and drugs usage indicator for the current pregnancy. + * + * Alcohol and drug use during pregnancy can cause fetal alcohol spectrum disorders (FASD), + * birth defects, and developmental delays. This field documents whether the patient is + * using alcohol or drugs, which is critical for risk assessment and intervention planning. + * + * @return YesNoNullType the alcohol/drugs usage status (yes/no/unknown), or null if not set + */ public YesNoNullType getAlcoholDrugs() { synchronized (this.monitor()) { this.check_orphaned(); @@ -182,7 +328,15 @@ public YesNoNullType getAlcoholDrugs() { return target; } } - + + /** + * Sets the alcohol and drugs usage indicator for the current pregnancy. + * + * Updates the patient's alcohol and drug usage status in the antenatal record. Healthcare + * providers use this to identify patients who need counseling and support services. + * + * @param alcoholDrugs YesNoNullType the alcohol/drugs usage status to set (yes/no/unknown) + */ public void setAlcoholDrugs(final YesNoNullType alcoholDrugs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -194,7 +348,15 @@ public void setAlcoholDrugs(final YesNoNullType alcoholDrugs) { target.set((XmlObject)alcoholDrugs); } } - + + /** + * Creates and adds a new alcohol/drugs usage element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the alcohol/drugs field and + * adds it to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new alcohol/drugs usage element that can be configured + */ public YesNoNullType addNewAlcoholDrugs() { synchronized (this.monitor()) { this.check_orphaned(); @@ -203,7 +365,16 @@ public YesNoNullType addNewAlcoholDrugs() { return target; } } - + + /** + * Retrieves the occupational and environmental risks indicator for the current pregnancy. + * + * Exposure to workplace or environmental hazards such as chemicals, radiation, heavy metals, + * or infectious agents can pose risks to fetal development. This field documents whether the + * patient has identified occupational or environmental risk exposures that require monitoring. + * + * @return YesNoNullType the occupational/environmental risks status (yes/no/unknown), or null if not set + */ public YesNoNullType getOccEnvRisks() { synchronized (this.monitor()) { this.check_orphaned(); @@ -215,7 +386,16 @@ public YesNoNullType getOccEnvRisks() { return target; } } - + + /** + * Sets the occupational and environmental risks indicator for the current pregnancy. + * + * Updates the patient's occupational/environmental risk exposure status in the antenatal record. + * Healthcare providers use this to identify patients who may need workplace accommodations or + * environmental exposure reduction strategies. + * + * @param occEnvRisks YesNoNullType the occupational/environmental risks status to set (yes/no/unknown) + */ public void setOccEnvRisks(final YesNoNullType occEnvRisks) { synchronized (this.monitor()) { this.check_orphaned(); @@ -227,7 +407,16 @@ public void setOccEnvRisks(final YesNoNullType occEnvRisks) { target.set((XmlObject)occEnvRisks); } } - + + /** + * Creates and adds a new occupational/environmental risks element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the occupational/environmental + * risks field and adds it to the underlying XML store. Used during initial form creation or + * XML document building. + * + * @return YesNoNullType a new occupational/environmental risks element that can be configured + */ public YesNoNullType addNewOccEnvRisks() { synchronized (this.monitor()) { this.check_orphaned(); @@ -236,7 +425,17 @@ public YesNoNullType addNewOccEnvRisks() { return target; } } - + + /** + * Retrieves the dietary restrictions indicator for the current pregnancy. + * + * Dietary restrictions (religious, cultural, medical, or personal) can affect nutritional + * adequacy during pregnancy. This field documents whether the patient has dietary restrictions + * that may require nutritional counseling or supplementation to ensure adequate maternal and + * fetal nutrition. + * + * @return YesNoNullType the dietary restrictions status (yes/no/unknown), or null if not set + */ public YesNoNullType getDietaryRes() { synchronized (this.monitor()) { this.check_orphaned(); @@ -248,7 +447,16 @@ public YesNoNullType getDietaryRes() { return target; } } - + + /** + * Sets the dietary restrictions indicator for the current pregnancy. + * + * Updates the patient's dietary restrictions status in the antenatal record. Healthcare + * providers use this to identify patients who may need specialized nutritional guidance + * to ensure pregnancy nutrition requirements are met. + * + * @param dietaryRes YesNoNullType the dietary restrictions status to set (yes/no/unknown) + */ public void setDietaryRes(final YesNoNullType dietaryRes) { synchronized (this.monitor()) { this.check_orphaned(); @@ -260,7 +468,15 @@ public void setDietaryRes(final YesNoNullType dietaryRes) { target.set((XmlObject)dietaryRes); } } - + + /** + * Creates and adds a new dietary restrictions element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the dietary restrictions field + * and adds it to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new dietary restrictions element that can be configured + */ public YesNoNullType addNewDietaryRes() { synchronized (this.monitor()) { this.check_orphaned(); @@ -269,7 +485,16 @@ public YesNoNullType addNewDietaryRes() { return target; } } - + + /** + * Retrieves the calcium adequacy indicator for the current pregnancy. + * + * Adequate calcium intake is essential during pregnancy for fetal skeletal development and + * to prevent maternal bone density loss. This field documents whether the patient's dietary + * calcium intake is adequate, which helps determine if calcium supplementation is needed. + * + * @return YesNoNullType the calcium adequacy status (yes/no/unknown), or null if not set + */ public YesNoNullType getCalciumAdequate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -281,7 +506,15 @@ public YesNoNullType getCalciumAdequate() { return target; } } - + + /** + * Sets the calcium adequacy indicator for the current pregnancy. + * + * Updates the patient's calcium adequacy status in the antenatal record. Healthcare providers + * use this to determine if calcium supplementation or dietary counseling is needed. + * + * @param calciumAdequate YesNoNullType the calcium adequacy status to set (yes/no/unknown) + */ public void setCalciumAdequate(final YesNoNullType calciumAdequate) { synchronized (this.monitor()) { this.check_orphaned(); @@ -293,7 +526,15 @@ public void setCalciumAdequate(final YesNoNullType calciumAdequate) { target.set((XmlObject)calciumAdequate); } } - + + /** + * Creates and adds a new calcium adequacy element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the calcium adequacy field + * and adds it to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new calcium adequacy element that can be configured + */ public YesNoNullType addNewCalciumAdequate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -302,7 +543,16 @@ public YesNoNullType addNewCalciumAdequate() { return target; } } - + + /** + * Retrieves the folate supplementation indicator for the current pregnancy. + * + * Folate (folic acid) supplementation is critical during pregnancy to prevent neural tube defects + * such as spina bifida. This field documents whether the patient is taking folate supplements, + * which is a standard recommendation for all pregnant women to reduce birth defect risk. + * + * @return YesNoNullType the folate supplementation status (yes/no/unknown), or null if not set + */ public YesNoNullType getFolate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -314,7 +564,16 @@ public YesNoNullType getFolate() { return target; } } - + + /** + * Sets the folate supplementation indicator for the current pregnancy. + * + * Updates the patient's folate supplementation status in the antenatal record. Healthcare + * providers use this to ensure patients are following the standard recommendation for folate + * intake during pregnancy to prevent neural tube defects. + * + * @param folate YesNoNullType the folate supplementation status to set (yes/no/unknown) + */ public void setFolate(final YesNoNullType folate) { synchronized (this.monitor()) { this.check_orphaned(); @@ -326,7 +585,15 @@ public void setFolate(final YesNoNullType folate) { target.set((XmlObject)folate); } } - + + /** + * Creates and adds a new folate supplementation element to the XML structure. + * + * This factory method creates a new YesNoNullType element for the folate supplementation field + * and adds it to the underlying XML store. Used during initial form creation or XML document building. + * + * @return YesNoNullType a new folate supplementation element that can be configured + */ public YesNoNullType addNewFolate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -347,15 +614,42 @@ public YesNoNullType addNewFolate() { CALCIUMADEQUATE$14 = new QName("http://www.oscarmcmaster.org/AR2005", "calciumAdequate"); FOLATE$16 = new QName("http://www.oscarmcmaster.org/AR2005", "folate"); } - + + /** + * Implementation of the CigsPerDay enumeration for cigarette consumption quantification. + * + * This inner class provides the XMLBeans implementation for the cigarettes per day enumeration, + * which categorizes daily smoking levels for prenatal risk assessment. The enumeration supports + * standardized smoking quantity documentation used in antenatal care protocols. + * + * @see CigsPerDay + * @since 2026-01-24 + */ public static class CigsPerDayImpl extends JavaStringEnumerationHolderEx implements CigsPerDay { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new CigsPerDay enumeration instance with the specified schema type. + * + * This constructor is called by the XMLBeans framework during XML deserialization to create + * a new cigarettes per day enumeration instance bound to the AR2005 schema definition. + * + * @param sType SchemaType the XML schema type definition for the cigarettes per day enumeration + */ public CigsPerDayImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new CigsPerDay enumeration instance with the specified schema type and validation flag. + * + * This protected constructor is used internally by the XMLBeans framework for specialized + * instantiation scenarios, including cases where validation may be deferred or customized. + * + * @param sType SchemaType the XML schema type definition for the cigarettes per day enumeration + * @param b boolean flag controlling validation or initialization behavior + */ protected CigsPerDayImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/CustomLabImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/CustomLabImpl.java index c7b89fb3a5e..015b4704a0e 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/CustomLabImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/CustomLabImpl.java @@ -8,16 +8,58 @@ import ca.openosp.openo.ar2005.CustomLab; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Apache XMLBeans implementation class for custom laboratory results in the AR2005 (Antenatal Record 2005) module. + * + *

    This class provides XML serialization and deserialization capabilities for custom laboratory test data + * within the context of prenatal care documentation. It implements the {@link CustomLab} interface and extends + * {@link XmlComplexContentImpl} to provide thread-safe XML data binding for custom lab results that may not + * fit standard laboratory test classifications.

    + * + *

    The implementation manages two primary elements:

    + *
      + *
    • label - A descriptive identifier for the custom laboratory test
    • + *
    • result - The corresponding test result value
    • + *
    + * + *

    All accessor and mutator methods are thread-safe, utilizing synchronized blocks with XMLBeans monitor objects + * to ensure data integrity during concurrent XML document manipulation.

    + * + *

    Healthcare Context: This class is part of the British Columbia Antenatal Record (BCAR) forms system, + * enabling healthcare providers to document non-standard laboratory tests specific to prenatal care that may not + * be covered by standardized lab requisition forms.

    + * + * @see CustomLab + * @see ca.openosp.openo.ar2005 + * @since 2026-01-24 + */ public class CustomLabImpl extends XmlComplexContentImpl implements CustomLab { private static final long serialVersionUID = 1L; private static final QName LABEL$0; private static final QName RESULT$2; - + + /** + * Constructs a new CustomLabImpl instance with the specified schema type. + * + *

    This constructor initializes the XMLBeans complex content implementation with the provided + * schema type definition, setting up the internal XML store for managing custom laboratory data elements.

    + * + * @param sType SchemaType the schema type definition for this custom lab element + */ public CustomLabImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the label (descriptive name) of this custom laboratory test. + * + *

    This method returns the string value of the label element, which identifies the type or name + * of the custom laboratory test. The operation is thread-safe and synchronized on the internal + * XMLBeans monitor object.

    + * + * @return String the label identifying this custom lab test, or null if not set + */ public String getLabel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -29,7 +71,16 @@ public String getLabel() { return target.getStringValue(); } } - + + /** + * Retrieves the label element as an XmlString object for advanced XML manipulation. + * + *

    This method provides access to the underlying XMLBeans XmlString representation of the label element, + * allowing for advanced XML operations such as schema validation, namespace handling, and direct XML + * attribute access. The operation is thread-safe and synchronized on the internal XMLBeans monitor object.

    + * + * @return XmlString the label element as an XMLBeans type, or null if not set + */ public XmlString xgetLabel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -38,7 +89,16 @@ public XmlString xgetLabel() { return target; } } - + + /** + * Sets the label (descriptive name) for this custom laboratory test. + * + *

    This method updates the label element with the provided string value, creating the element + * if it does not already exist in the XML document. The operation is thread-safe and synchronized + * on the internal XMLBeans monitor object.

    + * + * @param label String the descriptive identifier for this custom lab test + */ public void setLabel(final String label) { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +110,17 @@ public void setLabel(final String label) { target.setStringValue(label); } } - + + /** + * Sets the label element using an XmlString object for advanced XML manipulation. + * + *

    This method updates the label element using an XMLBeans XmlString object, allowing for + * advanced XML operations such as preserving XML attributes, namespaces, and schema-specific + * formatting. The element is created if it does not already exist. The operation is thread-safe + * and synchronized on the internal XMLBeans monitor object.

    + * + * @param label XmlString the label element to set + */ public void xsetLabel(final XmlString label) { synchronized (this.monitor()) { this.check_orphaned(); @@ -62,7 +132,16 @@ public void xsetLabel(final XmlString label) { target.set((XmlObject)label); } } - + + /** + * Retrieves the result value of this custom laboratory test. + * + *

    This method returns the string value of the result element, which contains the actual test + * result or measurement value for this custom laboratory test. The operation is thread-safe and + * synchronized on the internal XMLBeans monitor object.

    + * + * @return String the result value of this custom lab test, or null if not set + */ public String getResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -74,7 +153,16 @@ public String getResult() { return target.getStringValue(); } } - + + /** + * Retrieves the result element as an XmlString object for advanced XML manipulation. + * + *

    This method provides access to the underlying XMLBeans XmlString representation of the result element, + * allowing for advanced XML operations such as schema validation, namespace handling, and direct XML + * attribute access. The operation is thread-safe and synchronized on the internal XMLBeans monitor object.

    + * + * @return XmlString the result element as an XMLBeans type, or null if not set + */ public XmlString xgetResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -83,7 +171,16 @@ public XmlString xgetResult() { return target; } } - + + /** + * Sets the result value for this custom laboratory test. + * + *

    This method updates the result element with the provided string value, creating the element + * if it does not already exist in the XML document. The operation is thread-safe and synchronized + * on the internal XMLBeans monitor object.

    + * + * @param result String the result value or measurement for this custom lab test + */ public void setResult(final String result) { synchronized (this.monitor()) { this.check_orphaned(); @@ -95,7 +192,17 @@ public void setResult(final String result) { target.setStringValue(result); } } - + + /** + * Sets the result element using an XmlString object for advanced XML manipulation. + * + *

    This method updates the result element using an XMLBeans XmlString object, allowing for + * advanced XML operations such as preserving XML attributes, namespaces, and schema-specific + * formatting. The element is created if it does not already exist. The operation is thread-safe + * and synchronized on the internal XMLBeans monitor object.

    + * + * @param result XmlString the result element to set + */ public void xsetResult(final XmlString result) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/DatingMethodsImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/DatingMethodsImpl.java index c4d80b935a9..4a72d35c72d 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/DatingMethodsImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/DatingMethodsImpl.java @@ -8,6 +8,29 @@ import ca.openosp.openo.ar2005.DatingMethods; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the DatingMethods interface for pregnancy dating documentation in antenatal records (AR2005). + * + * This class provides XMLBeans-based persistence for tracking pregnancy dating methods used in obstetric care. + * Dating methods are critical for establishing accurate gestational age, which determines appropriate prenatal + * care schedules, screening timelines, and delivery planning. The AR2005 (Antenatal Record 2005) format is used + * for standardized pregnancy documentation in Canadian healthcare settings. + * + * The implementation manages four dating method indicators: + *
      + *
    • Dates - Dating by last menstrual period (LMP) or menstrual dates
    • + *
    • T1US - First trimester ultrasound dating (most accurate, typically 8-13 weeks)
    • + *
    • T2US - Second trimester ultrasound dating (used when first trimester dating unavailable)
    • + *
    • ART - Assisted reproductive technology dating (IVF/embryo transfer provides precise conception date)
    • + *
    + * + * Thread-safe implementation using XMLBeans monitor synchronization for concurrent access to XML document store. + * Each property follows the XMLBeans pattern of providing both primitive and XmlObject accessors (get/xget, set/xset). + * + * @see DatingMethods + * @see ca.openosp.openo.ar2005 + * @since 2026-01-23 + */ public class DatingMethodsImpl extends XmlComplexContentImpl implements DatingMethods { private static final long serialVersionUID = 1L; @@ -15,11 +38,28 @@ public class DatingMethodsImpl extends XmlComplexContentImpl implements DatingMe private static final QName T1US$2; private static final QName T2US$4; private static final QName ART$6; - + + /** + * Constructs a new DatingMethodsImpl instance with the specified schema type. + * + * This constructor is typically called by the XMLBeans framework during XML parsing + * or when creating new instances through the DatingMethods.Factory methods. + * + * @param sType SchemaType the XMLBeans schema type definition for DatingMethods + */ public DatingMethodsImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves whether dating by last menstrual period (LMP) or menstrual dates is used. + * + * LMP dating is the traditional method of estimating gestational age based on the first day + * of the patient's last normal menstrual period. While commonly used as an initial dating method, + * it may be less accurate than ultrasound dating, particularly when menstrual cycles are irregular. + * + * @return boolean true if LMP/menstrual dates are used for pregnancy dating, false otherwise + */ public boolean getDates() { synchronized (this.monitor()) { this.check_orphaned(); @@ -28,7 +68,15 @@ public boolean getDates() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XMLBeans representation of the dates property. + * + * This method provides access to the underlying XmlBoolean object, allowing for advanced + * XML manipulation such as validation, schema access, and low-level document operations. + * + * @return XmlBoolean the XMLBeans object representing the dates element, or null if not set + */ public XmlBoolean xgetDates() { synchronized (this.monitor()) { this.check_orphaned(); @@ -37,7 +85,16 @@ public XmlBoolean xgetDates() { return target; } } - + + /** + * Sets whether dating by last menstrual period (LMP) or menstrual dates is used. + * + * This method updates the pregnancy dating method indicator for LMP-based dating. + * Multiple dating methods may be marked as true if different methods were used to + * confirm or establish gestational age during the pregnancy. + * + * @param dates boolean true to indicate LMP/menstrual dates are used, false otherwise + */ public void setDates(final boolean dates) { synchronized (this.monitor()) { this.check_orphaned(); @@ -49,7 +106,15 @@ public void setDates(final boolean dates) { target.setBooleanValue(dates); } } - + + /** + * Sets the dates property using an XMLBeans XmlBoolean object. + * + * This method allows setting the dates indicator using an XmlBoolean object, which may + * carry additional XML metadata such as validation state or schema information. + * + * @param dates XmlBoolean the XMLBeans object to set as the dates element value + */ public void xsetDates(final XmlBoolean dates) { synchronized (this.monitor()) { this.check_orphaned(); @@ -61,7 +126,18 @@ public void xsetDates(final XmlBoolean dates) { target.set((XmlObject)dates); } } - + + /** + * Retrieves whether first trimester ultrasound (T1US) dating is used. + * + * First trimester ultrasound dating (typically performed between 8-13 weeks gestation) is considered + * the most accurate method for establishing gestational age, with accuracy within 5-7 days. + * Crown-rump length (CRL) measurements obtained during this period provide the gold standard for + * pregnancy dating. When available, T1US dating typically supersedes LMP-based dating for clinical + * decision-making. + * + * @return boolean true if first trimester ultrasound dating is used, false otherwise + */ public boolean getT1US() { synchronized (this.monitor()) { this.check_orphaned(); @@ -70,7 +146,14 @@ public boolean getT1US() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XMLBeans representation of the T1US (first trimester ultrasound) property. + * + * This method provides access to the underlying XmlBoolean object for advanced XML operations. + * + * @return XmlBoolean the XMLBeans object representing the t1US element, or null if not set + */ public XmlBoolean xgetT1US() { synchronized (this.monitor()) { this.check_orphaned(); @@ -79,7 +162,16 @@ public XmlBoolean xgetT1US() { return target; } } - + + /** + * Sets whether first trimester ultrasound (T1US) dating is used. + * + * This method updates the indicator for first trimester ultrasound dating. Healthcare providers + * should document T1US dating when crown-rump length or early gestational sac measurements have + * been used to establish or confirm gestational age. + * + * @param t1US boolean true to indicate first trimester ultrasound dating is used, false otherwise + */ public void setT1US(final boolean t1US) { synchronized (this.monitor()) { this.check_orphaned(); @@ -91,7 +183,15 @@ public void setT1US(final boolean t1US) { target.setBooleanValue(t1US); } } - + + /** + * Sets the T1US property using an XMLBeans XmlBoolean object. + * + * This method allows setting the first trimester ultrasound indicator using an XmlBoolean + * object with associated XML metadata. + * + * @param t1US XmlBoolean the XMLBeans object to set as the t1US element value + */ public void xsetT1US(final XmlBoolean t1US) { synchronized (this.monitor()) { this.check_orphaned(); @@ -103,7 +203,18 @@ public void xsetT1US(final XmlBoolean t1US) { target.set((XmlObject)t1US); } } - + + /** + * Retrieves whether second trimester ultrasound (T2US) dating is used. + * + * Second trimester ultrasound dating (typically performed between 14-28 weeks gestation) is used + * when first trimester dating is unavailable or when initial prenatal care begins later in pregnancy. + * While less accurate than first trimester dating (accuracy within 7-10 days), T2US dating using + * biometric parameters (biparietal diameter, femur length, abdominal circumference) provides more + * reliable gestational age estimation than LMP alone, particularly when menstrual history is uncertain. + * + * @return boolean true if second trimester ultrasound dating is used, false otherwise + */ public boolean getT2US() { synchronized (this.monitor()) { this.check_orphaned(); @@ -112,7 +223,14 @@ public boolean getT2US() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XMLBeans representation of the T2US (second trimester ultrasound) property. + * + * This method provides access to the underlying XmlBoolean object for advanced XML operations. + * + * @return XmlBoolean the XMLBeans object representing the t2US element, or null if not set + */ public XmlBoolean xgetT2US() { synchronized (this.monitor()) { this.check_orphaned(); @@ -121,7 +239,16 @@ public XmlBoolean xgetT2US() { return target; } } - + + /** + * Sets whether second trimester ultrasound (T2US) dating is used. + * + * This method updates the indicator for second trimester ultrasound dating. Healthcare providers + * should document T2US dating when biometric measurements from mid-pregnancy ultrasound have been + * used to establish or refine gestational age estimates. + * + * @param t2US boolean true to indicate second trimester ultrasound dating is used, false otherwise + */ public void setT2US(final boolean t2US) { synchronized (this.monitor()) { this.check_orphaned(); @@ -133,7 +260,15 @@ public void setT2US(final boolean t2US) { target.setBooleanValue(t2US); } } - + + /** + * Sets the T2US property using an XMLBeans XmlBoolean object. + * + * This method allows setting the second trimester ultrasound indicator using an XmlBoolean + * object with associated XML metadata. + * + * @param t2US XmlBoolean the XMLBeans object to set as the t2US element value + */ public void xsetT2US(final XmlBoolean t2US) { synchronized (this.monitor()) { this.check_orphaned(); @@ -145,7 +280,19 @@ public void xsetT2US(final XmlBoolean t2US) { target.set((XmlObject)t2US); } } - + + /** + * Retrieves whether assisted reproductive technology (ART) dating is used. + * + * ART dating is used for pregnancies conceived through assisted reproductive technologies such as + * in vitro fertilization (IVF), intracytoplasmic sperm injection (ICSI), or embryo transfer. + * This method provides the most precise gestational age calculation as the exact date of conception + * or embryo transfer is known. ART dating accuracy is within 1 day and takes precedence over all + * other dating methods when available. The gestational age is calculated from the embryo transfer + * date plus the embryo age at transfer. + * + * @return boolean true if ART dating is used, false otherwise + */ public boolean getArt() { synchronized (this.monitor()) { this.check_orphaned(); @@ -154,7 +301,14 @@ public boolean getArt() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XMLBeans representation of the ART (assisted reproductive technology) property. + * + * This method provides access to the underlying XmlBoolean object for advanced XML operations. + * + * @return XmlBoolean the XMLBeans object representing the art element, or null if not set + */ public XmlBoolean xgetArt() { synchronized (this.monitor()) { this.check_orphaned(); @@ -163,7 +317,16 @@ public XmlBoolean xgetArt() { return target; } } - + + /** + * Sets whether assisted reproductive technology (ART) dating is used. + * + * This method updates the indicator for ART dating. Healthcare providers should document ART + * dating for all pregnancies conceived through assisted reproductive technologies where the + * precise conception or embryo transfer date is known. + * + * @param art boolean true to indicate ART dating is used, false otherwise + */ public void setArt(final boolean art) { synchronized (this.monitor()) { this.check_orphaned(); @@ -175,7 +338,15 @@ public void setArt(final boolean art) { target.setBooleanValue(art); } } - + + /** + * Sets the ART property using an XMLBeans XmlBoolean object. + * + * This method allows setting the ART indicator using an XmlBoolean object with associated + * XML metadata. + * + * @param art XmlBoolean the XMLBeans object to set as the art element value + */ public void xsetArt(final XmlBoolean art) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/DiscussionTopicsTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/DiscussionTopicsTypeImpl.java index 179ce98d427..39c47fed250 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/DiscussionTopicsTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/DiscussionTopicsTypeImpl.java @@ -8,6 +8,78 @@ import ca.openosp.openo.ar2005.DiscussionTopicsType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of prenatal discussion topics for the Antenatal Record (AR2005) healthcare form. + * + * This class provides the concrete implementation of the DiscussionTopicsType interface, representing + * a comprehensive set of prenatal discussion topics that healthcare providers should cover during + * prenatal care visits in the British Columbia Antenatal Record (BCAR) system. + * + * The implementation uses Apache XMLBeans framework to provide XML-based persistence and type-safe + * access to 21 different discussion topic categories covering the full spectrum of prenatal care: + * + *

    Pregnancy Lifestyle Topics:

    + *
      + *
    • Exercise during pregnancy
    • + *
    • Work planning and maternity leave
    • + *
    • Sexual intercourse safety
    • + *
    • Travel restrictions and guidelines
    • + *
    + * + *

    Prenatal Education:

    + *
      + *
    • Prenatal classes availability
    • + *
    • Birth plan development
    • + *
    • On-call provider information
    • + *
    + * + *

    Medical Warning Signs:

    + *
      + *
    • Preterm labour recognition
    • + *
    • PROM (Premature Rupture of Membranes)
    • + *
    • APH (Antepartum Hemorrhage)
    • + *
    • Fetal movement monitoring
    • + *
    + * + *

    Labour and Delivery:

    + *
      + *
    • Admission timing to hospital
    • + *
    • Pain management options
    • + *
    • Labour support persons
    • + *
    + * + *

    Newborn Care:

    + *
      + *
    • Breastfeeding and infant feeding
    • + *
    • Circumcision decision-making
    • + *
    • Car seat safety requirements
    • + *
    • Discharge planning
    • + *
    + * + *

    Postpartum Topics:

    + *
      + *
    • Depression screening and mental health
    • + *
    • Contraception options
    • + *
    • Postpartum care and follow-up
    • + *
    + * + * Each topic is represented as a boolean flag stored in XML format, allowing healthcare providers + * to track which educational discussions have been completed with each patient. This tracking + * supports comprehensive prenatal care documentation and helps ensure all important topics are + * addressed during the course of pregnancy. + * + * The class extends XmlComplexContentImpl to leverage Apache XMLBeans' XML serialization, + * deserialization, and validation capabilities. All property access is thread-safe through + * synchronization on internal monitors, and changes are persisted to the underlying XML store. + * + * This implementation is generated from XML schema definitions and should not be modified directly. + * Changes to the discussion topics structure should be made in the XML schema and regenerated. + * + * @see DiscussionTopicsType + * @see XmlComplexContentImpl + * @see XmlBoolean + * @since 2026-01-24 + */ public class DiscussionTopicsTypeImpl extends XmlComplexContentImpl implements DiscussionTopicsType { private static final long serialVersionUID = 1L; @@ -32,11 +104,28 @@ public class DiscussionTopicsTypeImpl extends XmlComplexContentImpl implements D private static final QName DEPRESSION$36; private static final QName CONTRACEPTION$38; private static final QName POSTPARTUMCARE$40; - + + /** + * Constructs a new DiscussionTopicsTypeImpl instance with the specified schema type. + * + * This constructor initializes the XMLBeans complex content implementation with the provided + * schema type, enabling type-safe XML processing for prenatal discussion topics. + * + * @param sType SchemaType the schema type definition for this XML complex type + */ public DiscussionTopicsTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the exercise discussion flag indicating whether exercise during pregnancy has been discussed. + * + * This method retrieves the boolean value from the underlying XML store indicating whether + * the healthcare provider has discussed exercise and physical activity guidelines during pregnancy + * with the patient. + * + * @return boolean true if exercise topic has been discussed, false otherwise + */ public boolean getExercise() { synchronized (this.monitor()) { this.check_orphaned(); @@ -45,7 +134,15 @@ public boolean getExercise() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the exercise discussion flag as an XmlBoolean object. + * + * This method retrieves the exercise discussion flag as an Apache XMLBeans XmlBoolean object, + * providing access to the underlying XML representation and additional XMLBeans functionality. + * + * @return XmlBoolean the exercise discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetExercise() { synchronized (this.monitor()) { this.check_orphaned(); @@ -54,7 +151,16 @@ public XmlBoolean xgetExercise() { return target; } } - + + /** + * Sets the exercise discussion flag. + * + * This method updates the boolean value in the underlying XML store to indicate whether + * the exercise topic has been discussed with the patient. If the element does not exist + * in the XML document, it will be created. + * + * @param exercise boolean true if exercise topic has been discussed, false otherwise + */ public void setExercise(final boolean exercise) { synchronized (this.monitor()) { this.check_orphaned(); @@ -66,7 +172,16 @@ public void setExercise(final boolean exercise) { target.setBooleanValue(exercise); } } - + + /** + * Sets the exercise discussion flag using an XmlBoolean object. + * + * This method updates the exercise discussion flag using an Apache XMLBeans XmlBoolean object, + * allowing for XML-aware updates with schema validation. If the element does not exist + * in the XML document, it will be created. + * + * @param exercise XmlBoolean the exercise discussion flag as an XML boolean + */ public void xsetExercise(final XmlBoolean exercise) { synchronized (this.monitor()) { this.check_orphaned(); @@ -78,7 +193,16 @@ public void xsetExercise(final XmlBoolean exercise) { target.set((XmlObject)exercise); } } - + + /** + * Gets the work plan discussion flag indicating whether work planning during pregnancy has been discussed. + * + * This method retrieves the boolean value from the underlying XML store indicating whether + * the healthcare provider has discussed work planning, maternity leave, and workplace safety + * during pregnancy with the patient. + * + * @return boolean true if work plan topic has been discussed, false otherwise + */ public boolean getWorkPlan() { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +211,12 @@ public boolean getWorkPlan() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the work plan discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the work plan discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetWorkPlan() { synchronized (this.monitor()) { this.check_orphaned(); @@ -96,7 +225,12 @@ public XmlBoolean xgetWorkPlan() { return target; } } - + + /** + * Sets the work plan discussion flag. + * + * @param workPlan boolean true if work plan topic has been discussed, false otherwise + */ public void setWorkPlan(final boolean workPlan) { synchronized (this.monitor()) { this.check_orphaned(); @@ -108,7 +242,12 @@ public void setWorkPlan(final boolean workPlan) { target.setBooleanValue(workPlan); } } - + + /** + * Sets the work plan discussion flag using an XmlBoolean object. + * + * @param workPlan XmlBoolean the work plan discussion flag as an XML boolean + */ public void xsetWorkPlan(final XmlBoolean workPlan) { synchronized (this.monitor()) { this.check_orphaned(); @@ -120,7 +259,12 @@ public void xsetWorkPlan(final XmlBoolean workPlan) { target.set((XmlObject)workPlan); } } - + + /** + * Gets the intercourse discussion flag indicating whether sexual intercourse during pregnancy has been discussed. + * + * @return boolean true if intercourse topic has been discussed, false otherwise + */ public boolean getIntercourse() { synchronized (this.monitor()) { this.check_orphaned(); @@ -129,7 +273,12 @@ public boolean getIntercourse() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the intercourse discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the intercourse discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetIntercourse() { synchronized (this.monitor()) { this.check_orphaned(); @@ -138,7 +287,12 @@ public XmlBoolean xgetIntercourse() { return target; } } - + + /** + * Sets the intercourse discussion flag. + * + * @param intercourse boolean true if intercourse topic has been discussed, false otherwise + */ public void setIntercourse(final boolean intercourse) { synchronized (this.monitor()) { this.check_orphaned(); @@ -150,7 +304,12 @@ public void setIntercourse(final boolean intercourse) { target.setBooleanValue(intercourse); } } - + + /** + * Sets the intercourse discussion flag using an XmlBoolean object. + * + * @param intercourse XmlBoolean the intercourse discussion flag as an XML boolean + */ public void xsetIntercourse(final XmlBoolean intercourse) { synchronized (this.monitor()) { this.check_orphaned(); @@ -162,7 +321,12 @@ public void xsetIntercourse(final XmlBoolean intercourse) { target.set((XmlObject)intercourse); } } - + + /** + * Gets the travel discussion flag indicating whether travel during pregnancy has been discussed. + * + * @return boolean true if travel topic has been discussed, false otherwise + */ public boolean getTravel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -171,7 +335,12 @@ public boolean getTravel() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the travel discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the travel discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetTravel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -180,7 +349,12 @@ public XmlBoolean xgetTravel() { return target; } } - + + /** + * Sets the travel discussion flag. + * + * @param travel boolean true if travel topic has been discussed, false otherwise + */ public void setTravel(final boolean travel) { synchronized (this.monitor()) { this.check_orphaned(); @@ -192,7 +366,12 @@ public void setTravel(final boolean travel) { target.setBooleanValue(travel); } } - + + /** + * Sets the travel discussion flag using an XmlBoolean object. + * + * @param travel XmlBoolean the travel discussion flag as an XML boolean + */ public void xsetTravel(final XmlBoolean travel) { synchronized (this.monitor()) { this.check_orphaned(); @@ -204,7 +383,12 @@ public void xsetTravel(final XmlBoolean travel) { target.set((XmlObject)travel); } } - + + /** + * Gets the prenatal classes discussion flag indicating whether prenatal education classes have been discussed. + * + * @return boolean true if prenatal classes topic has been discussed, false otherwise + */ public boolean getPrenatalClasses() { synchronized (this.monitor()) { this.check_orphaned(); @@ -213,7 +397,12 @@ public boolean getPrenatalClasses() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the prenatal classes discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the prenatal classes discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetPrenatalClasses() { synchronized (this.monitor()) { this.check_orphaned(); @@ -222,7 +411,12 @@ public XmlBoolean xgetPrenatalClasses() { return target; } } - + + /** + * Sets the prenatal classes discussion flag. + * + * @param prenatalClasses boolean true if prenatal classes topic has been discussed, false otherwise + */ public void setPrenatalClasses(final boolean prenatalClasses) { synchronized (this.monitor()) { this.check_orphaned(); @@ -234,7 +428,12 @@ public void setPrenatalClasses(final boolean prenatalClasses) { target.setBooleanValue(prenatalClasses); } } - + + /** + * Sets the prenatal classes discussion flag using an XmlBoolean object. + * + * @param prenatalClasses XmlBoolean the prenatal classes discussion flag as an XML boolean + */ public void xsetPrenatalClasses(final XmlBoolean prenatalClasses) { synchronized (this.monitor()) { this.check_orphaned(); @@ -246,7 +445,12 @@ public void xsetPrenatalClasses(final XmlBoolean prenatalClasses) { target.set((XmlObject)prenatalClasses); } } - + + /** + * Gets the birth plan discussion flag indicating whether birth planning has been discussed. + * + * @return boolean true if birth plan topic has been discussed, false otherwise + */ public boolean getBirthPlan() { synchronized (this.monitor()) { this.check_orphaned(); @@ -255,7 +459,12 @@ public boolean getBirthPlan() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the birth plan discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the birth plan discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetBirthPlan() { synchronized (this.monitor()) { this.check_orphaned(); @@ -264,7 +473,12 @@ public XmlBoolean xgetBirthPlan() { return target; } } - + + /** + * Sets the birth plan discussion flag. + * + * @param birthPlan boolean true if birth plan topic has been discussed, false otherwise + */ public void setBirthPlan(final boolean birthPlan) { synchronized (this.monitor()) { this.check_orphaned(); @@ -276,7 +490,12 @@ public void setBirthPlan(final boolean birthPlan) { target.setBooleanValue(birthPlan); } } - + + /** + * Sets the birth plan discussion flag using an XmlBoolean object. + * + * @param birthPlan XmlBoolean the birth plan discussion flag as an XML boolean + */ public void xsetBirthPlan(final XmlBoolean birthPlan) { synchronized (this.monitor()) { this.check_orphaned(); @@ -288,7 +507,12 @@ public void xsetBirthPlan(final XmlBoolean birthPlan) { target.set((XmlObject)birthPlan); } } - + + /** + * Gets the on-call providers discussion flag indicating whether on-call provider information has been discussed. + * + * @return boolean true if on-call providers topic has been discussed, false otherwise + */ public boolean getOnCallProviders() { synchronized (this.monitor()) { this.check_orphaned(); @@ -297,7 +521,12 @@ public boolean getOnCallProviders() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the on-call providers discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the on-call providers discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetOnCallProviders() { synchronized (this.monitor()) { this.check_orphaned(); @@ -306,7 +535,12 @@ public XmlBoolean xgetOnCallProviders() { return target; } } - + + /** + * Sets the on-call providers discussion flag. + * + * @param onCallProviders boolean true if on-call providers topic has been discussed, false otherwise + */ public void setOnCallProviders(final boolean onCallProviders) { synchronized (this.monitor()) { this.check_orphaned(); @@ -318,7 +552,12 @@ public void setOnCallProviders(final boolean onCallProviders) { target.setBooleanValue(onCallProviders); } } - + + /** + * Sets the on-call providers discussion flag using an XmlBoolean object. + * + * @param onCallProviders XmlBoolean the on-call providers discussion flag as an XML boolean + */ public void xsetOnCallProviders(final XmlBoolean onCallProviders) { synchronized (this.monitor()) { this.check_orphaned(); @@ -330,7 +569,12 @@ public void xsetOnCallProviders(final XmlBoolean onCallProviders) { target.set((XmlObject)onCallProviders); } } - + + /** + * Gets the preterm labour discussion flag indicating whether signs and risks of preterm labour have been discussed. + * + * @return boolean true if preterm labour topic has been discussed, false otherwise + */ public boolean getPretermLabour() { synchronized (this.monitor()) { this.check_orphaned(); @@ -339,7 +583,12 @@ public boolean getPretermLabour() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the preterm labour discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the preterm labour discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetPretermLabour() { synchronized (this.monitor()) { this.check_orphaned(); @@ -348,7 +597,12 @@ public XmlBoolean xgetPretermLabour() { return target; } } - + + /** + * Sets the preterm labour discussion flag. + * + * @param pretermLabour boolean true if preterm labour topic has been discussed, false otherwise + */ public void setPretermLabour(final boolean pretermLabour) { synchronized (this.monitor()) { this.check_orphaned(); @@ -360,7 +614,12 @@ public void setPretermLabour(final boolean pretermLabour) { target.setBooleanValue(pretermLabour); } } - + + /** + * Sets the preterm labour discussion flag using an XmlBoolean object. + * + * @param pretermLabour XmlBoolean the preterm labour discussion flag as an XML boolean + */ public void xsetPretermLabour(final XmlBoolean pretermLabour) { synchronized (this.monitor()) { this.check_orphaned(); @@ -372,7 +631,12 @@ public void xsetPretermLabour(final XmlBoolean pretermLabour) { target.set((XmlObject)pretermLabour); } } - + + /** + * Gets the PROM discussion flag indicating whether Premature Rupture of Membranes has been discussed. + * + * @return boolean true if PROM topic has been discussed, false otherwise + */ public boolean getPROM() { synchronized (this.monitor()) { this.check_orphaned(); @@ -381,7 +645,12 @@ public boolean getPROM() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the PROM discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the PROM discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetPROM() { synchronized (this.monitor()) { this.check_orphaned(); @@ -390,7 +659,12 @@ public XmlBoolean xgetPROM() { return target; } } - + + /** + * Sets the PROM discussion flag. + * + * @param prom boolean true if PROM topic has been discussed, false otherwise + */ public void setPROM(final boolean prom) { synchronized (this.monitor()) { this.check_orphaned(); @@ -402,7 +676,12 @@ public void setPROM(final boolean prom) { target.setBooleanValue(prom); } } - + + /** + * Sets the PROM discussion flag using an XmlBoolean object. + * + * @param prom XmlBoolean the PROM discussion flag as an XML boolean + */ public void xsetPROM(final XmlBoolean prom) { synchronized (this.monitor()) { this.check_orphaned(); @@ -414,7 +693,12 @@ public void xsetPROM(final XmlBoolean prom) { target.set((XmlObject)prom); } } - + + /** + * Gets the APH discussion flag indicating whether Antepartum Hemorrhage has been discussed. + * + * @return boolean true if APH topic has been discussed, false otherwise + */ public boolean getAPH() { synchronized (this.monitor()) { this.check_orphaned(); @@ -423,7 +707,12 @@ public boolean getAPH() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the APH discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the APH discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetAPH() { synchronized (this.monitor()) { this.check_orphaned(); @@ -432,7 +721,12 @@ public XmlBoolean xgetAPH() { return target; } } - + + /** + * Sets the APH discussion flag. + * + * @param aph boolean true if APH topic has been discussed, false otherwise + */ public void setAPH(final boolean aph) { synchronized (this.monitor()) { this.check_orphaned(); @@ -444,7 +738,12 @@ public void setAPH(final boolean aph) { target.setBooleanValue(aph); } } - + + /** + * Sets the APH discussion flag using an XmlBoolean object. + * + * @param aph XmlBoolean the APH discussion flag as an XML boolean + */ public void xsetAPH(final XmlBoolean aph) { synchronized (this.monitor()) { this.check_orphaned(); @@ -456,7 +755,12 @@ public void xsetAPH(final XmlBoolean aph) { target.set((XmlObject)aph); } } - + + /** + * Gets the fetal movement discussion flag indicating whether monitoring fetal movement has been discussed. + * + * @return boolean true if fetal movement topic has been discussed, false otherwise + */ public boolean getFetalMovement() { synchronized (this.monitor()) { this.check_orphaned(); @@ -465,7 +769,12 @@ public boolean getFetalMovement() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the fetal movement discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the fetal movement discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetFetalMovement() { synchronized (this.monitor()) { this.check_orphaned(); @@ -474,7 +783,12 @@ public XmlBoolean xgetFetalMovement() { return target; } } - + + /** + * Sets the fetal movement discussion flag. + * + * @param fetalMovement boolean true if fetal movement topic has been discussed, false otherwise + */ public void setFetalMovement(final boolean fetalMovement) { synchronized (this.monitor()) { this.check_orphaned(); @@ -486,7 +800,12 @@ public void setFetalMovement(final boolean fetalMovement) { target.setBooleanValue(fetalMovement); } } - + + /** + * Sets the fetal movement discussion flag using an XmlBoolean object. + * + * @param fetalMovement XmlBoolean the fetal movement discussion flag as an XML boolean + */ public void xsetFetalMovement(final XmlBoolean fetalMovement) { synchronized (this.monitor()) { this.check_orphaned(); @@ -498,7 +817,12 @@ public void xsetFetalMovement(final XmlBoolean fetalMovement) { target.set((XmlObject)fetalMovement); } } - + + /** + * Gets the admission timing discussion flag indicating whether when to come to hospital for labour has been discussed. + * + * @return boolean true if admission timing topic has been discussed, false otherwise + */ public boolean getAdmissionTiming() { synchronized (this.monitor()) { this.check_orphaned(); @@ -507,7 +831,12 @@ public boolean getAdmissionTiming() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the admission timing discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the admission timing discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetAdmissionTiming() { synchronized (this.monitor()) { this.check_orphaned(); @@ -516,7 +845,12 @@ public XmlBoolean xgetAdmissionTiming() { return target; } } - + + /** + * Sets the admission timing discussion flag. + * + * @param admissionTiming boolean true if admission timing topic has been discussed, false otherwise + */ public void setAdmissionTiming(final boolean admissionTiming) { synchronized (this.monitor()) { this.check_orphaned(); @@ -528,7 +862,12 @@ public void setAdmissionTiming(final boolean admissionTiming) { target.setBooleanValue(admissionTiming); } } - + + /** + * Sets the admission timing discussion flag using an XmlBoolean object. + * + * @param admissionTiming XmlBoolean the admission timing discussion flag as an XML boolean + */ public void xsetAdmissionTiming(final XmlBoolean admissionTiming) { synchronized (this.monitor()) { this.check_orphaned(); @@ -540,7 +879,12 @@ public void xsetAdmissionTiming(final XmlBoolean admissionTiming) { target.set((XmlObject)admissionTiming); } } - + + /** + * Gets the pain management discussion flag indicating whether labour pain management options have been discussed. + * + * @return boolean true if pain management topic has been discussed, false otherwise + */ public boolean getPainManagement() { synchronized (this.monitor()) { this.check_orphaned(); @@ -549,7 +893,12 @@ public boolean getPainManagement() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the pain management discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the pain management discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetPainManagement() { synchronized (this.monitor()) { this.check_orphaned(); @@ -558,7 +907,12 @@ public XmlBoolean xgetPainManagement() { return target; } } - + + /** + * Sets the pain management discussion flag. + * + * @param painManagement boolean true if pain management topic has been discussed, false otherwise + */ public void setPainManagement(final boolean painManagement) { synchronized (this.monitor()) { this.check_orphaned(); @@ -570,7 +924,12 @@ public void setPainManagement(final boolean painManagement) { target.setBooleanValue(painManagement); } } - + + /** + * Sets the pain management discussion flag using an XmlBoolean object. + * + * @param painManagement XmlBoolean the pain management discussion flag as an XML boolean + */ public void xsetPainManagement(final XmlBoolean painManagement) { synchronized (this.monitor()) { this.check_orphaned(); @@ -582,7 +941,12 @@ public void xsetPainManagement(final XmlBoolean painManagement) { target.set((XmlObject)painManagement); } } - + + /** + * Gets the labour support discussion flag indicating whether support persons during labour have been discussed. + * + * @return boolean true if labour support topic has been discussed, false otherwise + */ public boolean getLabourSupport() { synchronized (this.monitor()) { this.check_orphaned(); @@ -591,7 +955,12 @@ public boolean getLabourSupport() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the labour support discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the labour support discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetLabourSupport() { synchronized (this.monitor()) { this.check_orphaned(); @@ -600,7 +969,12 @@ public XmlBoolean xgetLabourSupport() { return target; } } - + + /** + * Sets the labour support discussion flag. + * + * @param labourSupport boolean true if labour support topic has been discussed, false otherwise + */ public void setLabourSupport(final boolean labourSupport) { synchronized (this.monitor()) { this.check_orphaned(); @@ -612,7 +986,12 @@ public void setLabourSupport(final boolean labourSupport) { target.setBooleanValue(labourSupport); } } - + + /** + * Sets the labour support discussion flag using an XmlBoolean object. + * + * @param labourSupport XmlBoolean the labour support discussion flag as an XML boolean + */ public void xsetLabourSupport(final XmlBoolean labourSupport) { synchronized (this.monitor()) { this.check_orphaned(); @@ -624,7 +1003,12 @@ public void xsetLabourSupport(final XmlBoolean labourSupport) { target.set((XmlObject)labourSupport); } } - + + /** + * Gets the breastfeeding discussion flag indicating whether breastfeeding and infant feeding options have been discussed. + * + * @return boolean true if breastfeeding topic has been discussed, false otherwise + */ public boolean getBreastFeeding() { synchronized (this.monitor()) { this.check_orphaned(); @@ -633,7 +1017,12 @@ public boolean getBreastFeeding() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the breastfeeding discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the breastfeeding discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetBreastFeeding() { synchronized (this.monitor()) { this.check_orphaned(); @@ -642,7 +1031,12 @@ public XmlBoolean xgetBreastFeeding() { return target; } } - + + /** + * Sets the breastfeeding discussion flag. + * + * @param breastFeeding boolean true if breastfeeding topic has been discussed, false otherwise + */ public void setBreastFeeding(final boolean breastFeeding) { synchronized (this.monitor()) { this.check_orphaned(); @@ -654,7 +1048,12 @@ public void setBreastFeeding(final boolean breastFeeding) { target.setBooleanValue(breastFeeding); } } - + + /** + * Sets the breastfeeding discussion flag using an XmlBoolean object. + * + * @param breastFeeding XmlBoolean the breastfeeding discussion flag as an XML boolean + */ public void xsetBreastFeeding(final XmlBoolean breastFeeding) { synchronized (this.monitor()) { this.check_orphaned(); @@ -666,7 +1065,12 @@ public void xsetBreastFeeding(final XmlBoolean breastFeeding) { target.set((XmlObject)breastFeeding); } } - + + /** + * Gets the circumcision discussion flag indicating whether newborn circumcision has been discussed. + * + * @return boolean true if circumcision topic has been discussed, false otherwise + */ public boolean getCircumcision() { synchronized (this.monitor()) { this.check_orphaned(); @@ -675,7 +1079,12 @@ public boolean getCircumcision() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the circumcision discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the circumcision discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetCircumcision() { synchronized (this.monitor()) { this.check_orphaned(); @@ -684,7 +1093,12 @@ public XmlBoolean xgetCircumcision() { return target; } } - + + /** + * Sets the circumcision discussion flag. + * + * @param circumcision boolean true if circumcision topic has been discussed, false otherwise + */ public void setCircumcision(final boolean circumcision) { synchronized (this.monitor()) { this.check_orphaned(); @@ -696,7 +1110,12 @@ public void setCircumcision(final boolean circumcision) { target.setBooleanValue(circumcision); } } - + + /** + * Sets the circumcision discussion flag using an XmlBoolean object. + * + * @param circumcision XmlBoolean the circumcision discussion flag as an XML boolean + */ public void xsetCircumcision(final XmlBoolean circumcision) { synchronized (this.monitor()) { this.check_orphaned(); @@ -708,7 +1127,12 @@ public void xsetCircumcision(final XmlBoolean circumcision) { target.set((XmlObject)circumcision); } } - + + /** + * Gets the discharge planning discussion flag indicating whether hospital discharge planning has been discussed. + * + * @return boolean true if discharge planning topic has been discussed, false otherwise + */ public boolean getDischargePlanning() { synchronized (this.monitor()) { this.check_orphaned(); @@ -717,7 +1141,12 @@ public boolean getDischargePlanning() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the discharge planning discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the discharge planning discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetDischargePlanning() { synchronized (this.monitor()) { this.check_orphaned(); @@ -726,7 +1155,12 @@ public XmlBoolean xgetDischargePlanning() { return target; } } - + + /** + * Sets the discharge planning discussion flag. + * + * @param dischargePlanning boolean true if discharge planning topic has been discussed, false otherwise + */ public void setDischargePlanning(final boolean dischargePlanning) { synchronized (this.monitor()) { this.check_orphaned(); @@ -738,7 +1172,12 @@ public void setDischargePlanning(final boolean dischargePlanning) { target.setBooleanValue(dischargePlanning); } } - + + /** + * Sets the discharge planning discussion flag using an XmlBoolean object. + * + * @param dischargePlanning XmlBoolean the discharge planning discussion flag as an XML boolean + */ public void xsetDischargePlanning(final XmlBoolean dischargePlanning) { synchronized (this.monitor()) { this.check_orphaned(); @@ -750,7 +1189,12 @@ public void xsetDischargePlanning(final XmlBoolean dischargePlanning) { target.set((XmlObject)dischargePlanning); } } - + + /** + * Gets the car seat safety discussion flag indicating whether infant car seat safety has been discussed. + * + * @return boolean true if car seat safety topic has been discussed, false otherwise + */ public boolean getCarSeatSafety() { synchronized (this.monitor()) { this.check_orphaned(); @@ -759,7 +1203,12 @@ public boolean getCarSeatSafety() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the car seat safety discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the car seat safety discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetCarSeatSafety() { synchronized (this.monitor()) { this.check_orphaned(); @@ -768,7 +1217,12 @@ public XmlBoolean xgetCarSeatSafety() { return target; } } - + + /** + * Sets the car seat safety discussion flag. + * + * @param carSeatSafety boolean true if car seat safety topic has been discussed, false otherwise + */ public void setCarSeatSafety(final boolean carSeatSafety) { synchronized (this.monitor()) { this.check_orphaned(); @@ -780,7 +1234,12 @@ public void setCarSeatSafety(final boolean carSeatSafety) { target.setBooleanValue(carSeatSafety); } } - + + /** + * Sets the car seat safety discussion flag using an XmlBoolean object. + * + * @param carSeatSafety XmlBoolean the car seat safety discussion flag as an XML boolean + */ public void xsetCarSeatSafety(final XmlBoolean carSeatSafety) { synchronized (this.monitor()) { this.check_orphaned(); @@ -792,7 +1251,12 @@ public void xsetCarSeatSafety(final XmlBoolean carSeatSafety) { target.set((XmlObject)carSeatSafety); } } - + + /** + * Gets the depression discussion flag indicating whether postpartum depression screening has been discussed. + * + * @return boolean true if depression topic has been discussed, false otherwise + */ public boolean getDepression() { synchronized (this.monitor()) { this.check_orphaned(); @@ -801,7 +1265,12 @@ public boolean getDepression() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the depression discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the depression discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetDepression() { synchronized (this.monitor()) { this.check_orphaned(); @@ -810,7 +1279,12 @@ public XmlBoolean xgetDepression() { return target; } } - + + /** + * Sets the depression discussion flag. + * + * @param depression boolean true if depression topic has been discussed, false otherwise + */ public void setDepression(final boolean depression) { synchronized (this.monitor()) { this.check_orphaned(); @@ -822,7 +1296,12 @@ public void setDepression(final boolean depression) { target.setBooleanValue(depression); } } - + + /** + * Sets the depression discussion flag using an XmlBoolean object. + * + * @param depression XmlBoolean the depression discussion flag as an XML boolean + */ public void xsetDepression(final XmlBoolean depression) { synchronized (this.monitor()) { this.check_orphaned(); @@ -834,7 +1313,12 @@ public void xsetDepression(final XmlBoolean depression) { target.set((XmlObject)depression); } } - + + /** + * Gets the contraception discussion flag indicating whether postpartum contraception options have been discussed. + * + * @return boolean true if contraception topic has been discussed, false otherwise + */ public boolean getContraception() { synchronized (this.monitor()) { this.check_orphaned(); @@ -843,7 +1327,12 @@ public boolean getContraception() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the contraception discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the contraception discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetContraception() { synchronized (this.monitor()) { this.check_orphaned(); @@ -852,7 +1341,12 @@ public XmlBoolean xgetContraception() { return target; } } - + + /** + * Sets the contraception discussion flag. + * + * @param contraception boolean true if contraception topic has been discussed, false otherwise + */ public void setContraception(final boolean contraception) { synchronized (this.monitor()) { this.check_orphaned(); @@ -864,7 +1358,12 @@ public void setContraception(final boolean contraception) { target.setBooleanValue(contraception); } } - + + /** + * Sets the contraception discussion flag using an XmlBoolean object. + * + * @param contraception XmlBoolean the contraception discussion flag as an XML boolean + */ public void xsetContraception(final XmlBoolean contraception) { synchronized (this.monitor()) { this.check_orphaned(); @@ -876,7 +1375,12 @@ public void xsetContraception(final XmlBoolean contraception) { target.set((XmlObject)contraception); } } - + + /** + * Gets the postpartum care discussion flag indicating whether postpartum care and follow-up have been discussed. + * + * @return boolean true if postpartum care topic has been discussed, false otherwise + */ public boolean getPostpartumCare() { synchronized (this.monitor()) { this.check_orphaned(); @@ -885,7 +1389,12 @@ public boolean getPostpartumCare() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the postpartum care discussion flag as an XmlBoolean object. + * + * @return XmlBoolean the postpartum care discussion flag as an XML boolean, or null if not set + */ public XmlBoolean xgetPostpartumCare() { synchronized (this.monitor()) { this.check_orphaned(); @@ -894,7 +1403,12 @@ public XmlBoolean xgetPostpartumCare() { return target; } } - + + /** + * Sets the postpartum care discussion flag. + * + * @param postpartumCare boolean true if postpartum care topic has been discussed, false otherwise + */ public void setPostpartumCare(final boolean postpartumCare) { synchronized (this.monitor()) { this.check_orphaned(); @@ -906,7 +1420,12 @@ public void setPostpartumCare(final boolean postpartumCare) { target.setBooleanValue(postpartumCare); } } - + + /** + * Sets the postpartum care discussion flag using an XmlBoolean object. + * + * @param postpartumCare XmlBoolean the postpartum care discussion flag as an XML boolean + */ public void xsetPostpartumCare(final XmlBoolean postpartumCare) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/EthnicValueTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/EthnicValueTypeImpl.java index 9559eb83282..dc73dfaace6 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/EthnicValueTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/EthnicValueTypeImpl.java @@ -4,14 +4,56 @@ import ca.openosp.openo.ar2005.EthnicValueType; import org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx; +/** + * Implementation class for the EthnicValueType XML enumeration type used in BC Antenatal Record (BCAR) 2005 forms. + * + *

    This class provides the concrete implementation for handling ethnicity enumeration values in pregnancy care + * documentation. It extends Apache XMLBeans' JavaStringEnumerationHolderEx to support XML Schema enumeration + * restrictions for ethnicity codes defined in the BCAR forms system.

    + * + *

    The supported ethnicity codes include:

    + *
      + *
    • ANC001, ANC002, ANC005, ANC007 - Specific ethnicity classifications
    • + *
    • OTHER - Other ethnicity not listed
    • + *
    • UN - Unknown/Not specified
    • + *
    + * + *

    This implementation is part of OpenO EMR's healthcare data integration layer for British Columbia's + * standardized antenatal record forms, ensuring compliance with provincial maternity care documentation + * requirements.

    + * + * @see EthnicValueType + * @see ca.openosp.openo.ar2005.PatientInformation + * @see ca.openosp.openo.ar2005.ARRecord + * @since 2026-01-23 + */ public class EthnicValueTypeImpl extends JavaStringEnumerationHolderEx implements EthnicValueType { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new EthnicValueTypeImpl instance with the specified schema type. + * + *

    This constructor is used by the XMLBeans framework when parsing or creating ethnicity + * enumeration values from XML documents. It initializes the enumeration holder with the + * provided schema type definition.

    + * + * @param sType SchemaType the XML Schema type definition for this ethnicity enumeration + */ public EthnicValueTypeImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor with validation control for internal XMLBeans framework use. + * + *

    This constructor provides control over schema validation behavior during object + * instantiation. It is typically used internally by the XMLBeans type system for advanced + * XML processing scenarios where validation needs to be deferred or customized.

    + * + * @param sType SchemaType the XML Schema type definition for this ethnicity enumeration + * @param b boolean flag controlling validation behavior during instantiation + */ protected EthnicValueTypeImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/FamilyHistoryTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/FamilyHistoryTypeImpl.java index b1990fc4660..aea05a797b4 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/FamilyHistoryTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/FamilyHistoryTypeImpl.java @@ -7,15 +7,59 @@ import ca.openosp.openo.ar2005.FamilyHistoryType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for the FamilyHistoryType XML schema type used in AR2005 (Antenatal Record 2005) forms. + * + *

    This class provides the concrete implementation of the FamilyHistoryType interface, which is used to + * capture and manage family medical history information as part of antenatal care documentation in the + * OpenO EMR system. It specifically handles the "atRisk" element that indicates whether a patient has + * family history risk factors relevant to pregnancy and maternal care.

    + * + *

    The implementation extends Apache XMLBeans' {@link XmlComplexContentImpl} to provide XML serialization + * and deserialization capabilities, ensuring that family history data can be stored and retrieved in a + * standardized XML format compliant with the AR2005 schema (http://www.oscarmcmaster.org/AR2005).

    + * + *

    This class is thread-safe as all accessor methods are synchronized on the internal monitor object + * provided by the XMLBeans framework.

    + * + * @see ca.openosp.openo.ar2005.FamilyHistoryType + * @see ca.openosp.openo.ar2005.YesNoNullType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-23 + */ public class FamilyHistoryTypeImpl extends XmlComplexContentImpl implements FamilyHistoryType { private static final long serialVersionUID = 1L; private static final QName ATRISK$0; - + + /** + * Constructs a new FamilyHistoryTypeImpl instance with the specified schema type. + * + *

    This constructor is typically called by the XMLBeans framework during XML deserialization + * or when creating new instances programmatically. It initializes the underlying XML store + * with the appropriate schema type definition for family history data.

    + * + * @param sType SchemaType the schema type definition for this family history element, + * which defines the structure and validation rules for the XML content + */ public FamilyHistoryTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the family history risk indicator for the patient. + * + *

    This method returns the "atRisk" element which indicates whether the patient has + * family history factors that pose a risk for pregnancy or maternal health outcomes. + * This information is critical for antenatal care planning and risk assessment.

    + * + *

    The method is thread-safe, using synchronization on the internal monitor to ensure + * consistent reads in multi-threaded environments. The underlying XML store is checked + * to verify the element has not been orphaned before retrieval.

    + * + * @return YesNoNullType the family history risk indicator (Yes, No, or Null if not set), + * or null if the atRisk element has not been initialized + */ public YesNoNullType getAtRisk() { synchronized (this.monitor()) { this.check_orphaned(); @@ -27,7 +71,20 @@ public YesNoNullType getAtRisk() { return target; } } - + + /** + * Sets the family history risk indicator for the patient. + * + *

    This method updates the "atRisk" element to indicate whether the patient has + * family history factors that pose a risk for pregnancy or maternal health outcomes. + * If the element does not exist in the XML store, it will be created automatically.

    + * + *

    The method is thread-safe, using synchronization on the internal monitor to ensure + * consistent writes in multi-threaded environments. The underlying XML store is checked + * to verify the element has not been orphaned before modification.

    + * + * @param atRisk YesNoNullType the family history risk indicator to set (Yes, No, or Null) + */ public void setAtRisk(final YesNoNullType atRisk) { synchronized (this.monitor()) { this.check_orphaned(); @@ -39,7 +96,22 @@ public void setAtRisk(final YesNoNullType atRisk) { target.set((XmlObject)atRisk); } } - + + /** + * Creates and adds a new family history risk indicator element to this family history record. + * + *

    This method creates a new "atRisk" element in the XML store and returns it for further + * configuration. This is useful when you need to initialize the risk indicator and then set + * its value programmatically. The newly created element is immediately persisted to the + * underlying XML store.

    + * + *

    The method is thread-safe, using synchronization on the internal monitor to ensure + * consistent operations in multi-threaded environments. The underlying XML store is checked + * to verify the element has not been orphaned before the new element is added.

    + * + * @return YesNoNullType a newly created and initialized family history risk indicator element + * that can be configured with Yes, No, or Null values + */ public YesNoNullType addNewAtRisk() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/GenericHistoryTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/GenericHistoryTypeImpl.java index 756eda6a8a4..fef96421306 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/GenericHistoryTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/GenericHistoryTypeImpl.java @@ -7,6 +7,25 @@ import ca.openosp.openo.ar2005.GenericHistoryType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for GenericHistoryType XML schema type used in the AR2005 (Antenatal Record 2005) healthcare forms. + * + * This class provides XMLBeans-based implementation for managing genetic and developmental history information + * in antenatal care records. It handles five key health risk indicators commonly tracked during pregnancy: + * at-risk status, developmental delays, congenital anomalies, chromosomal disorders, and genetic disorders. + * + * The implementation extends XmlComplexContentImpl to provide XML serialization/deserialization capabilities + * and follows the AR2005 XML schema namespace (http://www.oscarmcmaster.org/AR2005). Each health indicator + * is represented as a YesNoNullType element, allowing for tri-state values (yes, no, or null/unknown). + * + * This class is part of the British Columbia Antenatal Record (BCAR) forms integration used for + * comprehensive pregnancy care documentation in OpenO EMR. + * + * @see ca.openosp.openo.ar2005.GenericHistoryType + * @see ca.openosp.openo.ar2005.YesNoNullType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-23 + */ public class GenericHistoryTypeImpl extends XmlComplexContentImpl implements GenericHistoryType { private static final long serialVersionUID = 1L; @@ -15,11 +34,27 @@ public class GenericHistoryTypeImpl extends XmlComplexContentImpl implements Gen private static final QName CONGENITALANOMOLIES$4; private static final QName CHROMOSOMALDISORDERS$6; private static final QName GENETICDISORDERS$8; - + + /** + * Constructs a new GenericHistoryTypeImpl instance with the specified XMLBeans schema type. + * + * This constructor initializes the XML complex content implementation with the provided schema type, + * enabling proper XML serialization and validation according to the AR2005 schema definition. + * + * @param sType SchemaType the XMLBeans schema type definition for GenericHistoryType + */ public GenericHistoryTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the at-risk status indicator for the patient's antenatal history. + * + * This method returns the at-risk flag which indicates whether the patient has been identified + * as having elevated pregnancy risk factors requiring additional monitoring or interventions. + * + * @return YesNoNullType the at-risk status (yes, no, or null if not specified) + */ public YesNoNullType getAtRisk() { synchronized (this.monitor()) { this.check_orphaned(); @@ -31,7 +66,15 @@ public YesNoNullType getAtRisk() { return target; } } - + + /** + * Sets the at-risk status indicator for the patient's antenatal history. + * + * This method updates the at-risk flag to indicate whether the patient has been identified + * as having elevated pregnancy risk factors. The value persists in the XML store. + * + * @param atRisk YesNoNullType the at-risk status to set (yes, no, or null) + */ public void setAtRisk(final YesNoNullType atRisk) { synchronized (this.monitor()) { this.check_orphaned(); @@ -43,7 +86,15 @@ public void setAtRisk(final YesNoNullType atRisk) { target.set((XmlObject)atRisk); } } - + + /** + * Creates and adds a new at-risk status element to the XML store. + * + * This method creates a new YesNoNullType element for the at-risk indicator and adds it + * to the internal XML store. The newly created element is returned for immediate configuration. + * + * @return YesNoNullType the newly created at-risk status element + */ public YesNoNullType addNewAtRisk() { synchronized (this.monitor()) { this.check_orphaned(); @@ -52,7 +103,15 @@ public YesNoNullType addNewAtRisk() { return target; } } - + + /** + * Retrieves the developmental delay indicator for the patient's antenatal history. + * + * This method returns the developmental delay flag which indicates whether there is a history + * or risk of developmental delays that may affect pregnancy care or neonatal outcomes. + * + * @return YesNoNullType the developmental delay status (yes, no, or null if not specified) + */ public YesNoNullType getDevelopmentalDelay() { synchronized (this.monitor()) { this.check_orphaned(); @@ -64,7 +123,15 @@ public YesNoNullType getDevelopmentalDelay() { return target; } } - + + /** + * Sets the developmental delay indicator for the patient's antenatal history. + * + * This method updates the developmental delay flag to document any history or risk + * of developmental delays. The value persists in the XML store. + * + * @param developmentalDelay YesNoNullType the developmental delay status to set (yes, no, or null) + */ public void setDevelopmentalDelay(final YesNoNullType developmentalDelay) { synchronized (this.monitor()) { this.check_orphaned(); @@ -76,7 +143,15 @@ public void setDevelopmentalDelay(final YesNoNullType developmentalDelay) { target.set((XmlObject)developmentalDelay); } } - + + /** + * Creates and adds a new developmental delay element to the XML store. + * + * This method creates a new YesNoNullType element for the developmental delay indicator + * and adds it to the internal XML store. The newly created element is returned for immediate configuration. + * + * @return YesNoNullType the newly created developmental delay element + */ public YesNoNullType addNewDevelopmentalDelay() { synchronized (this.monitor()) { this.check_orphaned(); @@ -85,7 +160,15 @@ public YesNoNullType addNewDevelopmentalDelay() { return target; } } - + + /** + * Retrieves the congenital anomalies indicator for the patient's antenatal history. + * + * This method returns the congenital anomalies flag which indicates whether there is a history + * or risk of birth defects or structural abnormalities present from birth. + * + * @return YesNoNullType the congenital anomalies status (yes, no, or null if not specified) + */ public YesNoNullType getCongenitalAnomolies() { synchronized (this.monitor()) { this.check_orphaned(); @@ -97,7 +180,15 @@ public YesNoNullType getCongenitalAnomolies() { return target; } } - + + /** + * Sets the congenital anomalies indicator for the patient's antenatal history. + * + * This method updates the congenital anomalies flag to document any history or risk + * of birth defects or structural abnormalities. The value persists in the XML store. + * + * @param congenitalAnomolies YesNoNullType the congenital anomalies status to set (yes, no, or null) + */ public void setCongenitalAnomolies(final YesNoNullType congenitalAnomolies) { synchronized (this.monitor()) { this.check_orphaned(); @@ -109,7 +200,15 @@ public void setCongenitalAnomolies(final YesNoNullType congenitalAnomolies) { target.set((XmlObject)congenitalAnomolies); } } - + + /** + * Creates and adds a new congenital anomalies element to the XML store. + * + * This method creates a new YesNoNullType element for the congenital anomalies indicator + * and adds it to the internal XML store. The newly created element is returned for immediate configuration. + * + * @return YesNoNullType the newly created congenital anomalies element + */ public YesNoNullType addNewCongenitalAnomolies() { synchronized (this.monitor()) { this.check_orphaned(); @@ -118,7 +217,15 @@ public YesNoNullType addNewCongenitalAnomolies() { return target; } } - + + /** + * Retrieves the chromosomal disorders indicator for the patient's antenatal history. + * + * This method returns the chromosomal disorders flag which indicates whether there is a history + * or risk of chromosomal abnormalities such as Down syndrome, Turner syndrome, or other karyotype abnormalities. + * + * @return YesNoNullType the chromosomal disorders status (yes, no, or null if not specified) + */ public YesNoNullType getChromosomalDisorders() { synchronized (this.monitor()) { this.check_orphaned(); @@ -130,7 +237,15 @@ public YesNoNullType getChromosomalDisorders() { return target; } } - + + /** + * Sets the chromosomal disorders indicator for the patient's antenatal history. + * + * This method updates the chromosomal disorders flag to document any history or risk + * of chromosomal abnormalities. The value persists in the XML store. + * + * @param chromosomalDisorders YesNoNullType the chromosomal disorders status to set (yes, no, or null) + */ public void setChromosomalDisorders(final YesNoNullType chromosomalDisorders) { synchronized (this.monitor()) { this.check_orphaned(); @@ -142,7 +257,15 @@ public void setChromosomalDisorders(final YesNoNullType chromosomalDisorders) { target.set((XmlObject)chromosomalDisorders); } } - + + /** + * Creates and adds a new chromosomal disorders element to the XML store. + * + * This method creates a new YesNoNullType element for the chromosomal disorders indicator + * and adds it to the internal XML store. The newly created element is returned for immediate configuration. + * + * @return YesNoNullType the newly created chromosomal disorders element + */ public YesNoNullType addNewChromosomalDisorders() { synchronized (this.monitor()) { this.check_orphaned(); @@ -151,7 +274,15 @@ public YesNoNullType addNewChromosomalDisorders() { return target; } } - + + /** + * Retrieves the genetic disorders indicator for the patient's antenatal history. + * + * This method returns the genetic disorders flag which indicates whether there is a family history + * or risk of inherited genetic conditions that may affect pregnancy or fetal development. + * + * @return YesNoNullType the genetic disorders status (yes, no, or null if not specified) + */ public YesNoNullType getGeneticDisorders() { synchronized (this.monitor()) { this.check_orphaned(); @@ -163,7 +294,15 @@ public YesNoNullType getGeneticDisorders() { return target; } } - + + /** + * Sets the genetic disorders indicator for the patient's antenatal history. + * + * This method updates the genetic disorders flag to document any family history or risk + * of inherited genetic conditions. The value persists in the XML store. + * + * @param geneticDisorders YesNoNullType the genetic disorders status to set (yes, no, or null) + */ public void setGeneticDisorders(final YesNoNullType geneticDisorders) { synchronized (this.monitor()) { this.check_orphaned(); @@ -175,7 +314,15 @@ public void setGeneticDisorders(final YesNoNullType geneticDisorders) { target.set((XmlObject)geneticDisorders); } } - + + /** + * Creates and adds a new genetic disorders element to the XML store. + * + * This method creates a new YesNoNullType element for the genetic disorders indicator + * and adds it to the internal XML store. The newly created element is returned for immediate configuration. + * + * @return YesNoNullType the newly created genetic disorders element + */ public YesNoNullType addNewGeneticDisorders() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/InfectiousDiseaseTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/InfectiousDiseaseTypeImpl.java index 04bd105d115..b88d77acff5 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/InfectiousDiseaseTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/InfectiousDiseaseTypeImpl.java @@ -9,6 +9,29 @@ import ca.openosp.openo.ar2005.InfectiousDiseaseType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of InfectiousDiseaseType for tracking infectious disease history in patient records. + *

    + * This class provides XMLBeans-based data binding for infectious disease information as defined + * in the AR2005 (Antenatal Record 2005) healthcare standard. It manages patient history for + * specific infectious diseases including varicella (chickenpox), sexually transmitted diseases (STD), + * tuberculosis, and other infectious conditions. + *

    + *

    + * The implementation uses thread-safe synchronized blocks for all data access operations and + * maintains element state through XMLBeans internal storage mechanisms. Each disease field + * supports Yes/No/Null tri-state values to distinguish between confirmed negative history, + * confirmed positive history, and unknown/unrecorded status. + *

    + *

    + * This class is typically used within antenatal care forms and patient health history documentation + * to track infectious disease exposure and status for risk assessment and care planning purposes. + *

    + * + * @see ca.openosp.openo.ar2005.InfectiousDiseaseType + * @see ca.openosp.openo.ar2005.YesNoNullType + * @since 2026-01-24 + */ public class InfectiousDiseaseTypeImpl extends XmlComplexContentImpl implements InfectiousDiseaseType { private static final long serialVersionUID = 1L; @@ -17,11 +40,31 @@ public class InfectiousDiseaseTypeImpl extends XmlComplexContentImpl implements private static final QName TUBERCULOSIS$4; private static final QName OTHERDESCR$6; private static final QName OTHER$8; - + + /** + * Constructs a new InfectiousDiseaseTypeImpl instance with the specified schema type. + *

    + * This constructor is typically invoked by the XMLBeans framework during XML parsing + * and object instantiation. It initializes the internal XMLBeans complex content structure + * with the provided schema type definition. + *

    + * + * @param sType SchemaType the schema type definition for this infectious disease type element + */ public InfectiousDiseaseTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the varicella (chickenpox) disease status from the patient's infectious disease history. + *

    + * This method retrieves the current varicella status indicator using thread-safe access + * to the underlying XMLBeans element store. The returned value indicates whether the + * patient has a history of varicella infection. + *

    + * + * @return YesNoNullType the varicella status (Yes/No/Null), or null if not set + */ public YesNoNullType getVaricella() { synchronized (this.monitor()) { this.check_orphaned(); @@ -33,7 +76,17 @@ public YesNoNullType getVaricella() { return target; } } - + + /** + * Sets the varicella (chickenpox) disease status in the patient's infectious disease history. + *

    + * This method updates the varicella status indicator using thread-safe access to the + * underlying XMLBeans element store. If no varicella element exists, it will be created + * automatically before setting the value. + *

    + * + * @param varicella YesNoNullType the varicella status to set (Yes/No/Null) + */ public void setVaricella(final YesNoNullType varicella) { synchronized (this.monitor()) { this.check_orphaned(); @@ -45,7 +98,17 @@ public void setVaricella(final YesNoNullType varicella) { target.set((XmlObject)varicella); } } - + + /** + * Creates and adds a new varicella element to the infectious disease history. + *

    + * This method creates a new YesNoNullType element for varicella status in the + * underlying XMLBeans element store using thread-safe operations. The newly created + * element can then be populated with the appropriate status value. + *

    + * + * @return YesNoNullType the newly created varicella element + */ public YesNoNullType addNewVaricella() { synchronized (this.monitor()) { this.check_orphaned(); @@ -54,7 +117,17 @@ public YesNoNullType addNewVaricella() { return target; } } - + + /** + * Gets the sexually transmitted disease (STD) status from the patient's infectious disease history. + *

    + * This method retrieves the current STD status indicator using thread-safe access + * to the underlying XMLBeans element store. The returned value indicates whether the + * patient has a history of sexually transmitted disease infection. + *

    + * + * @return YesNoNullType the STD status (Yes/No/Null), or null if not set + */ public YesNoNullType getStd() { synchronized (this.monitor()) { this.check_orphaned(); @@ -66,7 +139,17 @@ public YesNoNullType getStd() { return target; } } - + + /** + * Sets the sexually transmitted disease (STD) status in the patient's infectious disease history. + *

    + * This method updates the STD status indicator using thread-safe access to the + * underlying XMLBeans element store. If no STD element exists, it will be created + * automatically before setting the value. + *

    + * + * @param std YesNoNullType the STD status to set (Yes/No/Null) + */ public void setStd(final YesNoNullType std) { synchronized (this.monitor()) { this.check_orphaned(); @@ -78,7 +161,17 @@ public void setStd(final YesNoNullType std) { target.set((XmlObject)std); } } - + + /** + * Creates and adds a new STD element to the infectious disease history. + *

    + * This method creates a new YesNoNullType element for STD status in the + * underlying XMLBeans element store using thread-safe operations. The newly created + * element can then be populated with the appropriate status value. + *

    + * + * @return YesNoNullType the newly created STD element + */ public YesNoNullType addNewStd() { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +180,17 @@ public YesNoNullType addNewStd() { return target; } } - + + /** + * Gets the tuberculosis disease status from the patient's infectious disease history. + *

    + * This method retrieves the current tuberculosis status indicator using thread-safe access + * to the underlying XMLBeans element store. The returned value indicates whether the + * patient has a history of tuberculosis infection. + *

    + * + * @return YesNoNullType the tuberculosis status (Yes/No/Null), or null if not set + */ public YesNoNullType getTuberculosis() { synchronized (this.monitor()) { this.check_orphaned(); @@ -99,7 +202,17 @@ public YesNoNullType getTuberculosis() { return target; } } - + + /** + * Sets the tuberculosis disease status in the patient's infectious disease history. + *

    + * This method updates the tuberculosis status indicator using thread-safe access to the + * underlying XMLBeans element store. If no tuberculosis element exists, it will be created + * automatically before setting the value. + *

    + * + * @param tuberculosis YesNoNullType the tuberculosis status to set (Yes/No/Null) + */ public void setTuberculosis(final YesNoNullType tuberculosis) { synchronized (this.monitor()) { this.check_orphaned(); @@ -111,7 +224,17 @@ public void setTuberculosis(final YesNoNullType tuberculosis) { target.set((XmlObject)tuberculosis); } } - + + /** + * Creates and adds a new tuberculosis element to the infectious disease history. + *

    + * This method creates a new YesNoNullType element for tuberculosis status in the + * underlying XMLBeans element store using thread-safe operations. The newly created + * element can then be populated with the appropriate status value. + *

    + * + * @return YesNoNullType the newly created tuberculosis element + */ public YesNoNullType addNewTuberculosis() { synchronized (this.monitor()) { this.check_orphaned(); @@ -120,7 +243,17 @@ public YesNoNullType addNewTuberculosis() { return target; } } - + + /** + * Gets the description of other infectious diseases from the patient's history. + *

    + * This method retrieves the free-text description field for other infectious diseases + * not specifically enumerated in the standard disease fields (varicella, STD, tuberculosis). + * Uses thread-safe access to the underlying XMLBeans element store. + *

    + * + * @return String the description of other infectious diseases, or null if not set + */ public String getOtherDescr() { synchronized (this.monitor()) { this.check_orphaned(); @@ -132,7 +265,17 @@ public String getOtherDescr() { return target.getStringValue(); } } - + + /** + * Gets the XML-typed description of other infectious diseases from the patient's history. + *

    + * This method retrieves the XmlString representation of the free-text description field + * for other infectious diseases. This XMLBeans-specific accessor provides access to the + * underlying XML element with full type information and validation capabilities. + *

    + * + * @return XmlString the XML-typed description element, or null if not set + */ public XmlString xgetOtherDescr() { synchronized (this.monitor()) { this.check_orphaned(); @@ -141,7 +284,18 @@ public XmlString xgetOtherDescr() { return target; } } - + + /** + * Sets the description of other infectious diseases in the patient's history. + *

    + * This method updates the free-text description field for other infectious diseases + * not specifically enumerated in the standard disease fields. Uses thread-safe access + * to the underlying XMLBeans element store. If no otherDescr element exists, it will + * be created automatically before setting the value. + *

    + * + * @param otherDescr String the description of other infectious diseases to set + */ public void setOtherDescr(final String otherDescr) { synchronized (this.monitor()) { this.check_orphaned(); @@ -153,7 +307,18 @@ public void setOtherDescr(final String otherDescr) { target.setStringValue(otherDescr); } } - + + /** + * Sets the XML-typed description of other infectious diseases in the patient's history. + *

    + * This method updates the free-text description field using an XmlString parameter, + * providing XMLBeans-specific type information and validation. Uses thread-safe access + * to the underlying element store. If no otherDescr element exists, it will be created + * automatically before setting the value. + *

    + * + * @param otherDescr XmlString the XML-typed description element to set + */ public void xsetOtherDescr(final XmlString otherDescr) { synchronized (this.monitor()) { this.check_orphaned(); @@ -165,7 +330,18 @@ public void xsetOtherDescr(final XmlString otherDescr) { target.set((XmlObject)otherDescr); } } - + + /** + * Gets the presence indicator for other infectious diseases from the patient's history. + *

    + * This method retrieves the Yes/No/Null indicator for other infectious diseases + * (those not specifically enumerated in the standard disease fields). This complements + * the otherDescr field by providing a structured tri-state status indicator. + * Uses thread-safe access to the underlying XMLBeans element store. + *

    + * + * @return YesNoNullType the other diseases status (Yes/No/Null), or null if not set + */ public YesNoNullType getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -177,7 +353,19 @@ public YesNoNullType getOther() { return target; } } - + + /** + * Sets the presence indicator for other infectious diseases in the patient's history. + *

    + * This method updates the Yes/No/Null indicator for other infectious diseases + * (those not specifically enumerated in the standard disease fields). This complements + * the otherDescr field by providing a structured tri-state status indicator. + * Uses thread-safe access to the underlying XMLBeans element store. If no other element + * exists, it will be created automatically before setting the value. + *

    + * + * @param other YesNoNullType the other diseases status to set (Yes/No/Null) + */ public void setOther(final YesNoNullType other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -189,7 +377,18 @@ public void setOther(final YesNoNullType other) { target.set((XmlObject)other); } } - + + /** + * Creates and adds a new other diseases element to the infectious disease history. + *

    + * This method creates a new YesNoNullType element for other diseases status in the + * underlying XMLBeans element store using thread-safe operations. The newly created + * element can then be populated with the appropriate status value to indicate the + * presence or absence of other infectious diseases. + *

    + * + * @return YesNoNullType the newly created other diseases element + */ public YesNoNullType addNewOther() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/InitialLaboratoryInvestigationsImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/InitialLaboratoryInvestigationsImpl.java index 1d34954b11b..80080f90a04 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/InitialLaboratoryInvestigationsImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/InitialLaboratoryInvestigationsImpl.java @@ -16,6 +16,50 @@ import ca.openosp.openo.ar2005.InitialLaboratoryInvestigations; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Apache XMLBeans implementation class for managing initial laboratory investigations data in the British Columbia + * Antenatal Record 2005 (AR2005) form. + * + * This class provides a complete XML-based data structure for storing and managing prenatal laboratory test results + * that are typically performed during the initial stages of pregnancy care. It encapsulates essential screening tests + * including infectious disease screening (HIV, Hepatitis B, syphilis, gonorrhea, chlamydia, rubella), hematological + * tests (hemoglobin, MCV, ABO blood type, Rh factor, antibody screening), sickle cell screening, urinalysis, + * cervical cancer screening (Pap test), prenatal genetic screening results, and custom laboratory tests. + * + * This implementation extends Apache XMLBeans' XmlComplexContentImpl to provide thread-safe XML data binding + * for healthcare-specific laboratory data types. All accessor methods are synchronized using the XMLBeans + * monitor pattern to ensure data integrity in multi-threaded healthcare application environments. + * + * The class supports both standard Java type accessors (getString, setString, etc.) and XMLBeans-specific + * accessors (xget*, xset*) that work directly with XML type objects, allowing for flexible data manipulation + * and XML schema validation. + * + * Healthcare Context: + * This component is part of the British Columbia Antenatal Record (BCAR) system, which follows provincial + * guidelines for prenatal care documentation. The laboratory investigations tracked by this class represent + * standard screening tests recommended for all pregnant individuals in British Columbia during their first + * prenatal visit. + * + * Key Laboratory Tests Managed: + *
      + *
    • Infectious Disease Screening: HIV (with counseling flag), Hepatitis B surface antigen (HBsAg), + * VDRL/syphilis, gonorrhea, chlamydia, rubella immunity
    • + *
    • Hematological Tests: Hemoglobin (Hb), mean corpuscular volume (MCV), ABO blood type, + * Rh factor, antibody screening
    • + *
    • Genetic Screening: Sickle cell screening, prenatal genetic screening (integrated/sequential + * screening for chromosomal abnormalities)
    • + *
    • Other Tests: Urinalysis, Pap test results with date, custom laboratory tests (2 configurable slots)
    • + *
    + * + * Thread Safety: + * All public methods use synchronized blocks with XMLBeans' internal monitor to ensure thread-safe access + * to the underlying XML store, making this class safe for use in concurrent healthcare application environments. + * + * @see ca.openosp.openo.ar2005.InitialLaboratoryInvestigations + * @see ca.openosp.openo.ar2005.CustomLab + * @see ca.openosp.openo.ar2005.PrenatalGeneticScreeningType + * @since 2026-01-24 + */ public class InitialLaboratoryInvestigationsImpl extends XmlComplexContentImpl implements InitialLaboratoryInvestigations { private static final long serialVersionUID = 1L; @@ -38,11 +82,28 @@ public class InitialLaboratoryInvestigationsImpl extends XmlComplexContentImpl i private static final QName PRENATALGENERICSCREENING$32; private static final QName CUSTOMLAB1$34; private static final QName CUSTOMLAB2$36; - + + /** + * Constructs a new InitialLaboratoryInvestigationsImpl instance with the specified schema type. + * + * This constructor is typically called by the Apache XMLBeans framework during XML deserialization + * or when creating new instances programmatically. It initializes the underlying XML data structure + * according to the provided schema type definition. + * + * @param sType SchemaType the XML schema type definition for this laboratory investigations object + */ public InitialLaboratoryInvestigationsImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the hemoglobin (Hb) test result value. + * + * Hemoglobin is measured to screen for anemia during pregnancy, which is common due to increased + * blood volume and iron demands. Normal pregnancy ranges are typically 110-140 g/L (11-14 g/dL). + * + * @return String the hemoglobin result value, or null if not set + */ public String getHbResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -54,7 +115,15 @@ public String getHbResult() { return target.getStringValue(); } } - + + /** + * Gets the hemoglobin (Hb) test result as an XMLBeans XmlString object. + * + * This method provides access to the XML-typed representation of the hemoglobin result, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlString the hemoglobin result as an XML string type, or null if not set + */ public XmlString xgetHbResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -63,7 +132,12 @@ public XmlString xgetHbResult() { return target; } } - + + /** + * Sets the hemoglobin (Hb) test result value. + * + * @param hbResult String the hemoglobin result value to set + */ public void setHbResult(final String hbResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -75,7 +149,15 @@ public void setHbResult(final String hbResult) { target.setStringValue(hbResult); } } - + + /** + * Sets the hemoglobin (Hb) test result using an XMLBeans XmlString object. + * + * This method allows setting the hemoglobin result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param hbResult XmlString the hemoglobin result as an XML string type + */ public void xsetHbResult(final XmlString hbResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +169,16 @@ public void xsetHbResult(final XmlString hbResult) { target.set((XmlObject)hbResult); } } - + + /** + * Gets the HIV test result as an enumerated value. + * + * HIV screening is a standard component of prenatal care to identify infection early, + * enable appropriate treatment to prevent mother-to-child transmission, and ensure + * proper obstetric management. + * + * @return HivResult.Enum the HIV test result enumeration (e.g., NEGATIVE, POSITIVE, DECLINED), or null if not set + */ public HivResult.Enum getHivResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -99,7 +190,15 @@ public HivResult.Enum getHivResult() { return (HivResult.Enum)target.getEnumValue(); } } - + + /** + * Gets the HIV test result as an XMLBeans HivResult type object. + * + * This method provides access to the XML-typed representation of the HIV result, + * allowing for direct XML manipulation and schema validation. + * + * @return HivResult the HIV test result as an XML enumeration type, or null if not set + */ public HivResult xgetHivResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -108,7 +207,12 @@ public HivResult xgetHivResult() { return target; } } - + + /** + * Sets the HIV test result using an enumerated value. + * + * @param hivResult HivResult.Enum the HIV test result enumeration to set (e.g., NEGATIVE, POSITIVE, DECLINED) + */ public void setHivResult(final HivResult.Enum hivResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -120,7 +224,15 @@ public void setHivResult(final HivResult.Enum hivResult) { target.setEnumValue((StringEnumAbstractBase)hivResult); } } - + + /** + * Sets the HIV test result using an XMLBeans HivResult type object. + * + * This method allows setting the HIV result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param hivResult HivResult the HIV test result as an XML enumeration type + */ public void xsetHivResult(final HivResult hivResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -132,7 +244,16 @@ public void xsetHivResult(final HivResult hivResult) { target.set((XmlObject)hivResult); } } - + + /** + * Gets the HIV counseling completion status. + * + * Indicates whether pre-test or post-test HIV counseling was provided to the patient. + * Counseling is an important component of HIV testing protocols in prenatal care, + * covering topics such as transmission, prevention, and treatment options. + * + * @return boolean true if HIV counseling was completed, false otherwise + */ public boolean getHivCounsel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -141,7 +262,15 @@ public boolean getHivCounsel() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the HIV counseling completion status as an XMLBeans XmlBoolean object. + * + * This method provides access to the XML-typed representation of the counseling status, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlBoolean the HIV counseling status as an XML boolean type, or null if not set + */ public XmlBoolean xgetHivCounsel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -150,7 +279,12 @@ public XmlBoolean xgetHivCounsel() { return target; } } - + + /** + * Sets the HIV counseling completion status. + * + * @param hivCounsel boolean true if HIV counseling was completed, false otherwise + */ public void setHivCounsel(final boolean hivCounsel) { synchronized (this.monitor()) { this.check_orphaned(); @@ -162,7 +296,15 @@ public void setHivCounsel(final boolean hivCounsel) { target.setBooleanValue(hivCounsel); } } - + + /** + * Sets the HIV counseling completion status using an XMLBeans XmlBoolean object. + * + * This method allows setting the counseling status using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param hivCounsel XmlBoolean the HIV counseling status as an XML boolean type + */ public void xsetHivCounsel(final XmlBoolean hivCounsel) { synchronized (this.monitor()) { this.check_orphaned(); @@ -174,7 +316,16 @@ public void xsetHivCounsel(final XmlBoolean hivCounsel) { target.set((XmlObject)hivCounsel); } } - + + /** + * Gets the date of the patient's last Pap test (Papanicolaou test). + * + * The Pap test is a cervical cancer screening test. Recording the last Pap test date helps + * determine if cervical cancer screening is due during the prenatal period, following current + * screening guidelines. + * + * @return Calendar the date of the last Pap test, or null if not set + */ public Calendar getLastPapDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -186,7 +337,15 @@ public Calendar getLastPapDate() { return target.getCalendarValue(); } } - + + /** + * Gets the date of the last Pap test as an XMLBeans XmlDate object. + * + * This method provides access to the XML-typed representation of the Pap test date, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlDate the last Pap test date as an XML date type, or null if not set + */ public XmlDate xgetLastPapDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -195,7 +354,12 @@ public XmlDate xgetLastPapDate() { return target; } } - + + /** + * Checks if the last Pap test date is explicitly set to nil (null with schema validation). + * + * @return boolean true if the last Pap test date is set to nil, false otherwise + */ public boolean isNilLastPapDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -204,7 +368,12 @@ public boolean isNilLastPapDate() { return target != null && target.isNil(); } } - + + /** + * Sets the date of the patient's last Pap test. + * + * @param lastPapDate Calendar the date of the last Pap test + */ public void setLastPapDate(final Calendar lastPapDate) { synchronized (this.monitor()) { this.check_orphaned(); @@ -216,7 +385,15 @@ public void setLastPapDate(final Calendar lastPapDate) { target.setCalendarValue(lastPapDate); } } - + + /** + * Sets the date of the last Pap test using an XMLBeans XmlDate object. + * + * This method allows setting the Pap test date using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param lastPapDate XmlDate the last Pap test date as an XML date type + */ public void xsetLastPapDate(final XmlDate lastPapDate) { synchronized (this.monitor()) { this.check_orphaned(); @@ -228,7 +405,13 @@ public void xsetLastPapDate(final XmlDate lastPapDate) { target.set((XmlObject)lastPapDate); } } - + + /** + * Sets the last Pap test date to nil (explicitly null with schema validation). + * + * This method marks the date element as nil in the XML structure, which is different + * from simply not having the element present. + */ public void setNilLastPapDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -240,7 +423,16 @@ public void setNilLastPapDate() { target.setNil(); } } - + + /** + * Gets the Pap test (Papanicolaou test) result. + * + * The Pap test result indicates findings from cervical cancer screening, such as normal, + * ASCUS (atypical squamous cells of undetermined significance), LSIL (low-grade squamous + * intraepithelial lesion), HSIL (high-grade squamous intraepithelial lesion), or other findings. + * + * @return String the Pap test result, or null if not set + */ public String getPapResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -252,7 +444,15 @@ public String getPapResult() { return target.getStringValue(); } } - + + /** + * Gets the Pap test result as an XMLBeans XmlString object. + * + * This method provides access to the XML-typed representation of the Pap test result, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlString the Pap test result as an XML string type, or null if not set + */ public XmlString xgetPapResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -261,7 +461,12 @@ public XmlString xgetPapResult() { return target; } } - + + /** + * Sets the Pap test result. + * + * @param papResult String the Pap test result to set + */ public void setPapResult(final String papResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -273,7 +478,15 @@ public void setPapResult(final String papResult) { target.setStringValue(papResult); } } - + + /** + * Sets the Pap test result using an XMLBeans XmlString object. + * + * This method allows setting the Pap test result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param papResult XmlString the Pap test result as an XML string type + */ public void xsetPapResult(final XmlString papResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -285,7 +498,16 @@ public void xsetPapResult(final XmlString papResult) { target.set((XmlObject)papResult); } } - + + /** + * Gets the MCV (Mean Corpuscular Volume) test result. + * + * MCV measures the average size of red blood cells and helps classify anemia types. + * Normal range is typically 80-100 femtoliters (fL). Low MCV suggests iron deficiency anemia + * or thalassemia, while high MCV may indicate vitamin B12 or folate deficiency. + * + * @return float the MCV result value in femtoliters, or 0.0f if not set + */ public float getMcvResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -297,7 +519,15 @@ public float getMcvResult() { return target.getFloatValue(); } } - + + /** + * Gets the MCV result as an XMLBeans McvResult type object. + * + * This method provides access to the XML-typed representation of the MCV result, + * allowing for direct XML manipulation and schema validation. + * + * @return McvResult the MCV result as an XML float type, or null if not set + */ public McvResult xgetMcvResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -306,7 +536,12 @@ public McvResult xgetMcvResult() { return target; } } - + + /** + * Checks if the MCV result is explicitly set to nil (null with schema validation). + * + * @return boolean true if the MCV result is set to nil, false otherwise + */ public boolean isNilMcvResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -315,7 +550,12 @@ public boolean isNilMcvResult() { return target != null && target.isNil(); } } - + + /** + * Sets the MCV (Mean Corpuscular Volume) test result. + * + * @param mcvResult float the MCV result value in femtoliters + */ public void setMcvResult(final float mcvResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -327,7 +567,15 @@ public void setMcvResult(final float mcvResult) { target.setFloatValue(mcvResult); } } - + + /** + * Sets the MCV result using an XMLBeans McvResult type object. + * + * This method allows setting the MCV result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param mcvResult McvResult the MCV result as an XML float type + */ public void xsetMcvResult(final McvResult mcvResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -339,7 +587,13 @@ public void xsetMcvResult(final McvResult mcvResult) { target.set((XmlObject)mcvResult); } } - + + /** + * Sets the MCV result to nil (explicitly null with schema validation). + * + * This method marks the MCV element as nil in the XML structure, which is different + * from simply not having the element present. + */ public void setNilMcvResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -351,7 +605,16 @@ public void setNilMcvResult() { target.setNil(); } } - + + /** + * Gets the ABO blood type test result as an enumerated value. + * + * ABO blood typing determines the patient's blood group (A, B, AB, or O), which is essential + * for blood transfusion compatibility and for identifying potential blood group incompatibility + * issues during pregnancy (such as ABO hemolytic disease of the newborn). + * + * @return AboResult.Enum the ABO blood type enumeration (A, B, AB, or O), or null if not set + */ public AboResult.Enum getAboResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -363,7 +626,15 @@ public AboResult.Enum getAboResult() { return (AboResult.Enum)target.getEnumValue(); } } - + + /** + * Gets the ABO blood type result as an XMLBeans AboResult type object. + * + * This method provides access to the XML-typed representation of the ABO blood type, + * allowing for direct XML manipulation and schema validation. + * + * @return AboResult the ABO blood type as an XML enumeration type, or null if not set + */ public AboResult xgetAboResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -372,7 +643,12 @@ public AboResult xgetAboResult() { return target; } } - + + /** + * Sets the ABO blood type test result using an enumerated value. + * + * @param aboResult AboResult.Enum the ABO blood type enumeration to set (A, B, AB, or O) + */ public void setAboResult(final AboResult.Enum aboResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -384,7 +660,15 @@ public void setAboResult(final AboResult.Enum aboResult) { target.setEnumValue((StringEnumAbstractBase)aboResult); } } - + + /** + * Sets the ABO blood type result using an XMLBeans AboResult type object. + * + * This method allows setting the ABO blood type using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param aboResult AboResult the ABO blood type as an XML enumeration type + */ public void xsetAboResult(final AboResult aboResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -396,7 +680,17 @@ public void xsetAboResult(final AboResult aboResult) { target.set((XmlObject)aboResult); } } - + + /** + * Gets the Rh factor (Rhesus factor) test result as an enumerated value. + * + * Rh typing determines whether the patient has Rh-positive or Rh-negative blood. This is critical + * in pregnancy care to identify Rh incompatibility, which can lead to hemolytic disease of the newborn. + * Rh-negative pregnant individuals carrying Rh-positive fetuses may require RhIG (Rh immune globulin) + * prophylaxis. + * + * @return RhResult.Enum the Rh factor enumeration (POSITIVE or NEGATIVE), or null if not set + */ public RhResult.Enum getRhResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -408,7 +702,15 @@ public RhResult.Enum getRhResult() { return (RhResult.Enum)target.getEnumValue(); } } - + + /** + * Gets the Rh factor result as an XMLBeans RhResult type object. + * + * This method provides access to the XML-typed representation of the Rh factor, + * allowing for direct XML manipulation and schema validation. + * + * @return RhResult the Rh factor as an XML enumeration type, or null if not set + */ public RhResult xgetRhResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -417,7 +719,12 @@ public RhResult xgetRhResult() { return target; } } - + + /** + * Sets the Rh factor test result using an enumerated value. + * + * @param rhResult RhResult.Enum the Rh factor enumeration to set (POSITIVE or NEGATIVE) + */ public void setRhResult(final RhResult.Enum rhResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -429,7 +736,15 @@ public void setRhResult(final RhResult.Enum rhResult) { target.setEnumValue((StringEnumAbstractBase)rhResult); } } - + + /** + * Sets the Rh factor result using an XMLBeans RhResult type object. + * + * This method allows setting the Rh factor using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param rhResult RhResult the Rh factor as an XML enumeration type + */ public void xsetRhResult(final RhResult rhResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -441,7 +756,16 @@ public void xsetRhResult(final RhResult rhResult) { target.set((XmlObject)rhResult); } } - + + /** + * Gets the red blood cell antibody screening test result. + * + * Antibody screening detects irregular antibodies (other than ABO) that could cause hemolytic disease + * of the newborn or transfusion reactions. Common antibodies include anti-D, anti-K, anti-E, and anti-c. + * A positive result requires antibody identification and may necessitate specialized obstetric management. + * + * @return String the antibody screening result, or null if not set + */ public String getAntibodyResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -453,7 +777,15 @@ public String getAntibodyResult() { return target.getStringValue(); } } - + + /** + * Gets the antibody screening result as an XMLBeans XmlString object. + * + * This method provides access to the XML-typed representation of the antibody screening result, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlString the antibody screening result as an XML string type, or null if not set + */ public XmlString xgetAntibodyResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -462,7 +794,12 @@ public XmlString xgetAntibodyResult() { return target; } } - + + /** + * Sets the red blood cell antibody screening test result. + * + * @param antibodyResult String the antibody screening result to set + */ public void setAntibodyResult(final String antibodyResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -474,7 +811,15 @@ public void setAntibodyResult(final String antibodyResult) { target.setStringValue(antibodyResult); } } - + + /** + * Sets the antibody screening result using an XMLBeans XmlString object. + * + * This method allows setting the antibody screening result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param antibodyResult XmlString the antibody screening result as an XML string type + */ public void xsetAntibodyResult(final XmlString antibodyResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -486,7 +831,16 @@ public void xsetAntibodyResult(final XmlString antibodyResult) { target.set((XmlObject)antibodyResult); } } - + + /** + * Gets the gonorrhea screening test result as an enumerated value. + * + * Gonorrhea (Neisseria gonorrhoeae) screening is important in prenatal care to prevent transmission + * to the newborn during delivery, which can cause neonatal conjunctivitis and systemic infection. + * Detection allows for appropriate antibiotic treatment before delivery. + * + * @return GcResultGonorrhea.Enum the gonorrhea test result enumeration (e.g., NEGATIVE, POSITIVE), or null if not set + */ public GcResultGonorrhea.Enum getGcResultGonorrhea() { synchronized (this.monitor()) { this.check_orphaned(); @@ -498,7 +852,15 @@ public GcResultGonorrhea.Enum getGcResultGonorrhea() { return (GcResultGonorrhea.Enum)target.getEnumValue(); } } - + + /** + * Gets the gonorrhea test result as an XMLBeans GcResultGonorrhea type object. + * + * This method provides access to the XML-typed representation of the gonorrhea test result, + * allowing for direct XML manipulation and schema validation. + * + * @return GcResultGonorrhea the gonorrhea test result as an XML enumeration type, or null if not set + */ public GcResultGonorrhea xgetGcResultGonorrhea() { synchronized (this.monitor()) { this.check_orphaned(); @@ -507,7 +869,12 @@ public GcResultGonorrhea xgetGcResultGonorrhea() { return target; } } - + + /** + * Sets the gonorrhea screening test result using an enumerated value. + * + * @param gcResultGonorrhea GcResultGonorrhea.Enum the gonorrhea test result enumeration to set + */ public void setGcResultGonorrhea(final GcResultGonorrhea.Enum gcResultGonorrhea) { synchronized (this.monitor()) { this.check_orphaned(); @@ -519,7 +886,15 @@ public void setGcResultGonorrhea(final GcResultGonorrhea.Enum gcResultGonorrhea) target.setEnumValue((StringEnumAbstractBase)gcResultGonorrhea); } } - + + /** + * Sets the gonorrhea test result using an XMLBeans GcResultGonorrhea type object. + * + * This method allows setting the gonorrhea test result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param gcResultGonorrhea GcResultGonorrhea the gonorrhea test result as an XML enumeration type + */ public void xsetGcResultGonorrhea(final GcResultGonorrhea gcResultGonorrhea) { synchronized (this.monitor()) { this.check_orphaned(); @@ -531,7 +906,16 @@ public void xsetGcResultGonorrhea(final GcResultGonorrhea gcResultGonorrhea) { target.set((XmlObject)gcResultGonorrhea); } } - + + /** + * Gets the chlamydia screening test result as an enumerated value. + * + * Chlamydia trachomatis screening is essential in prenatal care to prevent transmission to the newborn + * during delivery, which can cause neonatal conjunctivitis and pneumonia. Early detection allows for + * appropriate antibiotic treatment during pregnancy. + * + * @return GcResultChlamydia.Enum the chlamydia test result enumeration (e.g., NEGATIVE, POSITIVE), or null if not set + */ public GcResultChlamydia.Enum getGcResultChlamydia() { synchronized (this.monitor()) { this.check_orphaned(); @@ -543,7 +927,15 @@ public GcResultChlamydia.Enum getGcResultChlamydia() { return (GcResultChlamydia.Enum)target.getEnumValue(); } } - + + /** + * Gets the chlamydia test result as an XMLBeans GcResultChlamydia type object. + * + * This method provides access to the XML-typed representation of the chlamydia test result, + * allowing for direct XML manipulation and schema validation. + * + * @return GcResultChlamydia the chlamydia test result as an XML enumeration type, or null if not set + */ public GcResultChlamydia xgetGcResultChlamydia() { synchronized (this.monitor()) { this.check_orphaned(); @@ -552,7 +944,12 @@ public GcResultChlamydia xgetGcResultChlamydia() { return target; } } - + + /** + * Sets the chlamydia screening test result using an enumerated value. + * + * @param gcResultChlamydia GcResultChlamydia.Enum the chlamydia test result enumeration to set + */ public void setGcResultChlamydia(final GcResultChlamydia.Enum gcResultChlamydia) { synchronized (this.monitor()) { this.check_orphaned(); @@ -564,7 +961,15 @@ public void setGcResultChlamydia(final GcResultChlamydia.Enum gcResultChlamydia) target.setEnumValue((StringEnumAbstractBase)gcResultChlamydia); } } - + + /** + * Sets the chlamydia test result using an XMLBeans GcResultChlamydia type object. + * + * This method allows setting the chlamydia test result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param gcResultChlamydia GcResultChlamydia the chlamydia test result as an XML enumeration type + */ public void xsetGcResultChlamydia(final GcResultChlamydia gcResultChlamydia) { synchronized (this.monitor()) { this.check_orphaned(); @@ -576,7 +981,16 @@ public void xsetGcResultChlamydia(final GcResultChlamydia gcResultChlamydia) { target.set((XmlObject)gcResultChlamydia); } } - + + /** + * Gets the rubella immunity test result. + * + * Rubella (German measles) immunity testing determines if the pregnant individual has protective antibodies + * against rubella. Rubella infection during pregnancy can cause congenital rubella syndrome with serious fetal + * abnormalities. Non-immune individuals should avoid exposure and may be offered vaccination post-partum. + * + * @return String the rubella immunity test result, or null if not set + */ public String getRubellaResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -588,7 +1002,15 @@ public String getRubellaResult() { return target.getStringValue(); } } - + + /** + * Gets the rubella immunity test result as an XMLBeans XmlString object. + * + * This method provides access to the XML-typed representation of the rubella immunity result, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlString the rubella immunity result as an XML string type, or null if not set + */ public XmlString xgetRubellaResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -597,7 +1019,12 @@ public XmlString xgetRubellaResult() { return target; } } - + + /** + * Sets the rubella immunity test result. + * + * @param rubellaResult String the rubella immunity test result to set + */ public void setRubellaResult(final String rubellaResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -609,7 +1036,15 @@ public void setRubellaResult(final String rubellaResult) { target.setStringValue(rubellaResult); } } - + + /** + * Sets the rubella immunity result using an XMLBeans XmlString object. + * + * This method allows setting the rubella immunity result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param rubellaResult XmlString the rubella immunity result as an XML string type + */ public void xsetRubellaResult(final XmlString rubellaResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -621,7 +1056,15 @@ public void xsetRubellaResult(final XmlString rubellaResult) { target.set((XmlObject)rubellaResult); } } - + + /** + * Gets the urinalysis test result. + * + * Urinalysis during prenatal care screens for conditions such as proteinuria (potential preeclampsia), + * glycosuria (gestational diabetes), bacteriuria (urinary tract infection), and other abnormalities. + * + * @return String the urinalysis result, or null if not set + */ public String getUrineResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -633,7 +1076,15 @@ public String getUrineResult() { return target.getStringValue(); } } - + + /** + * Gets the urinalysis result as an XMLBeans XmlString object. + * + * This method provides access to the XML-typed representation of the urinalysis result, + * allowing for direct XML manipulation and schema validation. + * + * @return XmlString the urinalysis result as an XML string type, or null if not set + */ public XmlString xgetUrineResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -642,7 +1093,12 @@ public XmlString xgetUrineResult() { return target; } } - + + /** + * Sets the urinalysis test result. + * + * @param urineResult String the urinalysis result to set + */ public void setUrineResult(final String urineResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -654,7 +1110,15 @@ public void setUrineResult(final String urineResult) { target.setStringValue(urineResult); } } - + + /** + * Sets the urinalysis result using an XMLBeans XmlString object. + * + * This method allows setting the urinalysis result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param urineResult XmlString the urinalysis result as an XML string type + */ public void xsetUrineResult(final XmlString urineResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -666,7 +1130,16 @@ public void xsetUrineResult(final XmlString urineResult) { target.set((XmlObject)urineResult); } } - + + /** + * Gets the Hepatitis B surface antigen (HBsAg) test result as an enumerated value. + * + * HBsAg screening identifies Hepatitis B virus infection in pregnant individuals. A positive result + * requires newborn immunoprophylaxis with Hepatitis B vaccine and immunoglobulin within 12 hours of birth + * to prevent vertical transmission. + * + * @return HbsAgResult.Enum the HBsAg test result enumeration (e.g., NEGATIVE, POSITIVE), or null if not set + */ public HbsAgResult.Enum getHbsAgResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -678,7 +1151,15 @@ public HbsAgResult.Enum getHbsAgResult() { return (HbsAgResult.Enum)target.getEnumValue(); } } - + + /** + * Gets the HBsAg test result as an XMLBeans HbsAgResult type object. + * + * This method provides access to the XML-typed representation of the HBsAg test result, + * allowing for direct XML manipulation and schema validation. + * + * @return HbsAgResult the HBsAg test result as an XML enumeration type, or null if not set + */ public HbsAgResult xgetHbsAgResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -687,7 +1168,12 @@ public HbsAgResult xgetHbsAgResult() { return target; } } - + + /** + * Sets the Hepatitis B surface antigen (HBsAg) test result using an enumerated value. + * + * @param hbsAgResult HbsAgResult.Enum the HBsAg test result enumeration to set + */ public void setHbsAgResult(final HbsAgResult.Enum hbsAgResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -699,7 +1185,15 @@ public void setHbsAgResult(final HbsAgResult.Enum hbsAgResult) { target.setEnumValue((StringEnumAbstractBase)hbsAgResult); } } - + + /** + * Sets the HBsAg test result using an XMLBeans HbsAgResult type object. + * + * This method allows setting the HBsAg test result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param hbsAgResult HbsAgResult the HBsAg test result as an XML enumeration type + */ public void xsetHbsAgResult(final HbsAgResult hbsAgResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -711,7 +1205,16 @@ public void xsetHbsAgResult(final HbsAgResult hbsAgResult) { target.set((XmlObject)hbsAgResult); } } - + + /** + * Gets the VDRL (Venereal Disease Research Laboratory) syphilis test result as an enumerated value. + * + * VDRL or similar syphilis screening tests detect Treponema pallidum infection. Untreated syphilis during + * pregnancy can cause congenital syphilis, stillbirth, or preterm birth. Positive results require confirmatory + * testing and appropriate antibiotic treatment. + * + * @return VdrlResult.Enum the VDRL test result enumeration (e.g., NON_REACTIVE, REACTIVE), or null if not set + */ public VdrlResult.Enum getVdrlResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -723,7 +1226,15 @@ public VdrlResult.Enum getVdrlResult() { return (VdrlResult.Enum)target.getEnumValue(); } } - + + /** + * Gets the VDRL test result as an XMLBeans VdrlResult type object. + * + * This method provides access to the XML-typed representation of the VDRL test result, + * allowing for direct XML manipulation and schema validation. + * + * @return VdrlResult the VDRL test result as an XML enumeration type, or null if not set + */ public VdrlResult xgetVdrlResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -732,7 +1243,12 @@ public VdrlResult xgetVdrlResult() { return target; } } - + + /** + * Sets the VDRL syphilis test result using an enumerated value. + * + * @param vdrlResult VdrlResult.Enum the VDRL test result enumeration to set + */ public void setVdrlResult(final VdrlResult.Enum vdrlResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -744,7 +1260,15 @@ public void setVdrlResult(final VdrlResult.Enum vdrlResult) { target.setEnumValue((StringEnumAbstractBase)vdrlResult); } } - + + /** + * Sets the VDRL test result using an XMLBeans VdrlResult type object. + * + * This method allows setting the VDRL test result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param vdrlResult VdrlResult the VDRL test result as an XML enumeration type + */ public void xsetVdrlResult(final VdrlResult vdrlResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -756,7 +1280,16 @@ public void xsetVdrlResult(final VdrlResult vdrlResult) { target.set((XmlObject)vdrlResult); } } - + + /** + * Gets the sickle cell screening test result as an enumerated value. + * + * Sickle cell screening identifies hemoglobin S trait or disease. This is particularly important for individuals + * of African, Mediterranean, Middle Eastern, or South Asian ancestry. Identification allows for genetic counseling, + * partner testing, and appropriate obstetric management if needed. + * + * @return SickleCellResult.Enum the sickle cell test result enumeration (e.g., NEGATIVE, POSITIVE, TRAIT), or null if not set + */ public SickleCellResult.Enum getSickleCellResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -768,7 +1301,15 @@ public SickleCellResult.Enum getSickleCellResult() { return (SickleCellResult.Enum)target.getEnumValue(); } } - + + /** + * Gets the sickle cell test result as an XMLBeans SickleCellResult type object. + * + * This method provides access to the XML-typed representation of the sickle cell test result, + * allowing for direct XML manipulation and schema validation. + * + * @return SickleCellResult the sickle cell test result as an XML enumeration type, or null if not set + */ public SickleCellResult xgetSickleCellResult() { synchronized (this.monitor()) { this.check_orphaned(); @@ -777,7 +1318,12 @@ public SickleCellResult xgetSickleCellResult() { return target; } } - + + /** + * Sets the sickle cell screening test result using an enumerated value. + * + * @param sickleCellResult SickleCellResult.Enum the sickle cell test result enumeration to set + */ public void setSickleCellResult(final SickleCellResult.Enum sickleCellResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -789,7 +1335,15 @@ public void setSickleCellResult(final SickleCellResult.Enum sickleCellResult) { target.setEnumValue((StringEnumAbstractBase)sickleCellResult); } } - + + /** + * Sets the sickle cell test result using an XMLBeans SickleCellResult type object. + * + * This method allows setting the sickle cell test result using an XML-typed value, + * enabling direct XML manipulation and ensuring schema compliance. + * + * @param sickleCellResult SickleCellResult the sickle cell test result as an XML enumeration type + */ public void xsetSickleCellResult(final SickleCellResult sickleCellResult) { synchronized (this.monitor()) { this.check_orphaned(); @@ -801,7 +1355,17 @@ public void xsetSickleCellResult(final SickleCellResult sickleCellResult) { target.set((XmlObject)sickleCellResult); } } - + + /** + * Gets the prenatal genetic screening information. + * + * Prenatal genetic screening (such as integrated prenatal screening, sequential screening, or non-invasive + * prenatal testing) assesses the risk of chromosomal abnormalities including Down syndrome (trisomy 21), + * Edwards syndrome (trisomy 18), and neural tube defects. This complex type contains screening test details, + * results, and risk assessments. + * + * @return PrenatalGeneticScreeningType the prenatal genetic screening data, or null if not set + */ public PrenatalGeneticScreeningType getPrenatalGenericScreening() { synchronized (this.monitor()) { this.check_orphaned(); @@ -813,7 +1377,12 @@ public PrenatalGeneticScreeningType getPrenatalGenericScreening() { return target; } } - + + /** + * Sets the prenatal genetic screening information. + * + * @param prenatalGenericScreening PrenatalGeneticScreeningType the prenatal genetic screening data to set + */ public void setPrenatalGenericScreening(final PrenatalGeneticScreeningType prenatalGenericScreening) { synchronized (this.monitor()) { this.check_orphaned(); @@ -825,7 +1394,15 @@ public void setPrenatalGenericScreening(final PrenatalGeneticScreeningType prena target.set((XmlObject)prenatalGenericScreening); } } - + + /** + * Creates and adds a new prenatal genetic screening element to the XML structure. + * + * This factory method creates a new PrenatalGeneticScreeningType instance and adds it to the + * XML document, allowing programmatic population of screening data. + * + * @return PrenatalGeneticScreeningType the newly created prenatal genetic screening object + */ public PrenatalGeneticScreeningType addNewPrenatalGenericScreening() { synchronized (this.monitor()) { this.check_orphaned(); @@ -834,7 +1411,16 @@ public PrenatalGeneticScreeningType addNewPrenatalGenericScreening() { return target; } } - + + /** + * Gets the first custom laboratory test information. + * + * Custom lab slots allow for recording additional laboratory tests not covered by the standard + * prenatal screening panel. This could include specialized tests based on patient history, risk factors, + * or regional practice variations. + * + * @return CustomLab the first custom laboratory test data, or null if not set + */ public CustomLab getCustomLab1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -846,7 +1432,12 @@ public CustomLab getCustomLab1() { return target; } } - + + /** + * Sets the first custom laboratory test information. + * + * @param customLab1 CustomLab the first custom laboratory test data to set + */ public void setCustomLab1(final CustomLab customLab1) { synchronized (this.monitor()) { this.check_orphaned(); @@ -858,7 +1449,15 @@ public void setCustomLab1(final CustomLab customLab1) { target.set((XmlObject)customLab1); } } - + + /** + * Creates and adds a new first custom laboratory test element to the XML structure. + * + * This factory method creates a new CustomLab instance for the first custom lab slot and adds it + * to the XML document, allowing programmatic population of custom test data. + * + * @return CustomLab the newly created first custom laboratory test object + */ public CustomLab addNewCustomLab1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -867,7 +1466,15 @@ public CustomLab addNewCustomLab1() { return target; } } - + + /** + * Gets the second custom laboratory test information. + * + * This provides an additional slot for recording specialized laboratory tests not covered by the + * standard prenatal screening panel. + * + * @return CustomLab the second custom laboratory test data, or null if not set + */ public CustomLab getCustomLab2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -879,7 +1486,12 @@ public CustomLab getCustomLab2() { return target; } } - + + /** + * Sets the second custom laboratory test information. + * + * @param customLab2 CustomLab the second custom laboratory test data to set + */ public void setCustomLab2(final CustomLab customLab2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -891,7 +1503,15 @@ public void setCustomLab2(final CustomLab customLab2) { target.set((XmlObject)customLab2); } } - + + /** + * Creates and adds a new second custom laboratory test element to the XML structure. + * + * This factory method creates a new CustomLab instance for the second custom lab slot and adds it + * to the XML document, allowing programmatic population of custom test data. + * + * @return CustomLab the newly created second custom laboratory test object + */ public CustomLab addNewCustomLab2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -922,119 +1542,290 @@ public CustomLab addNewCustomLab2() { CUSTOMLAB1$34 = new QName("http://www.oscarmcmaster.org/AR2005", "customLab1"); CUSTOMLAB2$36 = new QName("http://www.oscarmcmaster.org/AR2005", "customLab2"); } - + + /** + * Inner implementation class for the HIV test result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the HivResult enumeration, supporting values such as NEGATIVE, POSITIVE, and DECLINED. + * + * @since 2026-01-24 + */ public static class HivResultImpl extends JavaStringEnumerationHolderEx implements HivResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new HivResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public HivResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for HivResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected HivResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the MCV (Mean Corpuscular Volume) test result type. + * + * This class extends Apache XMLBeans' JavaFloatHolderEx to provide XML binding for the + * MCV result as a floating-point value representing red blood cell size in femtoliters. + * + * @since 2026-01-24 + */ public static class McvResultImpl extends JavaFloatHolderEx implements McvResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new McvResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public McvResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for McvResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected McvResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the ABO blood type result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the AboResult enumeration, supporting blood type values A, B, AB, and O. + * + * @since 2026-01-24 + */ public static class AboResultImpl extends JavaStringEnumerationHolderEx implements AboResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new AboResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public AboResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for AboResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected AboResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the Rh factor result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the RhResult enumeration, supporting values POSITIVE and NEGATIVE. + * + * @since 2026-01-24 + */ public static class RhResultImpl extends JavaStringEnumerationHolderEx implements RhResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new RhResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public RhResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for RhResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected RhResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the gonorrhea test result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the GcResultGonorrhea enumeration, supporting values such as NEGATIVE and POSITIVE. + * + * @since 2026-01-24 + */ public static class GcResultGonorrheaImpl extends JavaStringEnumerationHolderEx implements GcResultGonorrhea { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new GcResultGonorrheaImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public GcResultGonorrheaImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for GcResultGonorrheaImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected GcResultGonorrheaImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the chlamydia test result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the GcResultChlamydia enumeration, supporting values such as NEGATIVE and POSITIVE. + * + * @since 2026-01-24 + */ public static class GcResultChlamydiaImpl extends JavaStringEnumerationHolderEx implements GcResultChlamydia { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new GcResultChlamydiaImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public GcResultChlamydiaImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for GcResultChlamydiaImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected GcResultChlamydiaImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the Hepatitis B surface antigen (HBsAg) test result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the HbsAgResult enumeration, supporting values such as NEGATIVE and POSITIVE. + * + * @since 2026-01-24 + */ public static class HbsAgResultImpl extends JavaStringEnumerationHolderEx implements HbsAgResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new HbsAgResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public HbsAgResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for HbsAgResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected HbsAgResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the VDRL syphilis test result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the VdrlResult enumeration, supporting values such as NON_REACTIVE and REACTIVE. + * + * @since 2026-01-24 + */ public static class VdrlResultImpl extends JavaStringEnumerationHolderEx implements VdrlResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new VdrlResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public VdrlResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for VdrlResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected VdrlResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the sickle cell screening test result enumeration type. + * + * This class extends Apache XMLBeans' JavaStringEnumerationHolderEx to provide XML binding + * for the SickleCellResult enumeration, supporting values such as NEGATIVE, POSITIVE, and TRAIT. + * + * @since 2026-01-24 + */ public static class SickleCellResultImpl extends JavaStringEnumerationHolderEx implements SickleCellResult { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new SickleCellResultImpl with the specified schema type. + * + * @param sType SchemaType the XML schema type definition + */ public SickleCellResultImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for SickleCellResultImpl with schema type and boolean flag. + * + * @param sType SchemaType the XML schema type definition + * @param b boolean flag for XMLBeans internal use + */ protected SickleCellResultImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryAndPhysicalExamImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryAndPhysicalExamImpl.java index 16f380e9c32..02ca44d82e5 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryAndPhysicalExamImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryAndPhysicalExamImpl.java @@ -13,6 +13,41 @@ import ca.openosp.openo.ar2005.MedicalHistoryAndPhysicalExam; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XMLBeans implementation for medical history and physical examination data used in the British Columbia + * Antenatal Record (AR2005) system. This class provides access to comprehensive prenatal care documentation + * including current pregnancy details, medical history, infectious disease screening, psychosocial assessment, + * family history, and physical examination findings. + * + *

    This implementation is part of the OpenO EMR's support for standardized prenatal care forms used across + * Canadian healthcare jurisdictions. The AR2005 format is specifically designed for BC's antenatal care + * documentation requirements and integrates with provincial health information systems.

    + * + *

    The class extends Apache XMLBeans {@link XmlComplexContentImpl} to provide XML serialization/deserialization + * capabilities for healthcare data exchange while maintaining thread safety through synchronized access to the + * underlying XML store.

    + * + *

    Key Medical Data Sections:

    + *
      + *
    • Current Pregnancy: Gestational details, prenatal care timeline, expected delivery date
    • + *
    • Medical History: Previous pregnancies, surgeries, chronic conditions, medications
    • + *
    • Generic History: General health background and relevant medical events
    • + *
    • Infectious Disease: Screening results for conditions affecting pregnancy (HIV, Hepatitis B, etc.)
    • + *
    • Psychosocial: Mental health, substance use, social support assessment
    • + *
    • Family History: Hereditary conditions, genetic risk factors
    • + *
    • Physical Examination: Clinical findings, vital signs, fetal development assessment
    • + *
    + * + * @see MedicalHistoryAndPhysicalExam + * @see CurrentPregnancyType + * @see MedicalHistoryType + * @see GenericHistoryType + * @see InfectiousDiseaseType + * @see PsychosocialType + * @see FamilyHistoryType + * @see PhysicalExaminationType + * @since 2026-01-24 + */ public class MedicalHistoryAndPhysicalExamImpl extends XmlComplexContentImpl implements MedicalHistoryAndPhysicalExam { private static final long serialVersionUID = 1L; @@ -23,11 +58,27 @@ public class MedicalHistoryAndPhysicalExamImpl extends XmlComplexContentImpl imp private static final QName PSYCHOSOCIAL$8; private static final QName FAMILYHISTORY$10; private static final QName PHYSICALEXAMINATION$12; - + + /** + * Constructs a new MedicalHistoryAndPhysicalExamImpl instance with the specified schema type. + * This constructor is typically called by the XMLBeans framework during XML parsing or + * when creating new instances through the Factory class. + * + * @param sType SchemaType the schema type definition for this XML element + */ public MedicalHistoryAndPhysicalExamImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the current pregnancy information from the antenatal record. + * This section contains details about the current pregnancy including gestational age, + * expected delivery date, prenatal care appointments, and pregnancy-specific health monitoring. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return CurrentPregnancyType the current pregnancy data, or null if not present in the record + */ public CurrentPregnancyType getCurrentPregnancy() { synchronized (this.monitor()) { this.check_orphaned(); @@ -39,7 +90,16 @@ public CurrentPregnancyType getCurrentPregnancy() { return target; } } - + + /** + * Sets the current pregnancy information in the antenatal record. + * This method either updates an existing current pregnancy element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param currentPregnancy CurrentPregnancyType the current pregnancy data to set + */ public void setCurrentPregnancy(final CurrentPregnancyType currentPregnancy) { synchronized (this.monitor()) { this.check_orphaned(); @@ -51,7 +111,16 @@ public void setCurrentPregnancy(final CurrentPregnancyType currentPregnancy) { target.set((XmlObject)currentPregnancy); } } - + + /** + * Creates and adds a new current pregnancy element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating pregnancy-specific data. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return CurrentPregnancyType a newly created current pregnancy element ready for data entry + */ public CurrentPregnancyType addNewCurrentPregnancy() { synchronized (this.monitor()) { this.check_orphaned(); @@ -60,7 +129,17 @@ public CurrentPregnancyType addNewCurrentPregnancy() { return target; } } - + + /** + * Retrieves the medical history section from the antenatal record. + * This section contains comprehensive information about the patient's previous pregnancies, + * surgeries, chronic medical conditions, current medications, allergies, and other relevant + * medical background that may affect prenatal care. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return MedicalHistoryType the medical history data, or null if not present in the record + */ public MedicalHistoryType getMedicalHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -72,7 +151,16 @@ public MedicalHistoryType getMedicalHistory() { return target; } } - + + /** + * Sets the medical history section in the antenatal record. + * This method either updates an existing medical history element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param medicalHistory MedicalHistoryType the medical history data to set + */ public void setMedicalHistory(final MedicalHistoryType medicalHistory) { synchronized (this.monitor()) { this.check_orphaned(); @@ -84,7 +172,16 @@ public void setMedicalHistory(final MedicalHistoryType medicalHistory) { target.set((XmlObject)medicalHistory); } } - + + /** + * Creates and adds a new medical history element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating medical history data. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return MedicalHistoryType a newly created medical history element ready for data entry + */ public MedicalHistoryType addNewMedicalHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -93,7 +190,16 @@ public MedicalHistoryType addNewMedicalHistory() { return target; } } - + + /** + * Retrieves the generic history section from the antenatal record. + * This section captures general health background and medical events that do not fit into + * specific categories but are relevant to prenatal care planning and risk assessment. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return GenericHistoryType the generic history data, or null if not present in the record + */ public GenericHistoryType getGenericHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -105,7 +211,16 @@ public GenericHistoryType getGenericHistory() { return target; } } - + + /** + * Sets the generic history section in the antenatal record. + * This method either updates an existing generic history element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param genericHistory GenericHistoryType the generic history data to set + */ public void setGenericHistory(final GenericHistoryType genericHistory) { synchronized (this.monitor()) { this.check_orphaned(); @@ -117,7 +232,16 @@ public void setGenericHistory(final GenericHistoryType genericHistory) { target.set((XmlObject)genericHistory); } } - + + /** + * Creates and adds a new generic history element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating generic history data. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return GenericHistoryType a newly created generic history element ready for data entry + */ public GenericHistoryType addNewGenericHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -126,7 +250,17 @@ public GenericHistoryType addNewGenericHistory() { return target; } } - + + /** + * Retrieves the infectious disease screening section from the antenatal record. + * This section contains critical screening results for infectious diseases that can affect + * pregnancy outcomes, including HIV, Hepatitis B, Hepatitis C, syphilis, Group B Streptococcus, + * and other communicable diseases requiring prenatal monitoring and intervention. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return InfectiousDiseaseType the infectious disease screening data, or null if not present in the record + */ public InfectiousDiseaseType getInfectiousDisease() { synchronized (this.monitor()) { this.check_orphaned(); @@ -138,7 +272,16 @@ public InfectiousDiseaseType getInfectiousDisease() { return target; } } - + + /** + * Sets the infectious disease screening section in the antenatal record. + * This method either updates an existing infectious disease element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param infectiousDisease InfectiousDiseaseType the infectious disease screening data to set + */ public void setInfectiousDisease(final InfectiousDiseaseType infectiousDisease) { synchronized (this.monitor()) { this.check_orphaned(); @@ -150,7 +293,16 @@ public void setInfectiousDisease(final InfectiousDiseaseType infectiousDisease) target.set((XmlObject)infectiousDisease); } } - + + /** + * Creates and adds a new infectious disease screening element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating infectious disease screening results. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return InfectiousDiseaseType a newly created infectious disease element ready for data entry + */ public InfectiousDiseaseType addNewInfectiousDisease() { synchronized (this.monitor()) { this.check_orphaned(); @@ -159,7 +311,17 @@ public InfectiousDiseaseType addNewInfectiousDisease() { return target; } } - + + /** + * Retrieves the psychosocial assessment section from the antenatal record. + * This section documents mental health status, substance use history, domestic violence screening, + * social support networks, and other psychosocial factors that may impact pregnancy outcomes + * and require supportive interventions during prenatal care. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return PsychosocialType the psychosocial assessment data, or null if not present in the record + */ public PsychosocialType getPsychosocial() { synchronized (this.monitor()) { this.check_orphaned(); @@ -171,7 +333,16 @@ public PsychosocialType getPsychosocial() { return target; } } - + + /** + * Sets the psychosocial assessment section in the antenatal record. + * This method either updates an existing psychosocial element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param psychosocial PsychosocialType the psychosocial assessment data to set + */ public void setPsychosocial(final PsychosocialType psychosocial) { synchronized (this.monitor()) { this.check_orphaned(); @@ -183,7 +354,16 @@ public void setPsychosocial(final PsychosocialType psychosocial) { target.set((XmlObject)psychosocial); } } - + + /** + * Creates and adds a new psychosocial assessment element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating psychosocial assessment data. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return PsychosocialType a newly created psychosocial assessment element ready for data entry + */ public PsychosocialType addNewPsychosocial() { synchronized (this.monitor()) { this.check_orphaned(); @@ -192,7 +372,17 @@ public PsychosocialType addNewPsychosocial() { return target; } } - + + /** + * Retrieves the family history section from the antenatal record. + * This section documents hereditary conditions, genetic disorders, and family health patterns + * that may indicate increased risk for pregnancy complications or congenital conditions requiring + * specialized monitoring, genetic counseling, or prenatal testing. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return FamilyHistoryType the family history data, or null if not present in the record + */ public FamilyHistoryType getFamilyHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -204,7 +394,16 @@ public FamilyHistoryType getFamilyHistory() { return target; } } - + + /** + * Sets the family history section in the antenatal record. + * This method either updates an existing family history element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param familyHistory FamilyHistoryType the family history data to set + */ public void setFamilyHistory(final FamilyHistoryType familyHistory) { synchronized (this.monitor()) { this.check_orphaned(); @@ -216,7 +415,16 @@ public void setFamilyHistory(final FamilyHistoryType familyHistory) { target.set((XmlObject)familyHistory); } } - + + /** + * Creates and adds a new family history element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating family history data. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return FamilyHistoryType a newly created family history element ready for data entry + */ public FamilyHistoryType addNewFamilyHistory() { synchronized (this.monitor()) { this.check_orphaned(); @@ -225,7 +433,17 @@ public FamilyHistoryType addNewFamilyHistory() { return target; } } - + + /** + * Retrieves the physical examination section from the antenatal record. + * This section contains comprehensive clinical findings from physical examinations performed + * during prenatal care, including vital signs, fetal development measurements, maternal health + * assessments, and any abnormal findings requiring medical attention or follow-up monitoring. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return PhysicalExaminationType the physical examination data, or null if not present in the record + */ public PhysicalExaminationType getPhysicalExamination() { synchronized (this.monitor()) { this.check_orphaned(); @@ -237,7 +455,16 @@ public PhysicalExaminationType getPhysicalExamination() { return target; } } - + + /** + * Sets the physical examination section in the antenatal record. + * This method either updates an existing physical examination element or creates a new one + * if not already present in the XML document. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @param physicalExamination PhysicalExaminationType the physical examination data to set + */ public void setPhysicalExamination(final PhysicalExaminationType physicalExamination) { synchronized (this.monitor()) { this.check_orphaned(); @@ -249,7 +476,16 @@ public void setPhysicalExamination(final PhysicalExaminationType physicalExamina target.set((XmlObject)physicalExamination); } } - + + /** + * Creates and adds a new physical examination element to the antenatal record. + * This method initializes a new XML element in the underlying store and returns a reference + * to it for populating physical examination findings. + * + *

    Thread-safe access is provided through synchronization on the internal XML store monitor.

    + * + * @return PhysicalExaminationType a newly created physical examination element ready for data entry + */ public PhysicalExaminationType addNewPhysicalExamination() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryTypeImpl.java index 6b03181c875..8744d95d46e 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/MedicalHistoryTypeImpl.java @@ -9,6 +9,43 @@ import ca.openosp.openo.ar2005.MedicalHistoryType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the MedicalHistoryType interface for tracking patient medical history + * as part of the British Columbia Antenatal Record (AR2005) system. + * + *

    This class provides XML-based storage and retrieval of significant medical conditions + * that may impact pregnancy and prenatal care. It tracks yes/no/null responses for various + * medical conditions including hypertension, cardiac issues, liver disease, psychiatric + * conditions, and surgical history. The data structure supports the BC Antenatal Record + * form used for comprehensive pregnancy documentation.

    + * + *

    The implementation uses Apache XMLBeans for XML serialization and deserialization, + * providing thread-safe access to medical history data through synchronized accessor methods. + * All medical condition fields use the YesNoNullType enumeration to represent affirmative, + * negative, or unknown medical history responses.

    + * + *

    Medical conditions tracked include:

    + *
      + *
    • Hypertension (high blood pressure)
    • + *
    • Endocrine disorders
    • + *
    • Urinary tract conditions
    • + *
    • Cardiac (heart) conditions
    • + *
    • Liver disease
    • + *
    • Gynaecological conditions
    • + *
    • Hematological disorders
    • + *
    • Previous surgeries
    • + *
    • Blood transfusion history
    • + *
    • Anesthetic complications
    • + *
    • Psychiatric conditions
    • + *
    • Epilepsy
    • + *
    • Other conditions (with free-text description)
    • + *
    + * + * @see ca.openosp.openo.ar2005.MedicalHistoryType + * @see ca.openosp.openo.ar2005.YesNoNullType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-24 + */ public class MedicalHistoryTypeImpl extends XmlComplexContentImpl implements MedicalHistoryType { private static final long serialVersionUID = 1L; @@ -26,11 +63,29 @@ public class MedicalHistoryTypeImpl extends XmlComplexContentImpl implements Med private static final QName EPILEPSY$22; private static final QName OTHERDESCR$24; private static final QName OTHER$26; - + + /** + * Constructs a new MedicalHistoryTypeImpl instance with the specified schema type. + * + *

    This constructor initializes the XMLBeans complex content implementation + * with the provided schema type definition. It is typically called by the + * XMLBeans framework during XML parsing or object instantiation.

    + * + * @param sType SchemaType the schema type definition for this medical history type + */ public MedicalHistoryTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the hypertension medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of hypertension (high blood pressure). This is a critical indicator for + * prenatal care as hypertension can lead to complications during pregnancy.

    + * + * @return YesNoNullType the hypertension status, or null if not set + */ public YesNoNullType getHypertension() { synchronized (this.monitor()) { this.check_orphaned(); @@ -42,7 +97,15 @@ public YesNoNullType getHypertension() { return target; } } - + + /** + * Sets the hypertension medical history indicator. + * + *

    Records whether the patient has a history of hypertension. This information + * is essential for risk assessment and care planning during pregnancy.

    + * + * @param hypertension YesNoNullType the hypertension status to set + */ public void setHypertension(final YesNoNullType hypertension) { synchronized (this.monitor()) { this.check_orphaned(); @@ -54,7 +117,15 @@ public void setHypertension(final YesNoNullType hypertension) { target.set((XmlObject)hypertension); } } - + + /** + * Creates and adds a new hypertension element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording hypertension status. + * This method is used when adding hypertension data to a previously empty field.

    + * + * @return YesNoNullType the newly created hypertension element + */ public YesNoNullType addNewHypertension() { synchronized (this.monitor()) { this.check_orphaned(); @@ -63,7 +134,16 @@ public YesNoNullType addNewHypertension() { return target; } } - + + /** + * Retrieves the endocrine disorder medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of endocrine disorders (such as thyroid disease, diabetes). Endocrine conditions + * require special monitoring during pregnancy.

    + * + * @return YesNoNullType the endocrine disorder status, or null if not set + */ public YesNoNullType getEndorince() { synchronized (this.monitor()) { this.check_orphaned(); @@ -75,7 +155,15 @@ public YesNoNullType getEndorince() { return target; } } - + + /** + * Sets the endocrine disorder medical history indicator. + * + *

    Records whether the patient has a history of endocrine disorders. + * This information is important for pregnancy management and risk assessment.

    + * + * @param endorince YesNoNullType the endocrine disorder status to set + */ public void setEndorince(final YesNoNullType endorince) { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +175,14 @@ public void setEndorince(final YesNoNullType endorince) { target.set((XmlObject)endorince); } } - + + /** + * Creates and adds a new endocrine disorder element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording endocrine disorder status.

    + * + * @return YesNoNullType the newly created endocrine disorder element + */ public YesNoNullType addNewEndorince() { synchronized (this.monitor()) { this.check_orphaned(); @@ -96,7 +191,16 @@ public YesNoNullType addNewEndorince() { return target; } } - + + /** + * Retrieves the urinary tract condition medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of urinary tract conditions (such as recurrent infections, kidney disease). + * Urinary tract issues are monitored closely during pregnancy.

    + * + * @return YesNoNullType the urinary tract condition status, or null if not set + */ public YesNoNullType getUrinaryTract() { synchronized (this.monitor()) { this.check_orphaned(); @@ -108,7 +212,14 @@ public YesNoNullType getUrinaryTract() { return target; } } - + + /** + * Sets the urinary tract condition medical history indicator. + * + *

    Records whether the patient has a history of urinary tract conditions.

    + * + * @param urinaryTract YesNoNullType the urinary tract condition status to set + */ public void setUrinaryTract(final YesNoNullType urinaryTract) { synchronized (this.monitor()) { this.check_orphaned(); @@ -120,7 +231,14 @@ public void setUrinaryTract(final YesNoNullType urinaryTract) { target.set((XmlObject)urinaryTract); } } - + + /** + * Creates and adds a new urinary tract element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording urinary tract condition status.

    + * + * @return YesNoNullType the newly created urinary tract element + */ public YesNoNullType addNewUrinaryTract() { synchronized (this.monitor()) { this.check_orphaned(); @@ -129,7 +247,16 @@ public YesNoNullType addNewUrinaryTract() { return target; } } - + + /** + * Retrieves the cardiac condition medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of cardiac (heart) conditions. Heart disease requires specialized care and + * monitoring during pregnancy to ensure maternal and fetal safety.

    + * + * @return YesNoNullType the cardiac condition status, or null if not set + */ public YesNoNullType getCardiac() { synchronized (this.monitor()) { this.check_orphaned(); @@ -141,7 +268,14 @@ public YesNoNullType getCardiac() { return target; } } - + + /** + * Sets the cardiac condition medical history indicator. + * + *

    Records whether the patient has a history of cardiac conditions.

    + * + * @param cardiac YesNoNullType the cardiac condition status to set + */ public void setCardiac(final YesNoNullType cardiac) { synchronized (this.monitor()) { this.check_orphaned(); @@ -153,7 +287,14 @@ public void setCardiac(final YesNoNullType cardiac) { target.set((XmlObject)cardiac); } } - + + /** + * Creates and adds a new cardiac element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording cardiac condition status.

    + * + * @return YesNoNullType the newly created cardiac element + */ public YesNoNullType addNewCardiac() { synchronized (this.monitor()) { this.check_orphaned(); @@ -162,7 +303,16 @@ public YesNoNullType addNewCardiac() { return target; } } - + + /** + * Retrieves the liver disease medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of liver disease. Liver conditions can affect medication metabolism and + * pregnancy outcomes.

    + * + * @return YesNoNullType the liver disease status, or null if not set + */ public YesNoNullType getLiver() { synchronized (this.monitor()) { this.check_orphaned(); @@ -174,7 +324,14 @@ public YesNoNullType getLiver() { return target; } } - + + /** + * Sets the liver disease medical history indicator. + * + *

    Records whether the patient has a history of liver disease.

    + * + * @param liver YesNoNullType the liver disease status to set + */ public void setLiver(final YesNoNullType liver) { synchronized (this.monitor()) { this.check_orphaned(); @@ -186,7 +343,14 @@ public void setLiver(final YesNoNullType liver) { target.set((XmlObject)liver); } } - + + /** + * Creates and adds a new liver element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording liver disease status.

    + * + * @return YesNoNullType the newly created liver element + */ public YesNoNullType addNewLiver() { synchronized (this.monitor()) { this.check_orphaned(); @@ -195,7 +359,16 @@ public YesNoNullType addNewLiver() { return target; } } - + + /** + * Retrieves the gynaecological condition medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of gynaecological conditions (such as fibroids, endometriosis, previous + * pregnancy complications). This history is particularly relevant for pregnancy care.

    + * + * @return YesNoNullType the gynaecological condition status, or null if not set + */ public YesNoNullType getGynaecology() { synchronized (this.monitor()) { this.check_orphaned(); @@ -207,7 +380,14 @@ public YesNoNullType getGynaecology() { return target; } } - + + /** + * Sets the gynaecological condition medical history indicator. + * + *

    Records whether the patient has a history of gynaecological conditions.

    + * + * @param gynaecology YesNoNullType the gynaecological condition status to set + */ public void setGynaecology(final YesNoNullType gynaecology) { synchronized (this.monitor()) { this.check_orphaned(); @@ -219,7 +399,14 @@ public void setGynaecology(final YesNoNullType gynaecology) { target.set((XmlObject)gynaecology); } } - + + /** + * Creates and adds a new gynaecology element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording gynaecological condition status.

    + * + * @return YesNoNullType the newly created gynaecology element + */ public YesNoNullType addNewGynaecology() { synchronized (this.monitor()) { this.check_orphaned(); @@ -228,7 +415,16 @@ public YesNoNullType addNewGynaecology() { return target; } } - + + /** + * Retrieves the hematological disorder medical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of hematological disorders (blood disorders such as anemia, clotting disorders, + * sickle cell disease). Blood disorders require careful monitoring during pregnancy.

    + * + * @return YesNoNullType the hematological disorder status, or null if not set + */ public YesNoNullType getHem() { synchronized (this.monitor()) { this.check_orphaned(); @@ -240,7 +436,14 @@ public YesNoNullType getHem() { return target; } } - + + /** + * Sets the hematological disorder medical history indicator. + * + *

    Records whether the patient has a history of hematological disorders.

    + * + * @param hem YesNoNullType the hematological disorder status to set + */ public void setHem(final YesNoNullType hem) { synchronized (this.monitor()) { this.check_orphaned(); @@ -252,7 +455,14 @@ public void setHem(final YesNoNullType hem) { target.set((XmlObject)hem); } } - + + /** + * Creates and adds a new hematological element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording hematological disorder status.

    + * + * @return YesNoNullType the newly created hematological element + */ public YesNoNullType addNewHem() { synchronized (this.monitor()) { this.check_orphaned(); @@ -261,7 +471,16 @@ public YesNoNullType addNewHem() { return target; } } - + + /** + * Retrieves the surgical history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of surgeries. Previous surgeries, especially abdominal or pelvic procedures, + * can affect pregnancy and delivery planning.

    + * + * @return YesNoNullType the surgical history status, or null if not set + */ public YesNoNullType getSurgeries() { synchronized (this.monitor()) { this.check_orphaned(); @@ -273,7 +492,14 @@ public YesNoNullType getSurgeries() { return target; } } - + + /** + * Sets the surgical history indicator. + * + *

    Records whether the patient has a history of surgeries.

    + * + * @param surgeries YesNoNullType the surgical history status to set + */ public void setSurgeries(final YesNoNullType surgeries) { synchronized (this.monitor()) { this.check_orphaned(); @@ -285,7 +511,14 @@ public void setSurgeries(final YesNoNullType surgeries) { target.set((XmlObject)surgeries); } } - + + /** + * Creates and adds a new surgeries element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording surgical history status.

    + * + * @return YesNoNullType the newly created surgeries element + */ public YesNoNullType addNewSurgeries() { synchronized (this.monitor()) { this.check_orphaned(); @@ -294,7 +527,16 @@ public YesNoNullType addNewSurgeries() { return target; } } - + + /** + * Retrieves the blood transfusion history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of blood transfusions. This information is important for assessing potential + * blood-borne infection risks and antibody formation.

    + * + * @return YesNoNullType the blood transfusion history status, or null if not set + */ public YesNoNullType getBloodTransfusion() { synchronized (this.monitor()) { this.check_orphaned(); @@ -306,7 +548,14 @@ public YesNoNullType getBloodTransfusion() { return target; } } - + + /** + * Sets the blood transfusion history indicator. + * + *

    Records whether the patient has a history of blood transfusions.

    + * + * @param bloodTransfusion YesNoNullType the blood transfusion history status to set + */ public void setBloodTransfusion(final YesNoNullType bloodTransfusion) { synchronized (this.monitor()) { this.check_orphaned(); @@ -318,7 +567,14 @@ public void setBloodTransfusion(final YesNoNullType bloodTransfusion) { target.set((XmlObject)bloodTransfusion); } } - + + /** + * Creates and adds a new blood transfusion element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording blood transfusion history status.

    + * + * @return YesNoNullType the newly created blood transfusion element + */ public YesNoNullType addNewBloodTransfusion() { synchronized (this.monitor()) { this.check_orphaned(); @@ -327,7 +583,16 @@ public YesNoNullType addNewBloodTransfusion() { return target; } } - + + /** + * Retrieves the anesthetic complication history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of anesthetic complications. This is critical information for anesthesiologists + * when planning pain management during labor and delivery.

    + * + * @return YesNoNullType the anesthetic complication history status, or null if not set + */ public YesNoNullType getAnesthetics() { synchronized (this.monitor()) { this.check_orphaned(); @@ -339,7 +604,14 @@ public YesNoNullType getAnesthetics() { return target; } } - + + /** + * Sets the anesthetic complication history indicator. + * + *

    Records whether the patient has a history of anesthetic complications.

    + * + * @param anesthetics YesNoNullType the anesthetic complication history status to set + */ public void setAnesthetics(final YesNoNullType anesthetics) { synchronized (this.monitor()) { this.check_orphaned(); @@ -351,7 +623,14 @@ public void setAnesthetics(final YesNoNullType anesthetics) { target.set((XmlObject)anesthetics); } } - + + /** + * Creates and adds a new anesthetics element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording anesthetic complication history status.

    + * + * @return YesNoNullType the newly created anesthetics element + */ public YesNoNullType addNewAnesthetics() { synchronized (this.monitor()) { this.check_orphaned(); @@ -360,7 +639,17 @@ public YesNoNullType addNewAnesthetics() { return target; } } - + + /** + * Retrieves the psychiatric condition history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of psychiatric conditions (such as depression, anxiety, bipolar disorder). + * Mental health history is important for comprehensive perinatal care and + * screening for postpartum depression risk.

    + * + * @return YesNoNullType the psychiatric condition history status, or null if not set + */ public YesNoNullType getPsychiatry() { synchronized (this.monitor()) { this.check_orphaned(); @@ -372,7 +661,14 @@ public YesNoNullType getPsychiatry() { return target; } } - + + /** + * Sets the psychiatric condition history indicator. + * + *

    Records whether the patient has a history of psychiatric conditions.

    + * + * @param psychiatry YesNoNullType the psychiatric condition history status to set + */ public void setPsychiatry(final YesNoNullType psychiatry) { synchronized (this.monitor()) { this.check_orphaned(); @@ -384,7 +680,14 @@ public void setPsychiatry(final YesNoNullType psychiatry) { target.set((XmlObject)psychiatry); } } - + + /** + * Creates and adds a new psychiatry element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording psychiatric condition history status.

    + * + * @return YesNoNullType the newly created psychiatry element + */ public YesNoNullType addNewPsychiatry() { synchronized (this.monitor()) { this.check_orphaned(); @@ -393,7 +696,16 @@ public YesNoNullType addNewPsychiatry() { return target; } } - + + /** + * Retrieves the epilepsy history indicator. + * + *

    Gets the yes/no/null status indicating whether the patient has a history + * of epilepsy or seizure disorders. This requires careful medication management + * during pregnancy to balance seizure control with fetal safety.

    + * + * @return YesNoNullType the epilepsy history status, or null if not set + */ public YesNoNullType getEpilepsy() { synchronized (this.monitor()) { this.check_orphaned(); @@ -405,7 +717,14 @@ public YesNoNullType getEpilepsy() { return target; } } - + + /** + * Sets the epilepsy history indicator. + * + *

    Records whether the patient has a history of epilepsy or seizure disorders.

    + * + * @param epilepsy YesNoNullType the epilepsy history status to set + */ public void setEpilepsy(final YesNoNullType epilepsy) { synchronized (this.monitor()) { this.check_orphaned(); @@ -417,7 +736,14 @@ public void setEpilepsy(final YesNoNullType epilepsy) { target.set((XmlObject)epilepsy); } } - + + /** + * Creates and adds a new epilepsy element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording epilepsy history status.

    + * + * @return YesNoNullType the newly created epilepsy element + */ public YesNoNullType addNewEpilepsy() { synchronized (this.monitor()) { this.check_orphaned(); @@ -426,7 +752,17 @@ public YesNoNullType addNewEpilepsy() { return target; } } - + + /** + * Retrieves the free-text description of other medical conditions. + * + *

    Gets the string value containing additional medical history information + * not captured by the predefined condition fields. This allows healthcare + * providers to document any relevant medical conditions that don't fit into + * the standard categories.

    + * + * @return String the description of other medical conditions, or null if not set + */ public String getOtherDescr() { synchronized (this.monitor()) { this.check_orphaned(); @@ -438,7 +774,16 @@ public String getOtherDescr() { return target.getStringValue(); } } - + + /** + * Retrieves the XML representation of the other medical conditions description. + * + *

    Gets the XmlString object containing the description of other medical + * conditions. This method provides access to the underlying XML structure + * for advanced XML processing scenarios.

    + * + * @return XmlString the XML representation of the description, or null if not set + */ public XmlString xgetOtherDescr() { synchronized (this.monitor()) { this.check_orphaned(); @@ -447,7 +792,15 @@ public XmlString xgetOtherDescr() { return target; } } - + + /** + * Sets the free-text description of other medical conditions. + * + *

    Stores additional medical history information not covered by the + * predefined condition fields.

    + * + * @param otherDescr String the description of other medical conditions to set + */ public void setOtherDescr(final String otherDescr) { synchronized (this.monitor()) { this.check_orphaned(); @@ -459,7 +812,15 @@ public void setOtherDescr(final String otherDescr) { target.setStringValue(otherDescr); } } - + + /** + * Sets the XML representation of the other medical conditions description. + * + *

    Stores the description using an XmlString object, providing direct + * XML-level access for advanced XML processing scenarios.

    + * + * @param otherDescr XmlString the XML representation of the description to set + */ public void xsetOtherDescr(final XmlString otherDescr) { synchronized (this.monitor()) { this.check_orphaned(); @@ -471,7 +832,16 @@ public void xsetOtherDescr(final XmlString otherDescr) { target.set((XmlObject)otherDescr); } } - + + /** + * Retrieves the "other conditions" indicator flag. + * + *

    Gets the yes/no/null status indicating whether the patient has other + * medical conditions beyond the predefined categories. When set to yes, + * details should be provided in the otherDescr field.

    + * + * @return YesNoNullType the other conditions flag status, or null if not set + */ public YesNoNullType getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -483,7 +853,15 @@ public YesNoNullType getOther() { return target; } } - + + /** + * Sets the "other conditions" indicator flag. + * + *

    Records whether the patient has other medical conditions. This flag + * is typically set to yes when additional conditions are described in otherDescr.

    + * + * @param other YesNoNullType the other conditions flag status to set + */ public void setOther(final YesNoNullType other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -495,7 +873,14 @@ public void setOther(final YesNoNullType other) { target.set((XmlObject)other); } } - + + /** + * Creates and adds a new "other conditions" element to the medical history. + * + *

    Initializes a new YesNoNullType element for recording the other conditions flag status.

    + * + * @return YesNoNullType the newly created other conditions element + */ public YesNoNullType addNewOther() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/NewbornCareImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/NewbornCareImpl.java index ef5d974d3c4..ee890548a6d 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/NewbornCareImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/NewbornCareImpl.java @@ -9,6 +9,23 @@ import ca.openosp.openo.ar2005.NewbornCare; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for the NewbornCare XML schema type. + * + * This class provides the concrete implementation for managing newborn care provider information + * in the British Columbia Antenatal Record (BCAR) AR2005 form. It handles XML-based storage of + * healthcare provider types who will provide care for the newborn, including pediatricians, + * family physicians, midwives, and other specified providers. + * + * The implementation uses Apache XMLBeans framework to provide type-safe access to XML elements + * defined in the AR2005 schema. Access to the underlying XML store is synchronized using the + * XMLBeans monitor(), providing thread-safe access to individual XML operations performed by this + * class. + * + * @since 2026-01-23 + * @see ca.openosp.openo.ar2005.NewbornCare + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + */ public class NewbornCareImpl extends XmlComplexContentImpl implements NewbornCare { private static final long serialVersionUID = 1L; @@ -16,11 +33,28 @@ public class NewbornCareImpl extends XmlComplexContentImpl implements NewbornCar private static final QName FP$2; private static final QName MIDWIFE$4; private static final QName OTHER$6; - + + /** + * Constructs a new NewbornCareImpl instance with the specified schema type. + * + * This constructor initializes the XML complex content implementation with the provided + * schema type, which defines the structure and validation rules for the newborn care + * provider information in the AR2005 antenatal record. + * + * @param sType SchemaType the schema type definition for this XML element + */ public NewbornCareImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the pediatrician care indicator. + * + * Gets the boolean value indicating whether a pediatrician will provide care for the newborn. + * This method provides thread-safe access to the underlying XML element. + * + * @return boolean true if a pediatrician is designated for newborn care, false otherwise + */ public boolean getPed() { synchronized (this.monitor()) { this.check_orphaned(); @@ -29,7 +63,17 @@ public boolean getPed() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the pediatrician care indicator as an XmlBoolean object. + * + * Gets the XmlBoolean representation of the pediatrician care indicator, providing access + * to the underlying XMLBeans type for advanced XML manipulation. This method is used when + * direct access to the XML type is needed for validation or type-specific operations. + * + * @return XmlBoolean the XML boolean object representing the pediatrician care indicator, + * or null if not set + */ public XmlBoolean xgetPed() { synchronized (this.monitor()) { this.check_orphaned(); @@ -38,7 +82,16 @@ public XmlBoolean xgetPed() { return target; } } - + + /** + * Sets the pediatrician care indicator. + * + * Updates the boolean value indicating whether a pediatrician will provide care for the newborn. + * This method provides thread-safe access to modify the underlying XML element, creating the + * element if it does not already exist. + * + * @param ped boolean true to designate a pediatrician for newborn care, false otherwise + */ public void setPed(final boolean ped) { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +103,16 @@ public void setPed(final boolean ped) { target.setBooleanValue(ped); } } - + + /** + * Sets the pediatrician care indicator using an XmlBoolean object. + * + * Updates the pediatrician care indicator using an XmlBoolean type, providing type-safe + * XML manipulation. This method is used when setting values from existing XML objects + * or when XML-specific validation is required. + * + * @param ped XmlBoolean the XML boolean object representing the pediatrician care indicator + */ public void xsetPed(final XmlBoolean ped) { synchronized (this.monitor()) { this.check_orphaned(); @@ -62,7 +124,15 @@ public void xsetPed(final XmlBoolean ped) { target.set((XmlObject)ped); } } - + + /** + * Retrieves the family physician care indicator. + * + * Gets the boolean value indicating whether a family physician will provide care for the newborn. + * This method provides thread-safe access to the underlying XML element. + * + * @return boolean true if a family physician is designated for newborn care, false otherwise + */ public boolean getFP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -71,7 +141,17 @@ public boolean getFP() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the family physician care indicator as an XmlBoolean object. + * + * Gets the XmlBoolean representation of the family physician care indicator, providing access + * to the underlying XMLBeans type for advanced XML manipulation. This method is used when + * direct access to the XML type is needed for validation or type-specific operations. + * + * @return XmlBoolean the XML boolean object representing the family physician care indicator, + * or null if not set + */ public XmlBoolean xgetFP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -80,7 +160,16 @@ public XmlBoolean xgetFP() { return target; } } - + + /** + * Sets the family physician care indicator. + * + * Updates the boolean value indicating whether a family physician will provide care for the newborn. + * This method provides thread-safe access to modify the underlying XML element, creating the + * element if it does not already exist. + * + * @param fp boolean true to designate a family physician for newborn care, false otherwise + */ public void setFP(final boolean fp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -92,7 +181,16 @@ public void setFP(final boolean fp) { target.setBooleanValue(fp); } } - + + /** + * Sets the family physician care indicator using an XmlBoolean object. + * + * Updates the family physician care indicator using an XmlBoolean type, providing type-safe + * XML manipulation. This method is used when setting values from existing XML objects + * or when XML-specific validation is required. + * + * @param fp XmlBoolean the XML boolean object representing the family physician care indicator + */ public void xsetFP(final XmlBoolean fp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -104,7 +202,15 @@ public void xsetFP(final XmlBoolean fp) { target.set((XmlObject)fp); } } - + + /** + * Retrieves the midwife care indicator. + * + * Gets the boolean value indicating whether a midwife will provide care for the newborn. + * This method provides thread-safe access to the underlying XML element. + * + * @return boolean true if a midwife is designated for newborn care, false otherwise + */ public boolean getMidwife() { synchronized (this.monitor()) { this.check_orphaned(); @@ -113,7 +219,17 @@ public boolean getMidwife() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the midwife care indicator as an XmlBoolean object. + * + * Gets the XmlBoolean representation of the midwife care indicator, providing access + * to the underlying XMLBeans type for advanced XML manipulation. This method is used when + * direct access to the XML type is needed for validation or type-specific operations. + * + * @return XmlBoolean the XML boolean object representing the midwife care indicator, + * or null if not set + */ public XmlBoolean xgetMidwife() { synchronized (this.monitor()) { this.check_orphaned(); @@ -122,7 +238,16 @@ public XmlBoolean xgetMidwife() { return target; } } - + + /** + * Sets the midwife care indicator. + * + * Updates the boolean value indicating whether a midwife will provide care for the newborn. + * This method provides thread-safe access to modify the underlying XML element, creating the + * element if it does not already exist. + * + * @param midwife boolean true to designate a midwife for newborn care, false otherwise + */ public void setMidwife(final boolean midwife) { synchronized (this.monitor()) { this.check_orphaned(); @@ -134,7 +259,16 @@ public void setMidwife(final boolean midwife) { target.setBooleanValue(midwife); } } - + + /** + * Sets the midwife care indicator using an XmlBoolean object. + * + * Updates the midwife care indicator using an XmlBoolean type, providing type-safe + * XML manipulation. This method is used when setting values from existing XML objects + * or when XML-specific validation is required. + * + * @param midwife XmlBoolean the XML boolean object representing the midwife care indicator + */ public void xsetMidwife(final XmlBoolean midwife) { synchronized (this.monitor()) { this.check_orphaned(); @@ -146,7 +280,16 @@ public void xsetMidwife(final XmlBoolean midwife) { target.set((XmlObject)midwife); } } - + + /** + * Retrieves the other provider type description. + * + * Gets the string value describing other healthcare provider types not covered by the + * predefined categories (pediatrician, family physician, or midwife). This allows for + * flexible capture of additional provider information in the antenatal record. + * + * @return String the description of other provider types, or null if not set + */ public String getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -158,7 +301,17 @@ public String getOther() { return target.getStringValue(); } } - + + /** + * Retrieves the other provider type description as an XmlString object. + * + * Gets the XmlString representation of the other provider type description, providing access + * to the underlying XMLBeans type for advanced XML manipulation. This method is used when + * direct access to the XML type is needed for validation or type-specific operations. + * + * @return XmlString the XML string object representing the other provider type description, + * or null if not set + */ public XmlString xgetOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +320,16 @@ public XmlString xgetOther() { return target; } } - + + /** + * Sets the other provider type description. + * + * Updates the string value describing other healthcare provider types for newborn care. + * This method provides thread-safe access to modify the underlying XML element, creating the + * element if it does not already exist. + * + * @param other String the description of other provider types for newborn care + */ public void setOther(final String other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +341,16 @@ public void setOther(final String other) { target.setStringValue(other); } } - + + /** + * Sets the other provider type description using an XmlString object. + * + * Updates the other provider type description using an XmlString type, providing type-safe + * XML manipulation. This method is used when setting values from existing XML objects + * or when XML-specific validation is required. + * + * @param other XmlString the XML string object representing the other provider type description + */ public void xsetOther(final XmlString other) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/NormalAbnormalNullTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/NormalAbnormalNullTypeImpl.java index 42797918832..2bd2984e1ab 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/NormalAbnormalNullTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/NormalAbnormalNullTypeImpl.java @@ -8,17 +8,61 @@ import ca.openosp.openo.ar2005.NormalAbnormalNullType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the NormalAbnormalNullType XML schema type for the BC AR2005 Antenatal Record system. + * + *

    This class provides XML data binding functionality for tri-state clinical observation results + * used in British Columbia's Antenatal Record 2005 (BCAR) form. It represents clinical findings + * that can be classified as normal, abnormal, or null (not assessed/not applicable).

    + * + *

    The tri-state model is commonly used in prenatal care documentation to record: + *

      + *
    • Normal - Clinical finding is within expected parameters for pregnancy care
    • + *
    • Abnormal - Clinical finding requires attention or follow-up
    • + *
    • Null - Assessment not performed, not applicable, or data unavailable
    • + *
    + *

    + * + *

    This implementation extends Apache XMLBeans' XmlComplexContentImpl to provide thread-safe + * XML serialization and deserialization for healthcare data exchange. All accessor methods are + * synchronized to ensure data integrity in multi-threaded healthcare application environments.

    + * + *

    XML Namespace: http://www.oscarmcmaster.org/AR2005

    + * + * @see NormalAbnormalNullType + * @see ca.openosp.openo.ar2005 AR2005 package documentation + * @since 2026-01-23 + */ public class NormalAbnormalNullTypeImpl extends XmlComplexContentImpl implements NormalAbnormalNullType { private static final long serialVersionUID = 1L; private static final QName NORMAL$0; private static final QName ABNORMAL$2; private static final QName NULL$4; - + + /** + * Constructs a new NormalAbnormalNullTypeImpl instance with the specified schema type. + * + *

    This constructor is typically invoked by the Apache XMLBeans framework during + * XML deserialization or when creating new instances via the Factory pattern. It + * initializes the underlying XML object store with the appropriate schema type + * definition for the AR2005 normal/abnormal/null type.

    + * + * @param sType SchemaType the XML schema type definition for this instance + */ public NormalAbnormalNullTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the normal status indicator as a primitive boolean value. + * + *

    This method returns the boolean value of the "normal" element in the XML document, + * indicating whether the clinical observation falls within normal parameters for prenatal care. + * The method is thread-safe and synchronized on the underlying XML object monitor.

    + * + * @return boolean true if the observation is marked as normal, false if the element is not set or is false + */ public boolean getNormal() { synchronized (this.monitor()) { this.check_orphaned(); @@ -27,7 +71,16 @@ public boolean getNormal() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the normal status indicator as an XmlBoolean object. + * + *

    This method provides access to the underlying XML representation of the "normal" + * element, allowing for XML schema validation and manipulation. Returns the XmlBoolean + * object directly from the XML store, or null if the element is not set.

    + * + * @return XmlBoolean the XML representation of the normal indicator, or null if not set + */ public XmlBoolean xgetNormal() { synchronized (this.monitor()) { this.check_orphaned(); @@ -36,14 +89,32 @@ public XmlBoolean xgetNormal() { return target; } } - + + /** + * Checks whether the normal element has been explicitly set in the XML document. + * + *

    This method determines if the "normal" element is present in the underlying XML store, + * regardless of its boolean value. Useful for distinguishing between "false" and "not set" + * states in tri-state clinical observation recording.

    + * + * @return boolean true if the normal element is present in the XML document, false otherwise + */ public boolean isSetNormal() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(NormalAbnormalNullTypeImpl.NORMAL$0) != 0; } } - + + /** + * Sets the normal status indicator to the specified boolean value. + * + *

    This method updates the "normal" element in the XML document to indicate whether + * the clinical observation is within normal parameters for prenatal care. If the element + * does not exist, it is created in the XML store. The operation is thread-safe.

    + * + * @param normal boolean true to mark the observation as normal, false otherwise + */ public void setNormal(final boolean normal) { synchronized (this.monitor()) { this.check_orphaned(); @@ -55,7 +126,16 @@ public void setNormal(final boolean normal) { target.setBooleanValue(normal); } } - + + /** + * Sets the normal status indicator using an XmlBoolean object. + * + *

    This method provides XML schema-aware setting of the "normal" element by accepting + * an XmlBoolean object. This allows for preserving XML attributes and schema validation + * metadata during the update. If the element does not exist, it is created in the XML store.

    + * + * @param normal XmlBoolean the XML representation of the normal indicator to set + */ public void xsetNormal(final XmlBoolean normal) { synchronized (this.monitor()) { this.check_orphaned(); @@ -67,14 +147,32 @@ public void xsetNormal(final XmlBoolean normal) { target.set((XmlObject)normal); } } - + + /** + * Removes the normal element from the XML document. + * + *

    This method deletes the "normal" element from the underlying XML store, effectively + * resetting this component of the tri-state observation. After calling this method, + * isSetNormal() will return false. Use this to indicate that the normal status has not + * been assessed or is not applicable.

    + */ public void unsetNormal() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(NormalAbnormalNullTypeImpl.NORMAL$0, 0); } } - + + /** + * Retrieves the abnormal status indicator as a primitive boolean value. + * + *

    This method returns the boolean value of the "abnormal" element in the XML document, + * indicating whether the clinical observation falls outside normal parameters and requires + * attention or follow-up care. The method is thread-safe and synchronized on the underlying + * XML object monitor.

    + * + * @return boolean true if the observation is marked as abnormal, false if the element is not set or is false + */ public boolean getAbnormal() { synchronized (this.monitor()) { this.check_orphaned(); @@ -83,7 +181,16 @@ public boolean getAbnormal() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the abnormal status indicator as an XmlBoolean object. + * + *

    This method provides access to the underlying XML representation of the "abnormal" + * element, allowing for XML schema validation and manipulation. Returns the XmlBoolean + * object directly from the XML store, or null if the element is not set.

    + * + * @return XmlBoolean the XML representation of the abnormal indicator, or null if not set + */ public XmlBoolean xgetAbnormal() { synchronized (this.monitor()) { this.check_orphaned(); @@ -92,14 +199,33 @@ public XmlBoolean xgetAbnormal() { return target; } } - + + /** + * Checks whether the abnormal element has been explicitly set in the XML document. + * + *

    This method determines if the "abnormal" element is present in the underlying XML store, + * regardless of its boolean value. Useful for distinguishing between "false" and "not set" + * states in tri-state clinical observation recording.

    + * + * @return boolean true if the abnormal element is present in the XML document, false otherwise + */ public boolean isSetAbnormal() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(NormalAbnormalNullTypeImpl.ABNORMAL$2) != 0; } } - + + /** + * Sets the abnormal status indicator to the specified boolean value. + * + *

    This method updates the "abnormal" element in the XML document to indicate whether + * the clinical observation falls outside normal parameters and requires attention or + * follow-up care. If the element does not exist, it is created in the XML store. + * The operation is thread-safe.

    + * + * @param abnormal boolean true to mark the observation as abnormal, false otherwise + */ public void setAbnormal(final boolean abnormal) { synchronized (this.monitor()) { this.check_orphaned(); @@ -111,7 +237,16 @@ public void setAbnormal(final boolean abnormal) { target.setBooleanValue(abnormal); } } - + + /** + * Sets the abnormal status indicator using an XmlBoolean object. + * + *

    This method provides XML schema-aware setting of the "abnormal" element by accepting + * an XmlBoolean object. This allows for preserving XML attributes and schema validation + * metadata during the update. If the element does not exist, it is created in the XML store.

    + * + * @param abnormal XmlBoolean the XML representation of the abnormal indicator to set + */ public void xsetAbnormal(final XmlBoolean abnormal) { synchronized (this.monitor()) { this.check_orphaned(); @@ -123,14 +258,32 @@ public void xsetAbnormal(final XmlBoolean abnormal) { target.set((XmlObject)abnormal); } } - + + /** + * Removes the abnormal element from the XML document. + * + *

    This method deletes the "abnormal" element from the underlying XML store, effectively + * resetting this component of the tri-state observation. After calling this method, + * isSetAbnormal() will return false. Use this to indicate that the abnormal status has not + * been assessed or is not applicable.

    + */ public void unsetAbnormal() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(NormalAbnormalNullTypeImpl.ABNORMAL$2, 0); } } - + + /** + * Retrieves the null status indicator as a primitive boolean value. + * + *

    This method returns the boolean value of the "null" element in the XML document, + * indicating whether the clinical observation was not assessed, is not applicable, or + * data is unavailable. The method is thread-safe and synchronized on the underlying + * XML object monitor.

    + * + * @return boolean true if the observation is marked as null/not assessed, false if the element is not set or is false + */ public boolean getNull() { synchronized (this.monitor()) { this.check_orphaned(); @@ -139,7 +292,16 @@ public boolean getNull() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the null status indicator as an XmlBoolean object. + * + *

    This method provides access to the underlying XML representation of the "null" + * element, allowing for XML schema validation and manipulation. Returns the XmlBoolean + * object directly from the XML store, or null if the element is not set.

    + * + * @return XmlBoolean the XML representation of the null indicator, or null if not set + */ public XmlBoolean xgetNull() { synchronized (this.monitor()) { this.check_orphaned(); @@ -148,14 +310,32 @@ public XmlBoolean xgetNull() { return target; } } - + + /** + * Checks whether the null element has been explicitly set in the XML document. + * + *

    This method determines if the "null" element is present in the underlying XML store, + * regardless of its boolean value. Useful for distinguishing between "false" and "not set" + * states in tri-state clinical observation recording.

    + * + * @return boolean true if the null element is present in the XML document, false otherwise + */ public boolean isSetNull() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(NormalAbnormalNullTypeImpl.NULL$4) != 0; } } - + + /** + * Sets the null status indicator to the specified boolean value. + * + *

    This method updates the "null" element in the XML document to indicate whether + * the clinical observation was not assessed, is not applicable, or data is unavailable. + * If the element does not exist, it is created in the XML store. The operation is thread-safe.

    + * + * @param xnull boolean true to mark the observation as null/not assessed, false otherwise + */ public void setNull(final boolean xnull) { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +347,16 @@ public void setNull(final boolean xnull) { target.setBooleanValue(xnull); } } - + + /** + * Sets the null status indicator using an XmlBoolean object. + * + *

    This method provides XML schema-aware setting of the "null" element by accepting + * an XmlBoolean object. This allows for preserving XML attributes and schema validation + * metadata during the update. If the element does not exist, it is created in the XML store.

    + * + * @param xnull XmlBoolean the XML representation of the null indicator to set + */ public void xsetNull(final XmlBoolean xnull) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +368,15 @@ public void xsetNull(final XmlBoolean xnull) { target.set((XmlObject)xnull); } } - + + /** + * Removes the null element from the XML document. + * + *

    This method deletes the "null" element from the underlying XML store, effectively + * resetting this component of the tri-state observation. After calling this method, + * isSetNull() will return false. Use this when removing a previously set null/not assessed + * status.

    + */ public void unsetNull() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryImpl.java index 4756a0c64d1..4e576c07496 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryImpl.java @@ -9,15 +9,61 @@ import ca.openosp.openo.ar2005.ObstetricalHistory; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XMLBeans implementation class for managing obstetrical history data in the AR2005 antenatal record format. + * + *

    This class provides data access and manipulation methods for obstetrical history information, + * which is a critical component of prenatal care documentation. It manages a collection of + * {@link ObstetricalHistoryItemList} elements that track previous pregnancy outcomes, complications, + * and other relevant obstetrical events for comprehensive maternal health assessment.

    + * + *

    The implementation uses Apache XMLBeans to handle XML serialization/deserialization of obstetrical + * history records according to the AR2005 schema (http://www.oscarmcmaster.org/AR2005). All data access + * operations are thread-safe through internal synchronization mechanisms.

    + * + *

    Healthcare Context: Obstetrical history is essential for:

    + *
      + *
    • Risk assessment during current pregnancy
    • + *
    • Identification of potential complications based on past outcomes
    • + *
    • Care planning and delivery method decisions
    • + *
    • Continuity of care across multiple pregnancies
    • + *
    + * + * @see ObstetricalHistory + * @see ObstetricalHistoryItemList + * + * @since 2026-01-24 + */ public class ObstetricalHistoryImpl extends XmlComplexContentImpl implements ObstetricalHistory { private static final long serialVersionUID = 1L; private static final QName OBSLIST$0; - + + /** + * Constructs a new ObstetricalHistoryImpl instance with the specified XMLBeans schema type. + * + *

    This constructor is typically invoked by the XMLBeans framework during XML parsing + * or programmatic object creation. It initializes the internal XML store structure + * according to the AR2005 schema definition for obstetrical history data.

    + * + * @param sType SchemaType the XMLBeans schema type definition for this obstetrical history object + */ public ObstetricalHistoryImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves all obstetrical history items as an array. + * + *

    This method returns a complete array of all {@link ObstetricalHistoryItemList} elements + * stored in this obstetrical history record. Each item represents a distinct obstetrical event + * or pregnancy outcome from the patient's medical history.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @return ObstetricalHistoryItemList[] array containing all obstetrical history items; + * returns an empty array if no items exist + */ public ObstetricalHistoryItemList[] getObsListArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -28,7 +74,21 @@ public ObstetricalHistoryItemList[] getObsListArray() { return result; } } - + + /** + * Retrieves a specific obstetrical history item by its zero-based index position. + * + *

    This method provides direct access to individual obstetrical history items using + * array-style indexing. The index is zero-based, so valid values range from 0 to + * {@code sizeOfObsListArray() - 1}.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @param i int the zero-based index of the obstetrical history item to retrieve + * @return ObstetricalHistoryItemList the obstetrical history item at the specified index + * @throws IndexOutOfBoundsException if the index is negative or greater than or equal to + * the number of items in the collection + */ public ObstetricalHistoryItemList getObsListArray(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -40,21 +100,59 @@ public ObstetricalHistoryItemList getObsListArray(final int i) { return target; } } - + + /** + * Returns the total number of obstetrical history items in this collection. + * + *

    This method provides the count of all {@link ObstetricalHistoryItemList} elements + * currently stored in this obstetrical history record. The returned value can be used + * to iterate through items or validate index bounds before accessing specific elements.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @return int the total number of obstetrical history items; returns 0 if the collection is empty + */ public int sizeOfObsListArray() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(ObstetricalHistoryImpl.OBSLIST$0); } } - + + /** + * Replaces the entire collection of obstetrical history items with a new array. + * + *

    This method performs a complete replacement of all existing obstetrical history items + * with the provided array. All previously stored items are removed, and the new items from + * the provided array are added in their place. This is useful for bulk updates or when + * reconstructing the obstetrical history from external data sources.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @param obsListArray ObstetricalHistoryItemList[] the new array of obstetrical history items + * to replace the current collection; may be an empty array to clear all items + */ public void setObsListArray(final ObstetricalHistoryItemList[] obsListArray) { synchronized (this.monitor()) { this.check_orphaned(); this.arraySetterHelper((XmlObject[])obsListArray, ObstetricalHistoryImpl.OBSLIST$0); } } - + + /** + * Replaces a specific obstetrical history item at the given zero-based index position. + * + *

    This method updates an existing obstetrical history item at the specified index with + * new data. The index must correspond to an existing item in the collection. This operation + * preserves the ordering of all other items in the collection.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @param i int the zero-based index of the item to replace + * @param obsList ObstetricalHistoryItemList the new obstetrical history item data to set at the specified position + * @throws IndexOutOfBoundsException if the index is negative or greater than or equal to + * the number of items in the collection + */ public void setObsListArray(final int i, final ObstetricalHistoryItemList obsList) { synchronized (this.monitor()) { this.check_orphaned(); @@ -66,7 +164,23 @@ public void setObsListArray(final int i, final ObstetricalHistoryItemList obsLis target.set((XmlObject)obsList); } } - + + /** + * Inserts a new obstetrical history item at the specified zero-based index position. + * + *

    This method creates and inserts a new, empty {@link ObstetricalHistoryItemList} at the + * specified index position. All existing items at or after this index are shifted to the right + * (their indices are incremented by one). The newly created item is returned for immediate + * population with obstetrical data.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @param i int the zero-based index position where the new item should be inserted; + * must be between 0 and {@code sizeOfObsListArray()} (inclusive) + * @return ObstetricalHistoryItemList the newly created and inserted obstetrical history item, + * ready to be populated with data + * @throws IndexOutOfBoundsException if the index is negative or greater than the current size + */ public ObstetricalHistoryItemList insertNewObsList(final int i) { synchronized (this.monitor()) { this.check_orphaned(); @@ -75,7 +189,20 @@ public ObstetricalHistoryItemList insertNewObsList(final int i) { return target; } } - + + /** + * Appends a new obstetrical history item to the end of the collection. + * + *

    This method creates and adds a new, empty {@link ObstetricalHistoryItemList} to the end + * of the current collection of obstetrical history items. The newly created item is returned + * for immediate population with obstetrical data. This is the preferred method for adding new + * obstetrical history entries in chronological or sequential order.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @return ObstetricalHistoryItemList the newly created obstetrical history item added to the + * end of the collection, ready to be populated with data + */ public ObstetricalHistoryItemList addNewObsList() { synchronized (this.monitor()) { this.check_orphaned(); @@ -84,7 +211,24 @@ public ObstetricalHistoryItemList addNewObsList() { return target; } } - + + /** + * Removes an obstetrical history item at the specified zero-based index position. + * + *

    This method deletes the obstetrical history item at the given index from the collection. + * All items after the removed item are shifted to the left (their indices are decremented by one). + * The size of the collection is reduced by one after this operation.

    + * + *

    Clinical Note: Removal of obstetrical history data should be performed + * with caution as this information is medically significant for patient care and may be required + * for audit trail purposes.

    + * + *

    Thread Safety: This method is thread-safe through internal synchronization.

    + * + * @param i int the zero-based index of the obstetrical history item to remove + * @throws IndexOutOfBoundsException if the index is negative or greater than or equal to + * the number of items in the collection + */ public void removeObsList(final int i) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryItemListImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryItemListImpl.java index b6a5fe0ed24..1b3447a5bb8 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryItemListImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/ObstetricalHistoryItemListImpl.java @@ -12,6 +12,34 @@ import ca.openosp.openo.ar2005.ObstetricalHistoryItemList; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the ObstetricalHistoryItemList interface for managing obstetrical history data + * in British Columbia Antenatal Record (BCAR) forms. + * + *

    This class provides XMLBeans-based persistence for individual obstetrical history items, which + * track details of previous pregnancies and deliveries. This information is critical for prenatal + * care assessment and risk stratification in maternal healthcare.

    + * + *

    The implementation manages the following obstetrical data elements:

    + *
      + *
    • Year of delivery
    • + *
    • Sex of infant (Male/Female)
    • + *
    • Gestational age at delivery (in weeks)
    • + *
    • Birth weight of infant
    • + *
    • Length of labour (in hours)
    • + *
    • Place of birth (hospital, home, etc.)
    • + *
    • Type of delivery (vaginal, cesarean, assisted, etc.)
    • + *
    • Clinical comments and notes
    • + *
    + * + *

    This class is part of the AR2005 (Antenatal Record 2005) XML schema implementation used in + * British Columbia for standardized maternal health record keeping. All data access is thread-safe + * through synchronized access to the underlying XMLBeans store.

    + * + * @see ca.openosp.openo.ar2005.ObstetricalHistoryItemList + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-24 + */ public class ObstetricalHistoryItemListImpl extends XmlComplexContentImpl implements ObstetricalHistoryItemList { private static final long serialVersionUID = 1L; @@ -23,11 +51,27 @@ public class ObstetricalHistoryItemListImpl extends XmlComplexContentImpl implem private static final QName PLACEOFBIRTH$10; private static final QName TYPEOFDELIVERY$12; private static final QName COMMENTS$14; - + + /** + * Constructs a new ObstetricalHistoryItemListImpl instance with the specified schema type. + * + *

    This constructor initializes the XMLBeans object structure for storing obstetrical + * history data according to the AR2005 schema definition.

    + * + * @param sType SchemaType the XMLBeans schema type definition for this object + */ public ObstetricalHistoryItemListImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the year of delivery for this obstetrical history item. + * + *

    Returns the calendar year when the delivery occurred, which is used to track + * the temporal sequence of previous pregnancies in the patient's obstetrical history.

    + * + * @return int the year of delivery, or 0 if not set + */ public int getYear() { synchronized (this.monitor()) { this.check_orphaned(); @@ -39,7 +83,15 @@ public int getYear() { return target.getIntValue(); } } - + + /** + * Retrieves the year of delivery as an XMLBeans XmlInt object. + * + *

    This method provides access to the underlying XMLBeans representation of the year value, + * allowing for XML schema validation and manipulation.

    + * + * @return XmlInt the XMLBeans representation of the year, or null if not set + */ public XmlInt xgetYear() { synchronized (this.monitor()) { this.check_orphaned(); @@ -48,7 +100,15 @@ public XmlInt xgetYear() { return target; } } - + + /** + * Sets the year of delivery for this obstetrical history item. + * + *

    Stores the calendar year when the delivery occurred. This value is used to maintain + * chronological ordering of the patient's pregnancy history.

    + * + * @param year int the year of delivery to set + */ public void setYear(final int year) { synchronized (this.monitor()) { this.check_orphaned(); @@ -60,7 +120,15 @@ public void setYear(final int year) { target.setIntValue(year); } } - + + /** + * Sets the year of delivery using an XMLBeans XmlInt object. + * + *

    This method accepts an XMLBeans XmlInt object, allowing for XML schema-compliant + * setting of the year value with validation.

    + * + * @param year XmlInt the XMLBeans representation of the year to set + */ public void xsetYear(final XmlInt year) { synchronized (this.monitor()) { this.check_orphaned(); @@ -72,7 +140,15 @@ public void xsetYear(final XmlInt year) { target.set((XmlObject)year); } } - + + /** + * Retrieves the sex of the infant from this obstetrical history item. + * + *

    Returns the biological sex of the infant at birth as recorded in the obstetrical history. + * This information is used for comprehensive pregnancy outcome tracking.

    + * + * @return Sex.Enum the sex of the infant (Male/Female), or null if not set + */ public Sex.Enum getSex() { synchronized (this.monitor()) { this.check_orphaned(); @@ -84,7 +160,15 @@ public Sex.Enum getSex() { return (Sex.Enum)target.getEnumValue(); } } - + + /** + * Retrieves the sex of the infant as an XMLBeans Sex object. + * + *

    This method provides access to the underlying XMLBeans representation of the sex value, + * allowing for XML schema validation and manipulation.

    + * + * @return Sex the XMLBeans representation of the infant's sex, or null if not set + */ public Sex xgetSex() { synchronized (this.monitor()) { this.check_orphaned(); @@ -93,7 +177,15 @@ public Sex xgetSex() { return target; } } - + + /** + * Sets the sex of the infant for this obstetrical history item. + * + *

    Records the biological sex of the infant at birth. This data is part of the comprehensive + * pregnancy outcome information tracked in the obstetrical history.

    + * + * @param sex Sex.Enum the sex of the infant to set (Male/Female) + */ public void setSex(final Sex.Enum sex) { synchronized (this.monitor()) { this.check_orphaned(); @@ -105,7 +197,15 @@ public void setSex(final Sex.Enum sex) { target.setEnumValue((StringEnumAbstractBase)sex); } } - + + /** + * Sets the sex of the infant using an XMLBeans Sex object. + * + *

    This method accepts an XMLBeans Sex object, allowing for XML schema-compliant + * setting of the sex value with validation.

    + * + * @param sex Sex the XMLBeans representation of the infant's sex to set + */ public void xsetSex(final Sex sex) { synchronized (this.monitor()) { this.check_orphaned(); @@ -117,7 +217,16 @@ public void xsetSex(final Sex sex) { target.set((XmlObject)sex); } } - + + /** + * Retrieves the gestational age at delivery for this obstetrical history item. + * + *

    Returns the gestational age (in weeks) at the time of delivery. This is a critical + * parameter for assessing pregnancy outcomes and identifying preterm or post-term deliveries + * in the patient's obstetrical history.

    + * + * @return int the gestational age in weeks, or 0 if not set + */ public int getGestAge() { synchronized (this.monitor()) { this.check_orphaned(); @@ -129,7 +238,15 @@ public int getGestAge() { return target.getIntValue(); } } - + + /** + * Retrieves the gestational age at delivery as an XMLBeans XmlInt object. + * + *

    This method provides access to the underlying XMLBeans representation of the gestational + * age value, allowing for XML schema validation and manipulation.

    + * + * @return XmlInt the XMLBeans representation of the gestational age, or null if not set + */ public XmlInt xgetGestAge() { synchronized (this.monitor()) { this.check_orphaned(); @@ -138,7 +255,15 @@ public XmlInt xgetGestAge() { return target; } } - + + /** + * Sets the gestational age at delivery for this obstetrical history item. + * + *

    Records the gestational age (in weeks) at the time of delivery. This value is essential + * for tracking pregnancy outcomes and identifying patterns of preterm or post-term deliveries.

    + * + * @param gestAge int the gestational age in weeks to set + */ public void setGestAge(final int gestAge) { synchronized (this.monitor()) { this.check_orphaned(); @@ -150,7 +275,15 @@ public void setGestAge(final int gestAge) { target.setIntValue(gestAge); } } - + + /** + * Sets the gestational age at delivery using an XMLBeans XmlInt object. + * + *

    This method accepts an XMLBeans XmlInt object, allowing for XML schema-compliant + * setting of the gestational age value with validation.

    + * + * @param gestAge XmlInt the XMLBeans representation of the gestational age to set + */ public void xsetGestAge(final XmlInt gestAge) { synchronized (this.monitor()) { this.check_orphaned(); @@ -162,7 +295,17 @@ public void xsetGestAge(final XmlInt gestAge) { target.set((XmlObject)gestAge); } } - + + /** + * Retrieves the birth weight of the infant from this obstetrical history item. + * + *

    Returns the birth weight of the infant, typically recorded in grams or pounds/ounces. + * Birth weight is a key indicator of fetal growth and development, and is used to assess + * neonatal health outcomes and identify low birth weight or macrosomia patterns in the + * patient's obstetrical history.

    + * + * @return String the birth weight of the infant, or null if not set + */ public String getBirthWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -174,7 +317,15 @@ public String getBirthWeight() { return target.getStringValue(); } } - + + /** + * Retrieves the birth weight of the infant as an XMLBeans XmlString object. + * + *

    This method provides access to the underlying XMLBeans representation of the birth weight + * value, allowing for XML schema validation and manipulation.

    + * + * @return XmlString the XMLBeans representation of the birth weight, or null if not set + */ public XmlString xgetBirthWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -183,7 +334,16 @@ public XmlString xgetBirthWeight() { return target; } } - + + /** + * Sets the birth weight of the infant for this obstetrical history item. + * + *

    Records the birth weight of the infant. This value is critical for tracking fetal growth + * patterns and identifying risk factors such as low birth weight or macrosomia in previous + * pregnancies.

    + * + * @param birthWeight String the birth weight of the infant to set + */ public void setBirthWeight(final String birthWeight) { synchronized (this.monitor()) { this.check_orphaned(); @@ -195,7 +355,15 @@ public void setBirthWeight(final String birthWeight) { target.setStringValue(birthWeight); } } - + + /** + * Sets the birth weight of the infant using an XMLBeans XmlString object. + * + *

    This method accepts an XMLBeans XmlString object, allowing for XML schema-compliant + * setting of the birth weight value with validation.

    + * + * @param birthWeight XmlString the XMLBeans representation of the birth weight to set + */ public void xsetBirthWeight(final XmlString birthWeight) { synchronized (this.monitor()) { this.check_orphaned(); @@ -207,7 +375,16 @@ public void xsetBirthWeight(final XmlString birthWeight) { target.set((XmlObject)birthWeight); } } - + + /** + * Retrieves the length of labour for this obstetrical history item. + * + *

    Returns the duration of labour (in hours) for this delivery. Length of labour is an + * important clinical parameter for assessing delivery patterns and identifying potential + * risk factors such as prolonged labour in the patient's obstetrical history.

    + * + * @return float the length of labour in hours, or 0.0f if not set + */ public float getLengthOfLabour() { synchronized (this.monitor()) { this.check_orphaned(); @@ -219,7 +396,15 @@ public float getLengthOfLabour() { return target.getFloatValue(); } } - + + /** + * Retrieves the length of labour as an XMLBeans XmlFloat object. + * + *

    This method provides access to the underlying XMLBeans representation of the length of + * labour value, allowing for XML schema validation and manipulation.

    + * + * @return XmlFloat the XMLBeans representation of the length of labour, or null if not set + */ public XmlFloat xgetLengthOfLabour() { synchronized (this.monitor()) { this.check_orphaned(); @@ -228,7 +413,15 @@ public XmlFloat xgetLengthOfLabour() { return target; } } - + + /** + * Checks if the length of labour value is explicitly set to nil. + * + *

    This method determines whether the length of labour has been explicitly marked as nil + * in the XML structure, which is different from simply not being set.

    + * + * @return boolean true if the length of labour is explicitly nil, false otherwise + */ public boolean isNilLengthOfLabour() { synchronized (this.monitor()) { this.check_orphaned(); @@ -237,7 +430,16 @@ public boolean isNilLengthOfLabour() { return target != null && target.isNil(); } } - + + /** + * Sets the length of labour for this obstetrical history item. + * + *

    Records the duration of labour (in hours) for this delivery. This information is used + * to track labour patterns and identify potential complications such as prolonged or + * precipitous labour in previous pregnancies.

    + * + * @param lengthOfLabour float the length of labour in hours to set + */ public void setLengthOfLabour(final float lengthOfLabour) { synchronized (this.monitor()) { this.check_orphaned(); @@ -249,7 +451,15 @@ public void setLengthOfLabour(final float lengthOfLabour) { target.setFloatValue(lengthOfLabour); } } - + + /** + * Sets the length of labour using an XMLBeans XmlFloat object. + * + *

    This method accepts an XMLBeans XmlFloat object, allowing for XML schema-compliant + * setting of the length of labour value with validation.

    + * + * @param lengthOfLabour XmlFloat the XMLBeans representation of the length of labour to set + */ public void xsetLengthOfLabour(final XmlFloat lengthOfLabour) { synchronized (this.monitor()) { this.check_orphaned(); @@ -261,7 +471,13 @@ public void xsetLengthOfLabour(final XmlFloat lengthOfLabour) { target.set((XmlObject)lengthOfLabour); } } - + + /** + * Explicitly sets the length of labour value to nil. + * + *

    This method marks the length of labour as explicitly nil in the XML structure, + * indicating that the value is intentionally absent rather than simply not set.

    + */ public void setNilLengthOfLabour() { synchronized (this.monitor()) { this.check_orphaned(); @@ -273,7 +489,16 @@ public void setNilLengthOfLabour() { target.setNil(); } } - + + /** + * Retrieves the place of birth for this obstetrical history item. + * + *

    Returns the location where the delivery occurred (e.g., hospital, home birth center). + * Place of birth is tracked to assess delivery setting patterns and potential risk factors + * associated with different birth locations in the patient's obstetrical history.

    + * + * @return String the place of birth, or null if not set + */ public String getPlaceOfBirth() { synchronized (this.monitor()) { this.check_orphaned(); @@ -285,7 +510,15 @@ public String getPlaceOfBirth() { return target.getStringValue(); } } - + + /** + * Retrieves the place of birth as an XMLBeans XmlString object. + * + *

    This method provides access to the underlying XMLBeans representation of the place of + * birth value, allowing for XML schema validation and manipulation.

    + * + * @return XmlString the XMLBeans representation of the place of birth, or null if not set + */ public XmlString xgetPlaceOfBirth() { synchronized (this.monitor()) { this.check_orphaned(); @@ -294,7 +527,15 @@ public XmlString xgetPlaceOfBirth() { return target; } } - + + /** + * Sets the place of birth for this obstetrical history item. + * + *

    Records the location where the delivery occurred. This information is used to track + * delivery setting preferences and assess outcomes associated with different birth locations.

    + * + * @param placeOfBirth String the place of birth to set + */ public void setPlaceOfBirth(final String placeOfBirth) { synchronized (this.monitor()) { this.check_orphaned(); @@ -306,7 +547,15 @@ public void setPlaceOfBirth(final String placeOfBirth) { target.setStringValue(placeOfBirth); } } - + + /** + * Sets the place of birth using an XMLBeans XmlString object. + * + *

    This method accepts an XMLBeans XmlString object, allowing for XML schema-compliant + * setting of the place of birth value with validation.

    + * + * @param placeOfBirth XmlString the XMLBeans representation of the place of birth to set + */ public void xsetPlaceOfBirth(final XmlString placeOfBirth) { synchronized (this.monitor()) { this.check_orphaned(); @@ -318,7 +567,16 @@ public void xsetPlaceOfBirth(final XmlString placeOfBirth) { target.set((XmlObject)placeOfBirth); } } - + + /** + * Retrieves the type of delivery for this obstetrical history item. + * + *

    Returns the delivery method used (e.g., vaginal delivery, cesarean section, assisted + * delivery with forceps or vacuum). Type of delivery is a critical parameter for assessing + * delivery patterns and identifying risk factors for future pregnancies.

    + * + * @return TypeOfDelivery.Enum the type of delivery, or null if not set + */ public TypeOfDelivery.Enum getTypeOfDelivery() { synchronized (this.monitor()) { this.check_orphaned(); @@ -330,7 +588,15 @@ public TypeOfDelivery.Enum getTypeOfDelivery() { return (TypeOfDelivery.Enum)target.getEnumValue(); } } - + + /** + * Retrieves the type of delivery as an XMLBeans TypeOfDelivery object. + * + *

    This method provides access to the underlying XMLBeans representation of the type of + * delivery value, allowing for XML schema validation and manipulation.

    + * + * @return TypeOfDelivery the XMLBeans representation of the type of delivery, or null if not set + */ public TypeOfDelivery xgetTypeOfDelivery() { synchronized (this.monitor()) { this.check_orphaned(); @@ -339,7 +605,15 @@ public TypeOfDelivery xgetTypeOfDelivery() { return target; } } - + + /** + * Sets the type of delivery for this obstetrical history item. + * + *

    Records the delivery method used for this birth. This information is essential for + * tracking delivery patterns and assessing risk factors for current and future pregnancies.

    + * + * @param typeOfDelivery TypeOfDelivery.Enum the type of delivery to set + */ public void setTypeOfDelivery(final TypeOfDelivery.Enum typeOfDelivery) { synchronized (this.monitor()) { this.check_orphaned(); @@ -351,7 +625,15 @@ public void setTypeOfDelivery(final TypeOfDelivery.Enum typeOfDelivery) { target.setEnumValue((StringEnumAbstractBase)typeOfDelivery); } } - + + /** + * Sets the type of delivery using an XMLBeans TypeOfDelivery object. + * + *

    This method accepts an XMLBeans TypeOfDelivery object, allowing for XML schema-compliant + * setting of the type of delivery value with validation.

    + * + * @param typeOfDelivery TypeOfDelivery the XMLBeans representation of the type of delivery to set + */ public void xsetTypeOfDelivery(final TypeOfDelivery typeOfDelivery) { synchronized (this.monitor()) { this.check_orphaned(); @@ -363,7 +645,16 @@ public void xsetTypeOfDelivery(final TypeOfDelivery typeOfDelivery) { target.set((XmlObject)typeOfDelivery); } } - + + /** + * Retrieves the clinical comments for this obstetrical history item. + * + *

    Returns any additional clinical notes, observations, or complications associated with + * this delivery. Comments provide important contextual information that may not be captured + * in structured data fields and can highlight significant events or outcomes.

    + * + * @return String the clinical comments, or null if not set + */ public String getComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -375,7 +666,15 @@ public String getComments() { return target.getStringValue(); } } - + + /** + * Retrieves the clinical comments as an XMLBeans XmlString object. + * + *

    This method provides access to the underlying XMLBeans representation of the comments + * value, allowing for XML schema validation and manipulation.

    + * + * @return XmlString the XMLBeans representation of the comments, or null if not set + */ public XmlString xgetComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -384,7 +683,15 @@ public XmlString xgetComments() { return target; } } - + + /** + * Sets the clinical comments for this obstetrical history item. + * + *

    Records additional clinical notes, observations, or complications associated with this + * delivery. This field captures important contextual information and significant clinical events.

    + * + * @param comments String the clinical comments to set + */ public void setComments(final String comments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -396,7 +703,15 @@ public void setComments(final String comments) { target.setStringValue(comments); } } - + + /** + * Sets the clinical comments using an XMLBeans XmlString object. + * + *

    This method accepts an XMLBeans XmlString object, allowing for XML schema-compliant + * setting of the comments value with validation.

    + * + * @param comments XmlString the XMLBeans representation of the comments to set + */ public void xsetComments(final XmlString comments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -419,28 +734,70 @@ public void xsetComments(final XmlString comments) { TYPEOFDELIVERY$12 = new QName("http://www.oscarmcmaster.org/AR2005", "typeOfDelivery"); COMMENTS$14 = new QName("http://www.oscarmcmaster.org/AR2005", "comments"); } - + + /** + * Implementation of the Sex enumeration for obstetrical history items. + * + *

    This inner class provides XMLBeans-based persistence for the sex enumeration, + * which represents the biological sex of the infant (Male/Female) in the obstetrical + * history record.

    + * + * @see ca.openosp.openo.ar2005.ObstetricalHistoryItemList.Sex + * @since 2026-01-24 + */ public static class SexImpl extends JavaStringEnumerationHolderEx implements Sex { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new SexImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + */ public SexImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new SexImpl instance with the specified schema type and validation flag. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + * @param b boolean flag for XMLBeans internal validation control + */ protected SexImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Implementation of the TypeOfDelivery enumeration for obstetrical history items. + * + *

    This inner class provides XMLBeans-based persistence for the type of delivery enumeration, + * which represents the delivery method (e.g., vaginal, cesarean, assisted delivery) in the + * obstetrical history record.

    + * + * @see ca.openosp.openo.ar2005.ObstetricalHistoryItemList.TypeOfDelivery + * @since 2026-01-24 + */ public static class TypeOfDeliveryImpl extends JavaStringEnumerationHolderEx implements TypeOfDelivery { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new TypeOfDeliveryImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + */ public TypeOfDeliveryImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new TypeOfDeliveryImpl instance with the specified schema type and validation flag. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + * @param b boolean flag for XMLBeans internal validation control + */ protected TypeOfDeliveryImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PartnerInformationImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PartnerInformationImpl.java index 6285264e0a0..fc9f4fcd5f9 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PartnerInformationImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PartnerInformationImpl.java @@ -11,6 +11,22 @@ import ca.openosp.openo.ar2005.PartnerInformation; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XMLBeans implementation for AR2005 (British Columbia Antenatal Record 2005) partner information. + * + * This class provides thread-safe XML data binding for partner demographic information + * collected as part of the BC Antenatal Record form. It stores essential partner details + * including name, occupation, education level, and age using XMLBeans store-based + * element management with synchronized access for thread safety. + * + * The implementation follows the XMLBeans pattern where each field is accessed through + * the underlying XML store with proper locking to ensure thread-safe operations in + * concurrent healthcare data processing environments. + * + * @see ca.openosp.openo.ar2005.PartnerInformation + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-24 + */ public class PartnerInformationImpl extends XmlComplexContentImpl implements PartnerInformation { private static final long serialVersionUID = 1L; @@ -19,11 +35,28 @@ public class PartnerInformationImpl extends XmlComplexContentImpl implements Par private static final QName OCCUPATION$4; private static final QName EDUCATIONLEVEL$6; private static final QName AGE$8; - + + /** + * Constructs a new PartnerInformationImpl instance with the specified schema type. + * + * This constructor initializes the XMLBeans complex content implementation with + * the provided schema type, setting up the underlying XML store for partner + * information data management. + * + * @param sType SchemaType the XMLBeans schema type definition for this element + */ public PartnerInformationImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the partner's last name. + * + * Retrieves the last name value from the XML store in a thread-safe manner + * using synchronized access to the underlying XMLBeans store. + * + * @return String the partner's last name, or null if not set + */ public String getLastName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -35,7 +68,16 @@ public String getLastName() { return target.getStringValue(); } } - + + /** + * Gets the partner's last name as an XmlString object. + * + * Provides low-level access to the XMLBeans XmlString representation of the + * last name field. This method is typically used for advanced XML manipulation + * or when the XmlString metadata is needed. + * + * @return XmlString the XMLBeans representation of the last name, or null if not set + */ public XmlString xgetLastName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -44,7 +86,15 @@ public XmlString xgetLastName() { return target; } } - + + /** + * Sets the partner's last name. + * + * Updates the last name value in the XML store in a thread-safe manner. + * Creates the element if it doesn't exist in the store. + * + * @param lastName String the partner's last name to set + */ public void setLastName(final String lastName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -56,7 +106,15 @@ public void setLastName(final String lastName) { target.setStringValue(lastName); } } - + + /** + * Sets the partner's last name using an XmlString object. + * + * Provides low-level XML manipulation by setting the last name field using + * an XmlString object. This method is typically used for advanced XML operations. + * + * @param lastName XmlString the XMLBeans representation of the last name to set + */ public void xsetLastName(final XmlString lastName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -68,7 +126,15 @@ public void xsetLastName(final XmlString lastName) { target.set((XmlObject)lastName); } } - + + /** + * Gets the partner's first name. + * + * Retrieves the first name value from the XML store in a thread-safe manner + * using synchronized access to the underlying XMLBeans store. + * + * @return String the partner's first name, or null if not set + */ public String getFirstName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -80,7 +146,16 @@ public String getFirstName() { return target.getStringValue(); } } - + + /** + * Gets the partner's first name as an XmlString object. + * + * Provides low-level access to the XMLBeans XmlString representation of the + * first name field. This method is typically used for advanced XML manipulation + * or when the XmlString metadata is needed. + * + * @return XmlString the XMLBeans representation of the first name, or null if not set + */ public XmlString xgetFirstName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -89,7 +164,15 @@ public XmlString xgetFirstName() { return target; } } - + + /** + * Sets the partner's first name. + * + * Updates the first name value in the XML store in a thread-safe manner. + * Creates the element if it doesn't exist in the store. + * + * @param firstName String the partner's first name to set + */ public void setFirstName(final String firstName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -101,7 +184,15 @@ public void setFirstName(final String firstName) { target.setStringValue(firstName); } } - + + /** + * Sets the partner's first name using an XmlString object. + * + * Provides low-level XML manipulation by setting the first name field using + * an XmlString object. This method is typically used for advanced XML operations. + * + * @param firstName XmlString the XMLBeans representation of the first name to set + */ public void xsetFirstName(final XmlString firstName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -113,7 +204,16 @@ public void xsetFirstName(final XmlString firstName) { target.set((XmlObject)firstName); } } - + + /** + * Gets the partner's occupation. + * + * Retrieves the occupation object from the XML store, which contains both + * a predefined occupation value and an optional free-text "other" field + * for occupations not in the standard list. + * + * @return Occupation the partner's occupation information, or null if not set + */ public Occupation getOccupation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -125,7 +225,15 @@ public Occupation getOccupation() { return target; } } - + + /** + * Sets the partner's occupation. + * + * Updates the occupation object in the XML store in a thread-safe manner. + * Creates the element if it doesn't exist in the store. + * + * @param occupation Occupation the partner's occupation information to set + */ public void setOccupation(final Occupation occupation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -137,7 +245,15 @@ public void setOccupation(final Occupation occupation) { target.set((XmlObject)occupation); } } - + + /** + * Adds a new occupation element to the XML store. + * + * Creates and returns a new Occupation object in the XML store, allowing + * for initialization of occupation data through the returned object. + * + * @return Occupation the newly created occupation element + */ public Occupation addNewOccupation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -146,7 +262,15 @@ public Occupation addNewOccupation() { return target; } } - + + /** + * Gets the partner's education level as an enumeration. + * + * Retrieves the education level value from the XML store as a type-safe + * enumeration representing the partner's highest level of education completed. + * + * @return EducationLevel.Enum the partner's education level, or null if not set + */ public EducationLevel.Enum getEducationLevel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -158,7 +282,16 @@ public EducationLevel.Enum getEducationLevel() { return (EducationLevel.Enum)target.getEnumValue(); } } - + + /** + * Gets the partner's education level as an EducationLevel object. + * + * Provides low-level access to the XMLBeans EducationLevel representation. + * This method is typically used for advanced XML manipulation or when the + * EducationLevel metadata is needed. + * + * @return EducationLevel the XMLBeans representation of the education level, or null if not set + */ public EducationLevel xgetEducationLevel() { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +300,15 @@ public EducationLevel xgetEducationLevel() { return target; } } - + + /** + * Sets the partner's education level using an enumeration. + * + * Updates the education level value in the XML store in a thread-safe manner. + * Creates the element if it doesn't exist in the store. + * + * @param educationLevel EducationLevel.Enum the partner's education level to set + */ public void setEducationLevel(final EducationLevel.Enum educationLevel) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +320,15 @@ public void setEducationLevel(final EducationLevel.Enum educationLevel) { target.setEnumValue((StringEnumAbstractBase)educationLevel); } } - + + /** + * Sets the partner's education level using an EducationLevel object. + * + * Provides low-level XML manipulation by setting the education level field using + * an EducationLevel object. This method is typically used for advanced XML operations. + * + * @param educationLevel EducationLevel the XMLBeans representation of the education level to set + */ public void xsetEducationLevel(final EducationLevel educationLevel) { synchronized (this.monitor()) { this.check_orphaned(); @@ -191,7 +340,15 @@ public void xsetEducationLevel(final EducationLevel educationLevel) { target.set((XmlObject)educationLevel); } } - + + /** + * Gets the partner's age. + * + * Retrieves the age value from the XML store in a thread-safe manner + * using synchronized access to the underlying XMLBeans store. + * + * @return int the partner's age in years, or 0 if not set + */ public int getAge() { synchronized (this.monitor()) { this.check_orphaned(); @@ -203,7 +360,16 @@ public int getAge() { return target.getIntValue(); } } - + + /** + * Gets the partner's age as an Age object. + * + * Provides low-level access to the XMLBeans Age representation. + * This method is typically used for advanced XML manipulation or when the + * Age metadata is needed. + * + * @return Age the XMLBeans representation of the age, or null if not set + */ public Age xgetAge() { synchronized (this.monitor()) { this.check_orphaned(); @@ -212,7 +378,15 @@ public Age xgetAge() { return target; } } - + + /** + * Sets the partner's age. + * + * Updates the age value in the XML store in a thread-safe manner. + * Creates the element if it doesn't exist in the store. + * + * @param age int the partner's age in years to set + */ public void setAge(final int age) { synchronized (this.monitor()) { this.check_orphaned(); @@ -224,7 +398,15 @@ public void setAge(final int age) { target.setIntValue(age); } } - + + /** + * Sets the partner's age using an Age object. + * + * Provides low-level XML manipulation by setting the age field using + * an Age object. This method is typically used for advanced XML operations. + * + * @param age Age the XMLBeans representation of the age to set + */ public void xsetAge(final Age age) { synchronized (this.monitor()) { this.check_orphaned(); @@ -244,17 +426,40 @@ public void xsetAge(final Age age) { EDUCATIONLEVEL$6 = new QName("http://www.oscarmcmaster.org/AR2005", "educationLevel"); AGE$8 = new QName("http://www.oscarmcmaster.org/AR2005", "age"); } - + + /** + * XMLBeans implementation for partner occupation information. + * + * This inner class provides XML data binding for occupation data, supporting + * both predefined occupation values from a controlled vocabulary and a free-text + * "other" field for occupations not in the standard list. Thread-safe access + * is ensured through synchronized monitor operations. + * + * @see ca.openosp.openo.ar2005.PartnerInformation.Occupation + * @since 2026-01-24 + */ public static class OccupationImpl extends XmlComplexContentImpl implements Occupation { private static final long serialVersionUID = 1L; private static final QName VALUE$0; private static final QName OTHER$2; - + + /** + * Constructs a new OccupationImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for this element + */ public OccupationImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the occupation value as an enumeration. + * + * Retrieves the predefined occupation value from the controlled vocabulary. + * + * @return Value.Enum the occupation value enumeration, or null if not set + */ public Value.Enum getValue() { synchronized (this.monitor()) { this.check_orphaned(); @@ -266,7 +471,14 @@ public Value.Enum getValue() { return (Value.Enum)target.getEnumValue(); } } - + + /** + * Gets the occupation value as a Value object. + * + * Provides low-level access to the XMLBeans Value representation. + * + * @return Value the XMLBeans representation of the occupation value, or null if not set + */ public Value xgetValue() { synchronized (this.monitor()) { this.check_orphaned(); @@ -275,7 +487,14 @@ public Value xgetValue() { return target; } } - + + /** + * Sets the occupation value using an enumeration. + * + * Updates the predefined occupation value from the controlled vocabulary. + * + * @param value Value.Enum the occupation value enumeration to set + */ public void setValue(final Value.Enum value) { synchronized (this.monitor()) { this.check_orphaned(); @@ -287,7 +506,14 @@ public void setValue(final Value.Enum value) { target.setEnumValue((StringEnumAbstractBase)value); } } - + + /** + * Sets the occupation value using a Value object. + * + * Provides low-level XML manipulation by setting the occupation value field. + * + * @param value Value the XMLBeans representation of the occupation value to set + */ public void xsetValue(final Value value) { synchronized (this.monitor()) { this.check_orphaned(); @@ -299,7 +525,16 @@ public void xsetValue(final Value value) { target.set((XmlObject)value); } } - + + /** + * Gets the free-text occupation description. + * + * Retrieves the "other" field which is used when the partner's occupation + * is not in the predefined list. This allows for capturing occupation + * information not covered by the standard controlled vocabulary. + * + * @return String the free-text occupation description, or null if not set + */ public String getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -311,7 +546,15 @@ public String getOther() { return target.getStringValue(); } } - + + /** + * Gets the free-text occupation description as an XmlString object. + * + * Provides low-level access to the XMLBeans XmlString representation of the + * "other" occupation field. + * + * @return XmlString the XMLBeans representation of the other occupation, or null if not set + */ public XmlString xgetOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -320,7 +563,15 @@ public XmlString xgetOther() { return target; } } - + + /** + * Sets the free-text occupation description. + * + * Updates the "other" field with a free-text occupation description for + * occupations not in the predefined list. + * + * @param other String the free-text occupation description to set + */ public void setOther(final String other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -332,7 +583,14 @@ public void setOther(final String other) { target.setStringValue(other); } } - + + /** + * Sets the free-text occupation description using an XmlString object. + * + * Provides low-level XML manipulation by setting the "other" occupation field. + * + * @param other XmlString the XMLBeans representation of the other occupation to set + */ public void xsetOther(final XmlString other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -349,42 +607,110 @@ public void xsetOther(final XmlString other) { VALUE$0 = new QName("http://www.oscarmcmaster.org/AR2005", "value"); OTHER$2 = new QName("http://www.oscarmcmaster.org/AR2005", "other"); } - + + /** + * XMLBeans implementation for occupation value enumeration. + * + * This inner class provides XML data binding for the predefined occupation + * value enumeration. It extends JavaStringEnumerationHolderEx to support + * type-safe enumeration values for occupation types. + * + * @see ca.openosp.openo.ar2005.PartnerInformation.Occupation.Value + * @since 2026-01-24 + */ public static class ValueImpl extends JavaStringEnumerationHolderEx implements Value { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new ValueImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + */ public ValueImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for ValueImpl with schema type and initialization flag. + * + * This constructor is used internally by XMLBeans for advanced initialization scenarios. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + * @param b boolean initialization flag for XMLBeans internal use + */ protected ValueImpl(final SchemaType sType, final boolean b) { super(sType, b); } } } - + + /** + * XMLBeans implementation for education level enumeration. + * + * This inner class provides XML data binding for the partner's education level + * enumeration. It extends JavaStringEnumerationHolderEx to support type-safe + * enumeration values for educational attainment levels. + * + * @see ca.openosp.openo.ar2005.PartnerInformation.EducationLevel + * @since 2026-01-24 + */ public static class EducationLevelImpl extends JavaStringEnumerationHolderEx implements EducationLevel { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new EducationLevelImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + */ public EducationLevelImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for EducationLevelImpl with schema type and initialization flag. + * + * This constructor is used internally by XMLBeans for advanced initialization scenarios. + * + * @param sType SchemaType the XMLBeans schema type definition for this enumeration + * @param b boolean initialization flag for XMLBeans internal use + */ protected EducationLevelImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for partner age. + * + * This inner class provides XML data binding for the partner's age value. + * It extends JavaIntHolderEx to provide type-safe integer handling for age data. + * + * @see ca.openosp.openo.ar2005.PartnerInformation.Age + * @since 2026-01-24 + */ public static class AgeImpl extends JavaIntHolderEx implements Age { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new AgeImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for this element + */ public AgeImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for AgeImpl with schema type and initialization flag. + * + * This constructor is used internally by XMLBeans for advanced initialization scenarios. + * + * @param sType SchemaType the XMLBeans schema type definition for this element + * @param b boolean initialization flag for XMLBeans internal use + */ protected AgeImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PatientInformationImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PatientInformationImpl.java index 012e0d687f1..9b061a74fd7 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PatientInformationImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PatientInformationImpl.java @@ -17,6 +17,33 @@ import ca.openosp.openo.ar2005.PatientInformation; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of PatientInformation interface for AR2005 (Antenatal Record 2005) form schema. + * + *

    This class is automatically generated by Apache XMLBeans from the AR2005 XML Schema Definition (XSD). + * It provides XML binding functionality for patient demographic and medical information used in antenatal + * care records within the OpenO EMR system.

    + * + *

    The implementation manages comprehensive patient data including:

    + *
      + *
    • Demographics: name, address, contact information
    • + *
    • Personal details: date of birth, age, language, occupation, education level
    • + *
    • Healthcare identifiers: Health Insurance Number (HIN), file number
    • + *
    • Social determinants: marital status, ethnic background
    • + *
    • Clinical information: allergies, medications
    • + *
    + * + *

    This class uses XMLBeans' internal store mechanism for thread-safe XML element access and manipulation. + * All getter and setter methods are synchronized using the monitor pattern to ensure thread safety when + * accessing or modifying patient information.

    + * + *

    Healthcare Context: The AR2005 form is part of the British Columbia Antenatal Record + * (BCAR) system used for tracking prenatal care across multiple jurisdictions in Canada. Patient information + * captured through this implementation must comply with PIPEDA/HIPAA privacy regulations.

    + * + * @see ca.openosp.openo.ar2005.PatientInformation + * @since 2026-01-24 + */ public class PatientInformationImpl extends XmlComplexContentImpl implements PatientInformation { private static final long serialVersionUID = 1L; @@ -40,11 +67,29 @@ public class PatientInformationImpl extends XmlComplexContentImpl implements Pat private static final QName MARITALSTATUS$34; private static final QName ALLERGIES$36; private static final QName MEDICATIONS$38; - + + /** + * Constructs a new PatientInformationImpl instance with the specified schema type. + * + *

    This constructor is called by the XMLBeans framework during XML deserialization + * or when creating new instances programmatically. It initializes the internal XML + * store with the AR2005 patient information schema structure.

    + * + * @param sType SchemaType the schema type definition for PatientInformation + */ public PatientInformationImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the patient's last name (surname/family name). + * + *

    This method retrieves the lastName element from the XML store in a thread-safe manner. + * The last name is a critical identifier for patient records and is used throughout the + * EMR system for patient identification and record linking.

    + * + * @return String the patient's last name, or null if not set + */ public String getLastName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -56,7 +101,16 @@ public String getLastName() { return target.getStringValue(); } } - + + /** + * Gets the patient's last name as an XmlString object. + * + *

    This method provides access to the raw XMLBeans XmlString representation, which includes + * both the string value and XML schema type information. Useful for advanced XML manipulation + * or when preserving XML-specific attributes.

    + * + * @return XmlString the patient's last name as an XmlString, or null if not set + */ public XmlString xgetLastName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -65,7 +119,19 @@ public XmlString xgetLastName() { return target; } } - + + /** + * Sets the patient's last name (surname/family name). + * + *

    Updates the lastName element in the XML store. If the element doesn't exist, + * it will be created. This operation is thread-safe and automatically handles + * XML serialization.

    + * + *

    Healthcare Note: Last name changes should be handled carefully + * and may require audit logging in production systems for patient identification continuity.

    + * + * @param lastName String the patient's last name to set + */ public void setLastName(final String lastName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -77,7 +143,16 @@ public void setLastName(final String lastName) { target.setStringValue(lastName); } } - + + /** + * Sets the patient's last name using an XmlString object. + * + *

    This method accepts an XmlString parameter, allowing setting of both the value + * and any associated XML schema attributes or metadata. Used primarily when working + * with XML documents directly or preserving XML-specific information.

    + * + * @param lastName XmlString the patient's last name as an XmlString object + */ public void xsetLastName(final XmlString lastName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -89,7 +164,15 @@ public void xsetLastName(final XmlString lastName) { target.set((XmlObject)lastName); } } - + + /** + * Gets the patient's first name (given name). + * + *

    Retrieves the firstName element from the XML store. The first name is used + * in conjunction with the last name for patient identification throughout the EMR system.

    + * + * @return String the patient's first name, or null if not set + */ public String getFirstName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -101,7 +184,12 @@ public String getFirstName() { return target.getStringValue(); } } - + + /** + * Gets the patient's first name as an XmlString object. + * + * @return XmlString the patient's first name as an XmlString, or null if not set + */ public XmlString xgetFirstName() { synchronized (this.monitor()) { this.check_orphaned(); @@ -110,7 +198,12 @@ public XmlString xgetFirstName() { return target; } } - + + /** + * Sets the patient's first name (given name). + * + * @param firstName String the patient's first name to set + */ public void setFirstName(final String firstName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -122,7 +215,12 @@ public void setFirstName(final String firstName) { target.setStringValue(firstName); } } - + + /** + * Sets the patient's first name using an XmlString object. + * + * @param firstName XmlString the patient's first name as an XmlString object + */ public void xsetFirstName(final XmlString firstName) { synchronized (this.monitor()) { this.check_orphaned(); @@ -134,7 +232,12 @@ public void xsetFirstName(final XmlString firstName) { target.set((XmlObject)firstName); } } - + + /** + * Gets the patient's street address. + * + * @return String the street address, or null if not set + */ public String getAddress() { synchronized (this.monitor()) { this.check_orphaned(); @@ -146,7 +249,12 @@ public String getAddress() { return target.getStringValue(); } } - + + /** + * Gets the patient's street address as an XmlString object. + * + * @return XmlString the street address as an XmlString, or null if not set + */ public XmlString xgetAddress() { synchronized (this.monitor()) { this.check_orphaned(); @@ -155,7 +263,12 @@ public XmlString xgetAddress() { return target; } } - + + /** + * Sets the patient's street address. + * + * @param address String the street address to set + */ public void setAddress(final String address) { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +280,12 @@ public void setAddress(final String address) { target.setStringValue(address); } } - + + /** + * Sets the patient's street address using an XmlString object. + * + * @param address XmlString the street address as an XmlString object + */ public void xsetAddress(final XmlString address) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +297,12 @@ public void xsetAddress(final XmlString address) { target.set((XmlObject)address); } } - + + /** + * Gets the patient's apartment/unit number. + * + * @return String the apartment/unit number, or null if not set + */ public String getApt() { synchronized (this.monitor()) { this.check_orphaned(); @@ -191,7 +314,12 @@ public String getApt() { return target.getStringValue(); } } - + + /** + * Gets the patient's apartment/unit number as an XmlString object. + * + * @return XmlString the apartment/unit number as an XmlString, or null if not set + */ public XmlString xgetApt() { synchronized (this.monitor()) { this.check_orphaned(); @@ -200,7 +328,12 @@ public XmlString xgetApt() { return target; } } - + + /** + * Sets the patient's apartment/unit number. + * + * @param apt String the apartment/unit number to set + */ public void setApt(final String apt) { synchronized (this.monitor()) { this.check_orphaned(); @@ -212,7 +345,12 @@ public void setApt(final String apt) { target.setStringValue(apt); } } - + + /** + * Sets the patient's apartment/unit number using an XmlString object. + * + * @param apt XmlString the apartment/unit number as an XmlString object + */ public void xsetApt(final XmlString apt) { synchronized (this.monitor()) { this.check_orphaned(); @@ -224,7 +362,12 @@ public void xsetApt(final XmlString apt) { target.set((XmlObject)apt); } } - + + /** + * Gets the patient's city of residence. + * + * @return String the city name, or null if not set + */ public String getCity() { synchronized (this.monitor()) { this.check_orphaned(); @@ -236,7 +379,12 @@ public String getCity() { return target.getStringValue(); } } - + + /** + * Gets the patient's city as an XmlString object. + * + * @return XmlString the city name as an XmlString, or null if not set + */ public XmlString xgetCity() { synchronized (this.monitor()) { this.check_orphaned(); @@ -245,7 +393,12 @@ public XmlString xgetCity() { return target; } } - + + /** + * Sets the patient's city of residence. + * + * @param city String the city name to set + */ public void setCity(final String city) { synchronized (this.monitor()) { this.check_orphaned(); @@ -257,7 +410,12 @@ public void setCity(final String city) { target.setStringValue(city); } } - + + /** + * Sets the patient's city using an XmlString object. + * + * @param city XmlString the city name as an XmlString object + */ public void xsetCity(final XmlString city) { synchronized (this.monitor()) { this.check_orphaned(); @@ -269,7 +427,15 @@ public void xsetCity(final XmlString city) { target.set((XmlObject)city); } } - + + /** + * Gets the patient's province/territory of residence. + * + *

    Province information is critical for healthcare billing and jurisdictional regulations + * in Canadian healthcare systems (e.g., BC, ON, AB).

    + * + * @return Province.Enum the province enumeration value, or null if not set + */ public Province.Enum getProvince() { synchronized (this.monitor()) { this.check_orphaned(); @@ -281,7 +447,12 @@ public Province.Enum getProvince() { return (Province.Enum)target.getEnumValue(); } } - + + /** + * Gets the patient's province as a Province XML type. + * + * @return Province the province as an XML type object, or null if not set + */ public Province xgetProvince() { synchronized (this.monitor()) { this.check_orphaned(); @@ -290,7 +461,12 @@ public Province xgetProvince() { return target; } } - + + /** + * Sets the patient's province/territory of residence. + * + * @param province Province.Enum the province enumeration value to set + */ public void setProvince(final Province.Enum province) { synchronized (this.monitor()) { this.check_orphaned(); @@ -302,7 +478,12 @@ public void setProvince(final Province.Enum province) { target.setEnumValue((StringEnumAbstractBase)province); } } - + + /** + * Sets the patient's province using a Province XML type. + * + * @param province Province the province as an XML type object + */ public void xsetProvince(final Province province) { synchronized (this.monitor()) { this.check_orphaned(); @@ -314,7 +495,12 @@ public void xsetProvince(final Province province) { target.set((XmlObject)province); } } - + + /** + * Gets the patient's postal code (Canadian format). + * + * @return String the postal code, or null if not set + */ public String getPostalCode() { synchronized (this.monitor()) { this.check_orphaned(); @@ -326,7 +512,12 @@ public String getPostalCode() { return target.getStringValue(); } } - + + /** + * Gets the patient's postal code as a PostalCode XML type. + * + * @return PostalCode the postal code as an XML type, or null if not set + */ public PostalCode xgetPostalCode() { synchronized (this.monitor()) { this.check_orphaned(); @@ -335,7 +526,12 @@ public PostalCode xgetPostalCode() { return target; } } - + + /** + * Sets the patient's postal code. + * + * @param postalCode String the postal code to set + */ public void setPostalCode(final String postalCode) { synchronized (this.monitor()) { this.check_orphaned(); @@ -347,7 +543,12 @@ public void setPostalCode(final String postalCode) { target.setStringValue(postalCode); } } - + + /** + * Sets the patient's postal code using a PostalCode XML type. + * + * @param postalCode PostalCode the postal code as an XML type object + */ public void xsetPostalCode(final PostalCode postalCode) { synchronized (this.monitor()) { this.check_orphaned(); @@ -359,7 +560,12 @@ public void xsetPostalCode(final PostalCode postalCode) { target.set((XmlObject)postalCode); } } - + + /** + * Gets the patient's home phone number. + * + * @return String the home phone number, or null if not set + */ public String getHomePhone() { synchronized (this.monitor()) { this.check_orphaned(); @@ -371,7 +577,12 @@ public String getHomePhone() { return target.getStringValue(); } } - + + /** + * Gets the patient's home phone number as a HomePhone XML type. + * + * @return HomePhone the home phone as an XML type, or null if not set + */ public HomePhone xgetHomePhone() { synchronized (this.monitor()) { this.check_orphaned(); @@ -380,7 +591,12 @@ public HomePhone xgetHomePhone() { return target; } } - + + /** + * Sets the patient's home phone number. + * + * @param homePhone String the home phone number to set + */ public void setHomePhone(final String homePhone) { synchronized (this.monitor()) { this.check_orphaned(); @@ -392,7 +608,12 @@ public void setHomePhone(final String homePhone) { target.setStringValue(homePhone); } } - + + /** + * Sets the patient's home phone using a HomePhone XML type. + * + * @param homePhone HomePhone the home phone as an XML type object + */ public void xsetHomePhone(final HomePhone homePhone) { synchronized (this.monitor()) { this.check_orphaned(); @@ -404,7 +625,12 @@ public void xsetHomePhone(final HomePhone homePhone) { target.set((XmlObject)homePhone); } } - + + /** + * Gets the patient's work phone number. + * + * @return String the work phone number, or null if not set + */ public String getWorkPhone() { synchronized (this.monitor()) { this.check_orphaned(); @@ -416,7 +642,12 @@ public String getWorkPhone() { return target.getStringValue(); } } - + + /** + * Gets the patient's work phone number as a WorkPhone XML type. + * + * @return WorkPhone the work phone as an XML type, or null if not set + */ public WorkPhone xgetWorkPhone() { synchronized (this.monitor()) { this.check_orphaned(); @@ -425,7 +656,12 @@ public WorkPhone xgetWorkPhone() { return target; } } - + + /** + * Sets the patient's work phone number. + * + * @param workPhone String the work phone number to set + */ public void setWorkPhone(final String workPhone) { synchronized (this.monitor()) { this.check_orphaned(); @@ -437,7 +673,12 @@ public void setWorkPhone(final String workPhone) { target.setStringValue(workPhone); } } - + + /** + * Sets the patient's work phone using a WorkPhone XML type. + * + * @param workPhone WorkPhone the work phone as an XML type object + */ public void xsetWorkPhone(final WorkPhone workPhone) { synchronized (this.monitor()) { this.check_orphaned(); @@ -449,7 +690,15 @@ public void xsetWorkPhone(final WorkPhone workPhone) { target.set((XmlObject)workPhone); } } - + + /** + * Gets the patient's preferred language for communication. + * + *

    Language preference is important for patient communication and informed consent + * in healthcare settings.

    + * + * @return Language.Enum the language enumeration value, or null if not set + */ public Language.Enum getLanguage() { synchronized (this.monitor()) { this.check_orphaned(); @@ -461,7 +710,12 @@ public Language.Enum getLanguage() { return (Language.Enum)target.getEnumValue(); } } - + + /** + * Gets the patient's language as a Language XML type. + * + * @return Language the language as an XML type, or null if not set + */ public Language xgetLanguage() { synchronized (this.monitor()) { this.check_orphaned(); @@ -470,7 +724,12 @@ public Language xgetLanguage() { return target; } } - + + /** + * Sets the patient's preferred language. + * + * @param language Language.Enum the language enumeration value to set + */ public void setLanguage(final Language.Enum language) { synchronized (this.monitor()) { this.check_orphaned(); @@ -482,7 +741,12 @@ public void setLanguage(final Language.Enum language) { target.setEnumValue((StringEnumAbstractBase)language); } } - + + /** + * Sets the patient's language using a Language XML type. + * + * @param language Language the language as an XML type object + */ public void xsetLanguage(final Language language) { synchronized (this.monitor()) { this.check_orphaned(); @@ -494,7 +758,15 @@ public void xsetLanguage(final Language language) { target.set((XmlObject)language); } } - + + /** + * Gets the patient's date of birth. + * + *

    Date of birth is a critical healthcare identifier used for age calculation, + * pediatric care protocols, and patient matching across systems.

    + * + * @return Calendar the date of birth, or null if not set + */ public Calendar getDob() { synchronized (this.monitor()) { this.check_orphaned(); @@ -506,7 +778,12 @@ public Calendar getDob() { return target.getCalendarValue(); } } - + + /** + * Gets the patient's date of birth as an XmlDate. + * + * @return XmlDate the date of birth as an XML date type, or null if not set + */ public XmlDate xgetDob() { synchronized (this.monitor()) { this.check_orphaned(); @@ -515,7 +792,12 @@ public XmlDate xgetDob() { return target; } } - + + /** + * Sets the patient's date of birth. + * + * @param dob Calendar the date of birth to set + */ public void setDob(final Calendar dob) { synchronized (this.monitor()) { this.check_orphaned(); @@ -527,7 +809,12 @@ public void setDob(final Calendar dob) { target.setCalendarValue(dob); } } - + + /** + * Sets the patient's date of birth using an XmlDate. + * + * @param dob XmlDate the date of birth as an XML date type + */ public void xsetDob(final XmlDate dob) { synchronized (this.monitor()) { this.check_orphaned(); @@ -539,7 +826,15 @@ public void xsetDob(final XmlDate dob) { target.set((XmlObject)dob); } } - + + /** + * Gets the patient's age in years. + * + *

    Age may be calculated from date of birth or entered directly. Used for + * age-appropriate care protocols and preventive care scheduling.

    + * + * @return int the patient's age in years, or 0 if not set + */ public int getAge() { synchronized (this.monitor()) { this.check_orphaned(); @@ -551,7 +846,12 @@ public int getAge() { return target.getIntValue(); } } - + + /** + * Gets the patient's age as an Age XML type. + * + * @return Age the age as an XML type, or null if not set + */ public Age xgetAge() { synchronized (this.monitor()) { this.check_orphaned(); @@ -560,7 +860,12 @@ public Age xgetAge() { return target; } } - + + /** + * Sets the patient's age in years. + * + * @param age int the patient's age to set + */ public void setAge(final int age) { synchronized (this.monitor()) { this.check_orphaned(); @@ -572,7 +877,12 @@ public void setAge(final int age) { target.setIntValue(age); } } - + + /** + * Sets the patient's age using an Age XML type. + * + * @param age Age the age as an XML type object + */ public void xsetAge(final Age age) { synchronized (this.monitor()) { this.check_orphaned(); @@ -584,7 +894,15 @@ public void xsetAge(final Age age) { target.set((XmlObject)age); } } - + + /** + * Gets the patient's occupation information. + * + *

    Occupation data is a social determinant of health used in antenatal care + * for assessing workplace risks and health hazards.

    + * + * @return Occupation the occupation object, or null if not set + */ public Occupation getOccupation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -596,7 +914,12 @@ public Occupation getOccupation() { return target; } } - + + /** + * Sets the patient's occupation information. + * + * @param occupation Occupation the occupation object to set + */ public void setOccupation(final Occupation occupation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -608,7 +931,12 @@ public void setOccupation(final Occupation occupation) { target.set((XmlObject)occupation); } } - + + /** + * Adds a new occupation element and returns it for further configuration. + * + * @return Occupation the newly created occupation object + */ public Occupation addNewOccupation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -617,7 +945,15 @@ public Occupation addNewOccupation() { return target; } } - + + /** + * Gets the patient's level of education. + * + *

    Education level is a social determinant of health that can influence + * health literacy and patient education approaches.

    + * + * @return LevelOfEducation.Enum the education level enumeration, or null if not set + */ public LevelOfEducation.Enum getLevelOfEducation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -629,7 +965,12 @@ public LevelOfEducation.Enum getLevelOfEducation() { return (LevelOfEducation.Enum)target.getEnumValue(); } } - + + /** + * Gets the patient's level of education as a LevelOfEducation XML type. + * + * @return LevelOfEducation the education level as an XML type, or null if not set + */ public LevelOfEducation xgetLevelOfEducation() { synchronized (this.monitor()) { this.check_orphaned(); @@ -638,7 +979,12 @@ public LevelOfEducation xgetLevelOfEducation() { return target; } } - + + /** + * Sets the patient's level of education. + * + * @param levelOfEducation LevelOfEducation.Enum the education level to set + */ public void setLevelOfEducation(final LevelOfEducation.Enum levelOfEducation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -650,7 +996,12 @@ public void setLevelOfEducation(final LevelOfEducation.Enum levelOfEducation) { target.setEnumValue((StringEnumAbstractBase)levelOfEducation); } } - + + /** + * Sets the patient's level of education using a LevelOfEducation XML type. + * + * @param levelOfEducation LevelOfEducation the education level as an XML type + */ public void xsetLevelOfEducation(final LevelOfEducation levelOfEducation) { synchronized (this.monitor()) { this.check_orphaned(); @@ -662,7 +1013,16 @@ public void xsetLevelOfEducation(final LevelOfEducation levelOfEducation) { target.set((XmlObject)levelOfEducation); } } - + + /** + * Gets the patient's Health Insurance Number (HIN). + * + *

    The HIN is a critical healthcare identifier in Canadian provinces used for + * billing, patient identification, and eligibility verification. This is Protected + * Health Information (PHI) and must be handled according to PIPEDA/HIPAA regulations.

    + * + * @return Hin the health insurance number object, or null if not set + */ public Hin getHin() { synchronized (this.monitor()) { this.check_orphaned(); @@ -674,7 +1034,15 @@ public Hin getHin() { return target; } } - + + /** + * Sets the patient's Health Insurance Number (HIN). + * + *

    Security Note: HIN is sensitive PHI and should be protected + * with appropriate access controls and audit logging.

    + * + * @param hin Hin the health insurance number object to set + */ public void setHin(final Hin hin) { synchronized (this.monitor()) { this.check_orphaned(); @@ -686,7 +1054,12 @@ public void setHin(final Hin hin) { target.set((XmlObject)hin); } } - + + /** + * Adds a new HIN element and returns it for further configuration. + * + * @return Hin the newly created HIN object + */ public Hin addNewHin() { synchronized (this.monitor()) { this.check_orphaned(); @@ -695,7 +1068,15 @@ public Hin addNewHin() { return target; } } - + + /** + * Gets the patient's file number (chart number). + * + *

    The file number is an internal identifier used by the medical practice + * for paper chart organization and record keeping.

    + * + * @return String the file number, or null if not set + */ public String getFileNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -707,7 +1088,12 @@ public String getFileNo() { return target.getStringValue(); } } - + + /** + * Gets the patient's file number as an XmlString. + * + * @return XmlString the file number as an XML string, or null if not set + */ public XmlString xgetFileNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -716,7 +1102,12 @@ public XmlString xgetFileNo() { return target; } } - + + /** + * Sets the patient's file number. + * + * @param fileNo String the file number to set + */ public void setFileNo(final String fileNo) { synchronized (this.monitor()) { this.check_orphaned(); @@ -728,7 +1119,12 @@ public void setFileNo(final String fileNo) { target.setStringValue(fileNo); } } - + + /** + * Sets the patient's file number using an XmlString. + * + * @param fileNo XmlString the file number as an XML string + */ public void xsetFileNo(final XmlString fileNo) { synchronized (this.monitor()) { this.check_orphaned(); @@ -740,7 +1136,15 @@ public void xsetFileNo(final XmlString fileNo) { target.set((XmlObject)fileNo); } } - + + /** + * Gets the patient's ethnic background information. + * + *

    Ethnic background is a social determinant of health that can influence + * genetic risk factors, cultural health practices, and healthcare delivery approaches.

    + * + * @return EthnicBackground the ethnic background object, or null if not set + */ public EthnicBackground getEthnicBackground() { synchronized (this.monitor()) { this.check_orphaned(); @@ -752,7 +1156,12 @@ public EthnicBackground getEthnicBackground() { return target; } } - + + /** + * Sets the patient's ethnic background information. + * + * @param ethnicBackground EthnicBackground the ethnic background object to set + */ public void setEthnicBackground(final EthnicBackground ethnicBackground) { synchronized (this.monitor()) { this.check_orphaned(); @@ -764,7 +1173,12 @@ public void setEthnicBackground(final EthnicBackground ethnicBackground) { target.set((XmlObject)ethnicBackground); } } - + + /** + * Adds a new ethnic background element and returns it for configuration. + * + * @return EthnicBackground the newly created ethnic background object + */ public EthnicBackground addNewEthnicBackground() { synchronized (this.monitor()) { this.check_orphaned(); @@ -773,7 +1187,15 @@ public EthnicBackground addNewEthnicBackground() { return target; } } - + + /** + * Gets the patient's marital status. + * + *

    Marital status is relevant for support system assessment and next-of-kin + * determination in healthcare settings.

    + * + * @return MaritalStatus.Enum the marital status enumeration, or null if not set + */ public MaritalStatus.Enum getMaritalStatus() { synchronized (this.monitor()) { this.check_orphaned(); @@ -785,7 +1207,12 @@ public MaritalStatus.Enum getMaritalStatus() { return (MaritalStatus.Enum)target.getEnumValue(); } } - + + /** + * Gets the patient's marital status as a MaritalStatus XML type. + * + * @return MaritalStatus the marital status as an XML type, or null if not set + */ public MaritalStatus xgetMaritalStatus() { synchronized (this.monitor()) { this.check_orphaned(); @@ -794,7 +1221,12 @@ public MaritalStatus xgetMaritalStatus() { return target; } } - + + /** + * Sets the patient's marital status. + * + * @param maritalStatus MaritalStatus.Enum the marital status to set + */ public void setMaritalStatus(final MaritalStatus.Enum maritalStatus) { synchronized (this.monitor()) { this.check_orphaned(); @@ -806,7 +1238,12 @@ public void setMaritalStatus(final MaritalStatus.Enum maritalStatus) { target.setEnumValue((StringEnumAbstractBase)maritalStatus); } } - + + /** + * Sets the patient's marital status using a MaritalStatus XML type. + * + * @param maritalStatus MaritalStatus the marital status as an XML type + */ public void xsetMaritalStatus(final MaritalStatus maritalStatus) { synchronized (this.monitor()) { this.check_orphaned(); @@ -818,7 +1255,16 @@ public void xsetMaritalStatus(final MaritalStatus maritalStatus) { target.set((XmlObject)maritalStatus); } } - + + /** + * Gets the patient's allergy information as a text string. + * + *

    Critical Clinical Information: Allergies are essential patient + * safety data that must be checked before prescribing medications or administering treatments. + * This field contains free-text allergy descriptions from the AR2005 form.

    + * + * @return String the allergies text, or null if not set + */ public String getAllergies() { synchronized (this.monitor()) { this.check_orphaned(); @@ -830,7 +1276,12 @@ public String getAllergies() { return target.getStringValue(); } } - + + /** + * Gets the patient's allergies as an XmlString. + * + * @return XmlString the allergies as an XML string, or null if not set + */ public XmlString xgetAllergies() { synchronized (this.monitor()) { this.check_orphaned(); @@ -839,7 +1290,15 @@ public XmlString xgetAllergies() { return target; } } - + + /** + * Sets the patient's allergy information. + * + *

    Clinical Safety Note: Changes to allergy information should + * trigger alerts and be prominently displayed in the patient's medical record.

    + * + * @param allergies String the allergies text to set + */ public void setAllergies(final String allergies) { synchronized (this.monitor()) { this.check_orphaned(); @@ -851,7 +1310,12 @@ public void setAllergies(final String allergies) { target.setStringValue(allergies); } } - + + /** + * Sets the patient's allergies using an XmlString. + * + * @param allergies XmlString the allergies as an XML string + */ public void xsetAllergies(final XmlString allergies) { synchronized (this.monitor()) { this.check_orphaned(); @@ -863,7 +1327,16 @@ public void xsetAllergies(final XmlString allergies) { target.set((XmlObject)allergies); } } - + + /** + * Gets the patient's current medications information. + * + *

    Clinical Information: Current medications are critical for + * assessing drug interactions, contraindications, and medication reconciliation during + * antenatal care.

    + * + * @return Medications the medications object, or null if not set + */ public Medications getMedications() { synchronized (this.monitor()) { this.check_orphaned(); @@ -875,7 +1348,12 @@ public Medications getMedications() { return target; } } - + + /** + * Sets the patient's medications information. + * + * @param medications Medications the medications object to set + */ public void setMedications(final Medications medications) { synchronized (this.monitor()) { this.check_orphaned(); @@ -887,7 +1365,12 @@ public void setMedications(final Medications medications) { target.set((XmlObject)medications); } } - + + /** + * Adds a new medications element and returns it for configuration. + * + * @return Medications the newly created medications object + */ public Medications addNewMedications() { synchronized (this.monitor()) { this.check_orphaned(); @@ -919,95 +1402,208 @@ public Medications addNewMedications() { ALLERGIES$36 = new QName("http://www.oscarmcmaster.org/AR2005", "allergies"); MEDICATIONS$38 = new QName("http://www.oscarmcmaster.org/AR2005", "medications"); } - + + /** + * XMLBeans implementation for Province enumeration type. + * + *

    Handles Canadian province/territory codes (e.g., BC, ON, AB) used for + * jurisdictional healthcare billing and regulations.

    + */ public static class ProvinceImpl extends JavaStringEnumerationHolderEx implements Province { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new ProvinceImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public ProvinceImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected ProvinceImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for PostalCode type. + * + *

    Validates and stores Canadian postal codes in the format A1A 1A1.

    + */ public static class PostalCodeImpl extends JavaStringHolderEx implements PostalCode { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new PostalCodeImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public PostalCodeImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected PostalCodeImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for HomePhone type. + * + *

    Stores and validates home phone numbers.

    + */ public static class HomePhoneImpl extends JavaStringHolderEx implements HomePhone { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new HomePhoneImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public HomePhoneImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected HomePhoneImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for WorkPhone type. + * + *

    Stores and validates work phone numbers.

    + */ public static class WorkPhoneImpl extends JavaStringHolderEx implements WorkPhone { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new WorkPhoneImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public WorkPhoneImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected WorkPhoneImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for Language enumeration type. + * + *

    Handles language preference codes for patient communication.

    + */ public static class LanguageImpl extends JavaStringEnumerationHolderEx implements Language { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new LanguageImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public LanguageImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected LanguageImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for Age type. + * + *

    Stores patient age as an integer value with schema validation.

    + */ public static class AgeImpl extends JavaIntHolderEx implements Age { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new AgeImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public AgeImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected AgeImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for Occupation complex type. + * + *

    Stores occupation information with both enumerated values and free-text + * "other" option for occupations not in the predefined list.

    + */ public static class OccupationImpl extends XmlComplexContentImpl implements Occupation { private static final long serialVersionUID = 1L; private static final QName VALUE$0; private static final QName OTHER$2; - + + /** + * Constructs a new OccupationImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public OccupationImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the occupation value from the enumerated list. + * + * @return Value.Enum the occupation enumeration value, or null if not set + */ public Value.Enum getValue() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1019,7 +1615,12 @@ public Value.Enum getValue() { return (Value.Enum)target.getEnumValue(); } } - + + /** + * Gets the occupation value as a Value XML type. + * + * @return Value the occupation value as an XML type, or null if not set + */ public Value xgetValue() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1028,7 +1629,12 @@ public Value xgetValue() { return target; } } - + + /** + * Sets the occupation value from the enumerated list. + * + * @param value Value.Enum the occupation enumeration value to set + */ public void setValue(final Value.Enum value) { synchronized (this.monitor()) { this.check_orphaned(); @@ -1040,7 +1646,12 @@ public void setValue(final Value.Enum value) { target.setEnumValue((StringEnumAbstractBase)value); } } - + + /** + * Sets the occupation value using a Value XML type. + * + * @param value Value the occupation value as an XML type + */ public void xsetValue(final Value value) { synchronized (this.monitor()) { this.check_orphaned(); @@ -1052,7 +1663,14 @@ public void xsetValue(final Value value) { target.set((XmlObject)value); } } - + + /** + * Gets the free-text occupation description for "other" occupations. + * + *

    Used when the occupation is not in the predefined enumeration list.

    + * + * @return String the other occupation text, or null if not set + */ public String getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1064,7 +1682,12 @@ public String getOther() { return target.getStringValue(); } } - + + /** + * Gets the other occupation text as an XmlString. + * + * @return XmlString the other occupation as an XML string, or null if not set + */ public XmlString xgetOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1073,7 +1696,12 @@ public XmlString xgetOther() { return target; } } - + + /** + * Sets the free-text occupation description. + * + * @param other String the other occupation text to set + */ public void setOther(final String other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -1085,7 +1713,12 @@ public void setOther(final String other) { target.setStringValue(other); } } - + + /** + * Sets the other occupation using an XmlString. + * + * @param other XmlString the other occupation as an XML string + */ public void xsetOther(final XmlString other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -1102,47 +1735,99 @@ public void xsetOther(final XmlString other) { VALUE$0 = new QName("http://www.oscarmcmaster.org/AR2005", "value"); OTHER$2 = new QName("http://www.oscarmcmaster.org/AR2005", "other"); } - + + /** + * XMLBeans implementation for occupation Value enumeration. + */ public static class ValueImpl extends JavaStringEnumerationHolderEx implements Value { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new ValueImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public ValueImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected ValueImpl(final SchemaType sType, final boolean b) { super(sType, b); } } } - + + /** + * XMLBeans implementation for LevelOfEducation enumeration type. + * + *

    Represents educational attainment levels (e.g., high school, college, university).

    + */ public static class LevelOfEducationImpl extends JavaStringEnumerationHolderEx implements LevelOfEducation { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new LevelOfEducationImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public LevelOfEducationImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected LevelOfEducationImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for Health Insurance Number (HIN) type. + * + *

    Stores the provincial health insurance number with an optional type attribute + * indicating the province/jurisdiction. This is Protected Health Information (PHI).

    + */ public static class HinImpl extends JavaStringHolderEx implements Hin { private static final long serialVersionUID = 1L; private static final QName TYPE$0; - + + /** + * Constructs a new HinImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public HinImpl(final SchemaType sType) { super(sType, true); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected HinImpl(final SchemaType sType, final boolean b) { super(sType, b); } - + + /** + * Gets the HIN type attribute (province/jurisdiction identifier). + * + * @return Type.Enum the HIN type enumeration, or null if not set + */ public Type.Enum getType() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1154,7 +1839,12 @@ public Type.Enum getType() { return (Type.Enum)target.getEnumValue(); } } - + + /** + * Gets the HIN type as a Type XML type. + * + * @return Type the HIN type as an XML type, or null if not set + */ public Type xgetType() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1163,14 +1853,24 @@ public Type xgetType() { return target; } } - + + /** + * Checks if the HIN type attribute is set. + * + * @return boolean true if the type is set, false otherwise + */ public boolean isSetType() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().find_attribute_user(HinImpl.TYPE$0) != null; } } - + + /** + * Sets the HIN type attribute. + * + * @param type Type.Enum the HIN type to set + */ public void setType(final Type.Enum type) { synchronized (this.monitor()) { this.check_orphaned(); @@ -1182,7 +1882,12 @@ public void setType(final Type.Enum type) { target.setEnumValue((StringEnumAbstractBase)type); } } - + + /** + * Sets the HIN type using a Type XML type. + * + * @param type Type the HIN type as an XML type + */ public void xsetType(final Type type) { synchronized (this.monitor()) { this.check_orphaned(); @@ -1194,7 +1899,10 @@ public void xsetType(final Type type) { target.set((XmlObject)type); } } - + + /** + * Removes the HIN type attribute. + */ public void unsetType() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1205,30 +1913,62 @@ public void unsetType() { static { TYPE$0 = new QName("", "type"); } - + + /** + * XMLBeans implementation for HIN Type enumeration. + */ public static class TypeImpl extends JavaStringEnumerationHolderEx implements Type { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new TypeImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public TypeImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected TypeImpl(final SchemaType sType, final boolean b) { super(sType, b); } } } - + + /** + * XMLBeans implementation for EthnicBackground complex type. + * + *

    Manages ethnic background values with support for multi-select options + * and parent/child ethnic group relationships.

    + */ public static class EthnicBackgroundImpl extends XmlComplexContentImpl implements EthnicBackground { private static final long serialVersionUID = 1L; private static final QName VALUE$0; - + + /** + * Constructs a new EthnicBackgroundImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public EthnicBackgroundImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets all ethnic background values as an array. + * + *

    Supports multiple ethnic background selections.

    + * + * @return Value[] array of ethnic background values + */ public Value[] getValueArray() { synchronized (this.monitor()) { this.check_orphaned(); @@ -1306,7 +2046,10 @@ public void removeValue(final int i) { static { VALUE$0 = new QName("http://www.oscarmcmaster.org/AR2005", "value"); } - + + /** + * XMLBeans implementation for ethnic background Value with parent attribute support. + */ public static class ValueImpl extends JavaStringEnumerationHolderEx implements Value { private static final long serialVersionUID = 1L; @@ -1382,35 +2125,71 @@ public void unsetParent() { static { PARENT$0 = new QName("", "parent"); } - + + /** + * XMLBeans implementation for ethnic background Parent enumeration. + */ public static class ParentImpl extends JavaStringEnumerationHolderEx implements Parent { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new ParentImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public ParentImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected ParentImpl(final SchemaType sType, final boolean b) { super(sType, b); } } } } - + + /** + * XMLBeans implementation for MaritalStatus enumeration type. + * + *

    Represents marital status values (e.g., single, married, divorced, widowed).

    + */ public static class MaritalStatusImpl extends JavaStringEnumerationHolderEx implements MaritalStatus { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new MaritalStatusImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public MaritalStatusImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected MaritalStatusImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * XMLBeans implementation for Medications complex type. + * + *

    Manages current medications with support for multiple entries including + * both enumerated medication values and free-text "other" medications.

    + */ public static class MedicationsImpl extends XmlComplexContentImpl implements Medications { private static final long serialVersionUID = 1L; @@ -1695,15 +2474,29 @@ public void removeOther(final int i) { VALUE$0 = new QName("http://www.oscarmcmaster.org/AR2005", "value"); OTHER$2 = new QName("http://www.oscarmcmaster.org/AR2005", "other"); } - + + /** + * XMLBeans implementation for medication Value enumeration. + */ public static class ValueImpl extends JavaStringEnumerationHolderEx implements Value { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new ValueImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition + */ public ValueImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Protected constructor for schema type with validation control. + * + * @param sType SchemaType the schema type definition + * @param b boolean validation flag + */ protected ValueImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PhysicalExaminationTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PhysicalExaminationTypeImpl.java index 876a9eeb7b1..faf9855e9d3 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PhysicalExaminationTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PhysicalExaminationTypeImpl.java @@ -11,6 +11,33 @@ import ca.openosp.openo.ar2005.PhysicalExaminationType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the PhysicalExaminationType interface for the British Columbia Antenatal Record (BCAR) 2005 form. + * + * This class provides XML binding implementation for physical examination data collected during prenatal care. + * It manages vital signs and comprehensive physical examination findings including cardiovascular, respiratory, + * abdominal, and obstetric/gynecological assessments. All data is stored and accessed through Apache XMLBeans + * framework for XML serialization and deserialization. + * + * The physical examination includes: + * - Vital measurements: height, weight, BMI (Body Mass Index), blood pressure + * - General examination: thyroid, chest, breasts, cardiovascular system + * - Abdominal examination: includes assessment for pregnancy-related changes + * - Obstetric examination: external genitals, cervix, vagina, uterus (size and status), adnexa + * - Additional findings: varicosities and other observations + * + * Each examination component can be marked as Normal, Abnormal, or Null using {@link NormalAbnormalNullType}. + * Measurements are stored as float values with support for nil/null states to distinguish between zero values + * and missing data. + * + * Thread Safety: All public methods are synchronized on the internal monitor to ensure thread-safe access + * to the underlying XML store. + * + * @see PhysicalExaminationType + * @see NormalAbnormalNullType + * @see XmlComplexContentImpl + * @since 2026-01-24 + */ public class PhysicalExaminationTypeImpl extends XmlComplexContentImpl implements PhysicalExaminationType { private static final long serialVersionUID = 1L; @@ -31,11 +58,21 @@ public class PhysicalExaminationTypeImpl extends XmlComplexContentImpl implement private static final QName ADNEXA$28; private static final QName OTHERDESCR$30; private static final QName OTHER$32; - + + /** + * Constructs a new PhysicalExaminationTypeImpl instance. + * + * @param sType SchemaType the schema type definition for this XML element + */ public PhysicalExaminationTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the patient's height value. + * + * @return float the height measurement in centimeters, or 0.0f if not set + */ public float getHeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -47,7 +84,12 @@ public float getHeight() { return target.getFloatValue(); } } - + + /** + * Gets the height value as an XML type object. + * + * @return Height the XML representation of the height value, or null if not set + */ public Height xgetHeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -56,7 +98,12 @@ public Height xgetHeight() { return target; } } - + + /** + * Checks if the height value is explicitly set to nil/null. + * + * @return boolean true if the height is explicitly nil, false otherwise + */ public boolean isNilHeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -65,7 +112,12 @@ public boolean isNilHeight() { return target != null && target.isNil(); } } - + + /** + * Sets the patient's height value. + * + * @param height float the height measurement in centimeters + */ public void setHeight(final float height) { synchronized (this.monitor()) { this.check_orphaned(); @@ -77,7 +129,12 @@ public void setHeight(final float height) { target.setFloatValue(height); } } - + + /** + * Sets the height value using an XML type object. + * + * @param height Height the XML representation of the height value + */ public void xsetHeight(final Height height) { synchronized (this.monitor()) { this.check_orphaned(); @@ -89,7 +146,10 @@ public void xsetHeight(final Height height) { target.set((XmlObject)height); } } - + + /** + * Sets the height value to nil/null, indicating the value is explicitly absent. + */ public void setNilHeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -101,7 +161,12 @@ public void setNilHeight() { target.setNil(); } } - + + /** + * Gets the patient's weight value. + * + * @return float the weight measurement in kilograms, or 0.0f if not set + */ public float getWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -113,7 +178,12 @@ public float getWeight() { return target.getFloatValue(); } } - + + /** + * Gets the weight value as an XML type object. + * + * @return Weight the XML representation of the weight value, or null if not set + */ public Weight xgetWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -122,7 +192,12 @@ public Weight xgetWeight() { return target; } } - + + /** + * Checks if the weight value is explicitly set to nil/null. + * + * @return boolean true if the weight is explicitly nil, false otherwise + */ public boolean isNilWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -131,7 +206,12 @@ public boolean isNilWeight() { return target != null && target.isNil(); } } - + + /** + * Sets the patient's weight value. + * + * @param weight float the weight measurement in kilograms + */ public void setWeight(final float weight) { synchronized (this.monitor()) { this.check_orphaned(); @@ -143,7 +223,12 @@ public void setWeight(final float weight) { target.setFloatValue(weight); } } - + + /** + * Sets the weight value using an XML type object. + * + * @param weight Weight the XML representation of the weight value + */ public void xsetWeight(final Weight weight) { synchronized (this.monitor()) { this.check_orphaned(); @@ -155,7 +240,10 @@ public void xsetWeight(final Weight weight) { target.set((XmlObject)weight); } } - + + /** + * Sets the weight value to nil/null, indicating the value is explicitly absent. + */ public void setNilWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +255,12 @@ public void setNilWeight() { target.setNil(); } } - + + /** + * Gets the patient's Body Mass Index (BMI) value. + * + * @return float the BMI value (weight in kg / height in m²), or 0.0f if not set + */ public float getBmi() { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +272,12 @@ public float getBmi() { return target.getFloatValue(); } } - + + /** + * Gets the BMI value as an XML type object. + * + * @return Bmi the XML representation of the BMI value, or null if not set + */ public Bmi xgetBmi() { synchronized (this.monitor()) { this.check_orphaned(); @@ -188,7 +286,12 @@ public Bmi xgetBmi() { return target; } } - + + /** + * Checks if the BMI value is explicitly set to nil/null. + * + * @return boolean true if the BMI is explicitly nil, false otherwise + */ public boolean isNilBmi() { synchronized (this.monitor()) { this.check_orphaned(); @@ -197,7 +300,12 @@ public boolean isNilBmi() { return target != null && target.isNil(); } } - + + /** + * Sets the patient's Body Mass Index (BMI) value. + * + * @param bmi float the BMI value (weight in kg / height in m²) + */ public void setBmi(final float bmi) { synchronized (this.monitor()) { this.check_orphaned(); @@ -209,7 +317,12 @@ public void setBmi(final float bmi) { target.setFloatValue(bmi); } } - + + /** + * Sets the BMI value using an XML type object. + * + * @param bmi Bmi the XML representation of the BMI value + */ public void xsetBmi(final Bmi bmi) { synchronized (this.monitor()) { this.check_orphaned(); @@ -221,7 +334,10 @@ public void xsetBmi(final Bmi bmi) { target.set((XmlObject)bmi); } } - + + /** + * Sets the BMI value to nil/null, indicating the value is explicitly absent. + */ public void setNilBmi() { synchronized (this.monitor()) { this.check_orphaned(); @@ -233,7 +349,12 @@ public void setNilBmi() { target.setNil(); } } - + + /** + * Gets the patient's blood pressure value. + * + * @return String the blood pressure in format "systolic/diastolic" (e.g., "120/80"), or null if not set + */ public String getBp() { synchronized (this.monitor()) { this.check_orphaned(); @@ -245,7 +366,12 @@ public String getBp() { return target.getStringValue(); } } - + + /** + * Gets the blood pressure value as an XML type object. + * + * @return Bp the XML representation of the blood pressure value, or null if not set + */ public Bp xgetBp() { synchronized (this.monitor()) { this.check_orphaned(); @@ -254,7 +380,12 @@ public Bp xgetBp() { return target; } } - + + /** + * Sets the patient's blood pressure value. + * + * @param bp String the blood pressure in format "systolic/diastolic" (e.g., "120/80") + */ public void setBp(final String bp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -266,7 +397,12 @@ public void setBp(final String bp) { target.setStringValue(bp); } } - + + /** + * Sets the blood pressure value using an XML type object. + * + * @param bp Bp the XML representation of the blood pressure value + */ public void xsetBp(final Bp bp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -278,7 +414,12 @@ public void xsetBp(final Bp bp) { target.set((XmlObject)bp); } } - + + /** + * Gets the thyroid examination findings. + * + * @return NormalAbnormalNullType the thyroid examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getThyroid() { synchronized (this.monitor()) { this.check_orphaned(); @@ -290,7 +431,12 @@ public NormalAbnormalNullType getThyroid() { return target; } } - + + /** + * Sets the thyroid examination findings. + * + * @param thyroid NormalAbnormalNullType the thyroid examination status (Normal/Abnormal/Null) + */ public void setThyroid(final NormalAbnormalNullType thyroid) { synchronized (this.monitor()) { this.check_orphaned(); @@ -302,7 +448,12 @@ public void setThyroid(final NormalAbnormalNullType thyroid) { target.set((XmlObject)thyroid); } } - + + /** + * Creates and adds a new thyroid examination finding. + * + * @return NormalAbnormalNullType the newly created thyroid examination element + */ public NormalAbnormalNullType addNewThyroid() { synchronized (this.monitor()) { this.check_orphaned(); @@ -311,7 +462,12 @@ public NormalAbnormalNullType addNewThyroid() { return target; } } - + + /** + * Gets the chest examination findings. + * + * @return NormalAbnormalNullType the chest examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getChest() { synchronized (this.monitor()) { this.check_orphaned(); @@ -323,7 +479,12 @@ public NormalAbnormalNullType getChest() { return target; } } - + + /** + * Sets the chest examination findings. + * + * @param chest NormalAbnormalNullType the chest examination status (Normal/Abnormal/Null) + */ public void setChest(final NormalAbnormalNullType chest) { synchronized (this.monitor()) { this.check_orphaned(); @@ -335,7 +496,12 @@ public void setChest(final NormalAbnormalNullType chest) { target.set((XmlObject)chest); } } - + + /** + * Creates and adds a new chest examination finding. + * + * @return NormalAbnormalNullType the newly created chest examination element + */ public NormalAbnormalNullType addNewChest() { synchronized (this.monitor()) { this.check_orphaned(); @@ -344,7 +510,12 @@ public NormalAbnormalNullType addNewChest() { return target; } } - + + /** + * Gets the breast examination findings. + * + * @return NormalAbnormalNullType the breast examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getBreasts() { synchronized (this.monitor()) { this.check_orphaned(); @@ -356,7 +527,12 @@ public NormalAbnormalNullType getBreasts() { return target; } } - + + /** + * Sets the breast examination findings. + * + * @param breasts NormalAbnormalNullType the breast examination status (Normal/Abnormal/Null) + */ public void setBreasts(final NormalAbnormalNullType breasts) { synchronized (this.monitor()) { this.check_orphaned(); @@ -368,7 +544,12 @@ public void setBreasts(final NormalAbnormalNullType breasts) { target.set((XmlObject)breasts); } } - + + /** + * Creates and adds a new breast examination finding. + * + * @return NormalAbnormalNullType the newly created breast examination element + */ public NormalAbnormalNullType addNewBreasts() { synchronized (this.monitor()) { this.check_orphaned(); @@ -377,7 +558,12 @@ public NormalAbnormalNullType addNewBreasts() { return target; } } - + + /** + * Gets the cardiovascular system examination findings. + * + * @return NormalAbnormalNullType the cardiovascular examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getCardiovascular() { synchronized (this.monitor()) { this.check_orphaned(); @@ -389,7 +575,12 @@ public NormalAbnormalNullType getCardiovascular() { return target; } } - + + /** + * Sets the cardiovascular system examination findings. + * + * @param cardiovascular NormalAbnormalNullType the cardiovascular examination status (Normal/Abnormal/Null) + */ public void setCardiovascular(final NormalAbnormalNullType cardiovascular) { synchronized (this.monitor()) { this.check_orphaned(); @@ -401,7 +592,12 @@ public void setCardiovascular(final NormalAbnormalNullType cardiovascular) { target.set((XmlObject)cardiovascular); } } - + + /** + * Creates and adds a new cardiovascular system examination finding. + * + * @return NormalAbnormalNullType the newly created cardiovascular examination element + */ public NormalAbnormalNullType addNewCardiovascular() { synchronized (this.monitor()) { this.check_orphaned(); @@ -410,7 +606,12 @@ public NormalAbnormalNullType addNewCardiovascular() { return target; } } - + + /** + * Gets the abdominal examination findings. + * + * @return NormalAbnormalNullType the abdominal examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getAbdomen() { synchronized (this.monitor()) { this.check_orphaned(); @@ -422,7 +623,12 @@ public NormalAbnormalNullType getAbdomen() { return target; } } - + + /** + * Sets the abdominal examination findings. + * + * @param abdomen NormalAbnormalNullType the abdominal examination status (Normal/Abnormal/Null) + */ public void setAbdomen(final NormalAbnormalNullType abdomen) { synchronized (this.monitor()) { this.check_orphaned(); @@ -434,7 +640,12 @@ public void setAbdomen(final NormalAbnormalNullType abdomen) { target.set((XmlObject)abdomen); } } - + + /** + * Creates and adds a new abdominal examination finding. + * + * @return NormalAbnormalNullType the newly created abdominal examination element + */ public NormalAbnormalNullType addNewAbdomen() { synchronized (this.monitor()) { this.check_orphaned(); @@ -443,7 +654,12 @@ public NormalAbnormalNullType addNewAbdomen() { return target; } } - + + /** + * Gets the varicosities examination findings. + * + * @return NormalAbnormalNullType the varicosities status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getVaricosities() { synchronized (this.monitor()) { this.check_orphaned(); @@ -455,7 +671,12 @@ public NormalAbnormalNullType getVaricosities() { return target; } } - + + /** + * Sets the varicosities examination findings. + * + * @param varicosities NormalAbnormalNullType the varicosities status (Normal/Abnormal/Null) + */ public void setVaricosities(final NormalAbnormalNullType varicosities) { synchronized (this.monitor()) { this.check_orphaned(); @@ -467,7 +688,12 @@ public void setVaricosities(final NormalAbnormalNullType varicosities) { target.set((XmlObject)varicosities); } } - + + /** + * Creates and adds a new varicosities examination finding. + * + * @return NormalAbnormalNullType the newly created varicosities element + */ public NormalAbnormalNullType addNewVaricosities() { synchronized (this.monitor()) { this.check_orphaned(); @@ -476,7 +702,12 @@ public NormalAbnormalNullType addNewVaricosities() { return target; } } - + + /** + * Gets the external genitals examination findings. + * + * @return NormalAbnormalNullType the external genitals examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getExernalGenitals() { synchronized (this.monitor()) { this.check_orphaned(); @@ -488,7 +719,12 @@ public NormalAbnormalNullType getExernalGenitals() { return target; } } - + + /** + * Sets the external genitals examination findings. + * + * @param exernalGenitals NormalAbnormalNullType the external genitals examination status (Normal/Abnormal/Null) + */ public void setExernalGenitals(final NormalAbnormalNullType exernalGenitals) { synchronized (this.monitor()) { this.check_orphaned(); @@ -500,7 +736,12 @@ public void setExernalGenitals(final NormalAbnormalNullType exernalGenitals) { target.set((XmlObject)exernalGenitals); } } - + + /** + * Creates and adds a new external genitals examination finding. + * + * @return NormalAbnormalNullType the newly created external genitals examination element + */ public NormalAbnormalNullType addNewExernalGenitals() { synchronized (this.monitor()) { this.check_orphaned(); @@ -509,7 +750,12 @@ public NormalAbnormalNullType addNewExernalGenitals() { return target; } } - + + /** + * Gets the cervix and vagina examination findings. + * + * @return NormalAbnormalNullType the cervix/vagina examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getCervixVagina() { synchronized (this.monitor()) { this.check_orphaned(); @@ -521,7 +767,12 @@ public NormalAbnormalNullType getCervixVagina() { return target; } } - + + /** + * Sets the cervix and vagina examination findings. + * + * @param cervixVagina NormalAbnormalNullType the cervix/vagina examination status (Normal/Abnormal/Null) + */ public void setCervixVagina(final NormalAbnormalNullType cervixVagina) { synchronized (this.monitor()) { this.check_orphaned(); @@ -533,7 +784,12 @@ public void setCervixVagina(final NormalAbnormalNullType cervixVagina) { target.set((XmlObject)cervixVagina); } } - + + /** + * Creates and adds a new cervix and vagina examination finding. + * + * @return NormalAbnormalNullType the newly created cervix/vagina examination element + */ public NormalAbnormalNullType addNewCervixVagina() { synchronized (this.monitor()) { this.check_orphaned(); @@ -542,7 +798,12 @@ public NormalAbnormalNullType addNewCervixVagina() { return target; } } - + + /** + * Gets the uterus examination findings. + * + * @return NormalAbnormalNullType the uterus examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getUterus() { synchronized (this.monitor()) { this.check_orphaned(); @@ -554,7 +815,12 @@ public NormalAbnormalNullType getUterus() { return target; } } - + + /** + * Sets the uterus examination findings. + * + * @param uterus NormalAbnormalNullType the uterus examination status (Normal/Abnormal/Null) + */ public void setUterus(final NormalAbnormalNullType uterus) { synchronized (this.monitor()) { this.check_orphaned(); @@ -566,7 +832,12 @@ public void setUterus(final NormalAbnormalNullType uterus) { target.set((XmlObject)uterus); } } - + + /** + * Creates and adds a new uterus examination finding. + * + * @return NormalAbnormalNullType the newly created uterus examination element + */ public NormalAbnormalNullType addNewUterus() { synchronized (this.monitor()) { this.check_orphaned(); @@ -575,7 +846,12 @@ public NormalAbnormalNullType addNewUterus() { return target; } } - + + /** + * Gets the uterus size description. + * + * @return String the textual description of uterus size (e.g., weeks of gestation equivalent), or null if not set + */ public String getUterusSize() { synchronized (this.monitor()) { this.check_orphaned(); @@ -587,7 +863,12 @@ public String getUterusSize() { return target.getStringValue(); } } - + + /** + * Gets the uterus size as an XML type object. + * + * @return XmlString the XML representation of the uterus size description, or null if not set + */ public XmlString xgetUterusSize() { synchronized (this.monitor()) { this.check_orphaned(); @@ -596,7 +877,12 @@ public XmlString xgetUterusSize() { return target; } } - + + /** + * Sets the uterus size description. + * + * @param uterusSize String the textual description of uterus size (e.g., weeks of gestation equivalent) + */ public void setUterusSize(final String uterusSize) { synchronized (this.monitor()) { this.check_orphaned(); @@ -608,7 +894,12 @@ public void setUterusSize(final String uterusSize) { target.setStringValue(uterusSize); } } - + + /** + * Sets the uterus size using an XML type object. + * + * @param uterusSize XmlString the XML representation of the uterus size description + */ public void xsetUterusSize(final XmlString uterusSize) { synchronized (this.monitor()) { this.check_orphaned(); @@ -620,7 +911,12 @@ public void xsetUterusSize(final XmlString uterusSize) { target.set((XmlObject)uterusSize); } } - + + /** + * Gets the adnexa (ovaries and fallopian tubes) examination findings. + * + * @return NormalAbnormalNullType the adnexa examination status (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getAdnexa() { synchronized (this.monitor()) { this.check_orphaned(); @@ -632,7 +928,12 @@ public NormalAbnormalNullType getAdnexa() { return target; } } - + + /** + * Sets the adnexa (ovaries and fallopian tubes) examination findings. + * + * @param adnexa NormalAbnormalNullType the adnexa examination status (Normal/Abnormal/Null) + */ public void setAdnexa(final NormalAbnormalNullType adnexa) { synchronized (this.monitor()) { this.check_orphaned(); @@ -644,7 +945,12 @@ public void setAdnexa(final NormalAbnormalNullType adnexa) { target.set((XmlObject)adnexa); } } - + + /** + * Creates and adds a new adnexa examination finding. + * + * @return NormalAbnormalNullType the newly created adnexa examination element + */ public NormalAbnormalNullType addNewAdnexa() { synchronized (this.monitor()) { this.check_orphaned(); @@ -653,7 +959,12 @@ public NormalAbnormalNullType addNewAdnexa() { return target; } } - + + /** + * Gets the description of other examination findings. + * + * @return String the textual description of additional findings not covered by specific fields, or null if not set + */ public String getOtherDescr() { synchronized (this.monitor()) { this.check_orphaned(); @@ -665,7 +976,12 @@ public String getOtherDescr() { return target.getStringValue(); } } - + + /** + * Gets the description of other examination findings as an XML type object. + * + * @return XmlString the XML representation of other findings description, or null if not set + */ public XmlString xgetOtherDescr() { synchronized (this.monitor()) { this.check_orphaned(); @@ -674,7 +990,12 @@ public XmlString xgetOtherDescr() { return target; } } - + + /** + * Sets the description of other examination findings. + * + * @param otherDescr String the textual description of additional findings not covered by specific fields + */ public void setOtherDescr(final String otherDescr) { synchronized (this.monitor()) { this.check_orphaned(); @@ -686,7 +1007,12 @@ public void setOtherDescr(final String otherDescr) { target.setStringValue(otherDescr); } } - + + /** + * Sets the description of other examination findings using an XML type object. + * + * @param otherDescr XmlString the XML representation of other findings description + */ public void xsetOtherDescr(final XmlString otherDescr) { synchronized (this.monitor()) { this.check_orphaned(); @@ -698,7 +1024,12 @@ public void xsetOtherDescr(final XmlString otherDescr) { target.set((XmlObject)otherDescr); } } - + + /** + * Gets the status of other examination findings. + * + * @return NormalAbnormalNullType the status of other findings (Normal/Abnormal/Null), or null if not set + */ public NormalAbnormalNullType getOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -710,7 +1041,12 @@ public NormalAbnormalNullType getOther() { return target; } } - + + /** + * Sets the status of other examination findings. + * + * @param other NormalAbnormalNullType the status of other findings (Normal/Abnormal/Null) + */ public void setOther(final NormalAbnormalNullType other) { synchronized (this.monitor()) { this.check_orphaned(); @@ -722,7 +1058,12 @@ public void setOther(final NormalAbnormalNullType other) { target.set((XmlObject)other); } } - + + /** + * Creates and adds a new other examination finding element. + * + * @return NormalAbnormalNullType the newly created other findings element + */ public NormalAbnormalNullType addNewOther() { synchronized (this.monitor()) { this.check_orphaned(); @@ -751,54 +1092,135 @@ public NormalAbnormalNullType addNewOther() { OTHERDESCR$30 = new QName("http://www.oscarmcmaster.org/AR2005", "otherDescr"); OTHER$32 = new QName("http://www.oscarmcmaster.org/AR2005", "other"); } - + + /** + * Inner implementation class for the Height XML type. + * + * Provides XMLBeans implementation for height measurements stored as float values. + * Extends {@link JavaFloatHolderEx} to provide XML binding for floating-point height data. + * + * @see JavaFloatHolderEx + * @since 2026-01-24 + */ public static class HeightImpl extends JavaFloatHolderEx implements Height { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new HeightImpl instance. + * + * @param sType SchemaType the schema type definition for this XML element + */ public HeightImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new HeightImpl instance with explicit validation control. + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean whether to enable validation + */ protected HeightImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the Weight XML type. + * + * Provides XMLBeans implementation for weight measurements stored as float values. + * Extends {@link JavaFloatHolderEx} to provide XML binding for floating-point weight data. + * + * @see JavaFloatHolderEx + * @since 2026-01-24 + */ public static class WeightImpl extends JavaFloatHolderEx implements Weight { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new WeightImpl instance. + * + * @param sType SchemaType the schema type definition for this XML element + */ public WeightImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new WeightImpl instance with explicit validation control. + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean whether to enable validation + */ protected WeightImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the BMI (Body Mass Index) XML type. + * + * Provides XMLBeans implementation for BMI values stored as float values. + * Extends {@link JavaFloatHolderEx} to provide XML binding for floating-point BMI data. + * + * @see JavaFloatHolderEx + * @since 2026-01-24 + */ public static class BmiImpl extends JavaFloatHolderEx implements Bmi { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new BmiImpl instance. + * + * @param sType SchemaType the schema type definition for this XML element + */ public BmiImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new BmiImpl instance with explicit validation control. + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean whether to enable validation + */ protected BmiImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the BP (Blood Pressure) XML type. + * + * Provides XMLBeans implementation for blood pressure values stored as string values. + * Extends {@link JavaStringHolderEx} to provide XML binding for blood pressure data + * in "systolic/diastolic" format (e.g., "120/80"). + * + * @see JavaStringHolderEx + * @since 2026-01-24 + */ public static class BpImpl extends JavaStringHolderEx implements Bp { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new BpImpl instance. + * + * @param sType SchemaType the schema type definition for this XML element + */ public BpImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new BpImpl instance with explicit validation control. + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean whether to enable validation + */ protected BpImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PractitionerInformationImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PractitionerInformationImpl.java index 01f418325af..bdb6cee15d9 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PractitionerInformationImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PractitionerInformationImpl.java @@ -10,17 +10,52 @@ import ca.openosp.openo.ar2005.PractitionerInformation; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for the PractitionerInformation element in the AR2005 (BC Antenatal Record) schema. + * + * This class provides XMLBeans-based access to practitioner information captured during prenatal and birth care, + * including details about birth attendants, newborn care providers, and the family physician. It is part of the + * British Columbia Antenatal Record (BCAR) form system used for standardized pregnancy and birth documentation + * in OpenO EMR. + * + * The implementation extends XMLBeans' XmlComplexContentImpl to provide thread-safe access to XML element data + * through synchronized accessor methods. All data manipulation operations use the underlying XML store with + * orphan checking to ensure data integrity. + * + * @see ca.openosp.openo.ar2005.PractitionerInformation + * @see ca.openosp.openo.ar2005.BirthAttendants + * @see ca.openosp.openo.ar2005.NewbornCare + * @since 2026-01-24 + */ public class PractitionerInformationImpl extends XmlComplexContentImpl implements PractitionerInformation { private static final long serialVersionUID = 1L; private static final QName BIRTHATTENDANTS$0; private static final QName NEWBORNCARE$2; private static final QName FAMILYPHYSICIAN$4; - + + /** + * Constructs a new PractitionerInformationImpl instance with the specified schema type. + * + * This constructor is typically invoked by the XMLBeans framework during XML document parsing + * or when creating new instances programmatically. It initializes the underlying XML store + * with the appropriate schema type definition for practitioner information elements. + * + * @param sType SchemaType the schema type definition for this element + */ public PractitionerInformationImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the birth attendants information from the antenatal record. + * + * This method provides thread-safe access to the BirthAttendants element, which contains + * information about healthcare providers who attended the birth, including physicians, + * midwives, and other medical personnel involved in the delivery. + * + * @return BirthAttendants the birth attendants element, or null if not set + */ public BirthAttendants getBirthAttendants() { synchronized (this.monitor()) { this.check_orphaned(); @@ -32,7 +67,16 @@ public BirthAttendants getBirthAttendants() { return target; } } - + + /** + * Sets the birth attendants information in the antenatal record. + * + * This method updates the BirthAttendants element with information about healthcare providers + * who attended the birth. If the element does not exist, it will be created. The operation is + * thread-safe and ensures proper XML store synchronization. + * + * @param birthAttendants BirthAttendants the birth attendants element to set + */ public void setBirthAttendants(final BirthAttendants birthAttendants) { synchronized (this.monitor()) { this.check_orphaned(); @@ -44,7 +88,16 @@ public void setBirthAttendants(final BirthAttendants birthAttendants) { target.set((XmlObject)birthAttendants); } } - + + /** + * Creates and adds a new birth attendants element to the antenatal record. + * + * This method creates a new BirthAttendants element in the XML store and returns it for + * population with healthcare provider information. The returned object can be used to set + * details about physicians, midwives, and other medical personnel involved in the birth. + * + * @return BirthAttendants the newly created birth attendants element + */ public BirthAttendants addNewBirthAttendants() { synchronized (this.monitor()) { this.check_orphaned(); @@ -53,7 +106,16 @@ public BirthAttendants addNewBirthAttendants() { return target; } } - + + /** + * Retrieves the newborn care information from the antenatal record. + * + * This method provides thread-safe access to the NewbornCare element, which contains + * information about healthcare providers responsible for newborn care, including + * pediatricians and other medical personnel providing immediate postnatal care. + * + * @return NewbornCare the newborn care element, or null if not set + */ public NewbornCare getNewbornCare() { synchronized (this.monitor()) { this.check_orphaned(); @@ -65,7 +127,16 @@ public NewbornCare getNewbornCare() { return target; } } - + + /** + * Sets the newborn care information in the antenatal record. + * + * This method updates the NewbornCare element with information about healthcare providers + * responsible for newborn care. If the element does not exist, it will be created. The + * operation is thread-safe and ensures proper XML store synchronization. + * + * @param newbornCare NewbornCare the newborn care element to set + */ public void setNewbornCare(final NewbornCare newbornCare) { synchronized (this.monitor()) { this.check_orphaned(); @@ -77,7 +148,16 @@ public void setNewbornCare(final NewbornCare newbornCare) { target.set((XmlObject)newbornCare); } } - + + /** + * Creates and adds a new newborn care element to the antenatal record. + * + * This method creates a new NewbornCare element in the XML store and returns it for + * population with healthcare provider information. The returned object can be used to set + * details about pediatricians and other medical personnel providing postnatal care. + * + * @return NewbornCare the newly created newborn care element + */ public NewbornCare addNewNewbornCare() { synchronized (this.monitor()) { this.check_orphaned(); @@ -86,7 +166,16 @@ public NewbornCare addNewNewbornCare() { return target; } } - + + /** + * Retrieves the family physician name from the antenatal record. + * + * This method provides thread-safe access to the family physician element, which contains + * the name of the primary care physician responsible for ongoing patient care and prenatal + * follow-up. The value is returned as a String. + * + * @return String the family physician name, or null if not set + */ public String getFamilyPhysician() { synchronized (this.monitor()) { this.check_orphaned(); @@ -98,7 +187,16 @@ public String getFamilyPhysician() { return target.getStringValue(); } } - + + /** + * Retrieves the family physician element as an XmlString object. + * + * This method provides thread-safe access to the family physician element in its raw + * XMLBeans form. This allows access to XML-specific features such as validation state, + * schema type information, and XML formatting. + * + * @return XmlString the family physician element as an XmlString, or null if not set + */ public XmlString xgetFamilyPhysician() { synchronized (this.monitor()) { this.check_orphaned(); @@ -107,7 +205,16 @@ public XmlString xgetFamilyPhysician() { return target; } } - + + /** + * Sets the family physician name in the antenatal record. + * + * This method updates the family physician element with the name of the primary care + * physician. If the element does not exist, it will be created. The operation is + * thread-safe and ensures proper XML store synchronization. + * + * @param familyPhysician String the family physician name to set + */ public void setFamilyPhysician(final String familyPhysician) { synchronized (this.monitor()) { this.check_orphaned(); @@ -119,7 +226,17 @@ public void setFamilyPhysician(final String familyPhysician) { target.setStringValue(familyPhysician); } } - + + /** + * Sets the family physician element using an XmlString object. + * + * This method updates the family physician element using an XmlString object, which + * preserves XML-specific features such as validation state and schema type information. + * If the element does not exist, it will be created. The operation is thread-safe and + * ensures proper XML store synchronization. + * + * @param familyPhysician XmlString the family physician element to set + */ public void xsetFamilyPhysician(final XmlString familyPhysician) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PregnancyHistoryImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PregnancyHistoryImpl.java index db8bf0660ec..4431d639433 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PregnancyHistoryImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PregnancyHistoryImpl.java @@ -13,6 +13,27 @@ import ca.openosp.openo.ar2005.PregnancyHistory; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the PregnancyHistory interface for the BC Antenatal Record (AR2005) form. + * + * This class provides XML binding implementation for storing and managing pregnancy history information + * in the British Columbia Antenatal Record system. It captures critical obstetric data including: + *
      + *
    • Last Menstrual Period (LMP) and menstrual cycle information
    • + *
    • Contraceptive use history
    • + *
    • Estimated Delivery Date (EDB) calculations using various dating methods
    • + *
    • Gravidity and parity information (GTPAL - Gravida, Term, Premature, Abortuses, Living)
    • + *
    + * + * The implementation extends Apache XMLBeans XmlComplexContentImpl to provide XML serialization + * and deserialization capabilities for the AR2005 schema. All methods are thread-safe through + * synchronization on the internal monitor object. + * + * @see ca.openosp.openo.ar2005.PregnancyHistory + * @see ca.openosp.openo.ar2005.DatingMethods + * @see ca.openosp.openo.ar2005.YesNoNullType + * @since 2026-01-24 + */ public class PregnancyHistoryImpl extends XmlComplexContentImpl implements PregnancyHistory { private static final long serialVersionUID = 1L; @@ -30,11 +51,24 @@ public class PregnancyHistoryImpl extends XmlComplexContentImpl implements Pregn private static final QName PREMATURE$22; private static final QName ABORTUSES$24; private static final QName LIVING$26; - + + /** + * Constructs a new PregnancyHistoryImpl instance with the specified schema type. + * + * @param sType SchemaType the XML schema type definition for this pregnancy history element + */ public PregnancyHistoryImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the Last Menstrual Period (LMP) date. + * + * The LMP is a critical date in obstetric care used to calculate gestational age + * and estimated delivery date. This method is thread-safe through internal synchronization. + * + * @return Calendar the last menstrual period date, or null if not set + */ public Calendar getLMP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -46,7 +80,15 @@ public Calendar getLMP() { return target.getCalendarValue(); } } - + + /** + * Gets the Last Menstrual Period (LMP) date as an XmlDate object. + * + * This method provides access to the XML representation of the LMP date, + * allowing for XML-specific operations and metadata access. + * + * @return XmlDate the XML representation of the last menstrual period date, or null if not set + */ public XmlDate xgetLMP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -55,7 +97,15 @@ public XmlDate xgetLMP() { return target; } } - + + /** + * Checks if the Last Menstrual Period (LMP) date is explicitly set to nil. + * + * In XML schema, nil indicates that the element exists but has no value (different from + * not being set at all). This is useful for distinguishing between "unknown" and "not applicable". + * + * @return boolean true if the LMP is explicitly nil, false otherwise + */ public boolean isNilLMP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -64,7 +114,15 @@ public boolean isNilLMP() { return target != null && target.isNil(); } } - + + /** + * Sets the Last Menstrual Period (LMP) date. + * + * This method stores the LMP date which is fundamental for calculating gestational age + * and estimated delivery date in obstetric care. + * + * @param lmp Calendar the last menstrual period date to set + */ public void setLMP(final Calendar lmp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -76,7 +134,15 @@ public void setLMP(final Calendar lmp) { target.setCalendarValue(lmp); } } - + + /** + * Sets the Last Menstrual Period (LMP) date using an XmlDate object. + * + * This method allows setting the LMP using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param lmp XmlDate the XML representation of the last menstrual period date to set + */ public void xsetLMP(final XmlDate lmp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -88,7 +154,14 @@ public void xsetLMP(final XmlDate lmp) { target.set((XmlObject)lmp); } } - + + /** + * Sets the Last Menstrual Period (LMP) date to nil. + * + * This method explicitly marks the LMP as having no value, which is semantically + * different from not setting it at all. Useful for indicating "not applicable" or + * "intentionally blank" states. + */ public void setNilLMP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -100,7 +173,15 @@ public void setNilLMP() { target.setNil(); } } - + + /** + * Gets the certainty status of the Last Menstrual Period (LMP) date. + * + * This information is clinically important as it affects the reliability of + * gestational age calculations and estimated delivery dates based on LMP. + * + * @return YesNoNullType the certainty status (Yes/No/Null), or null if not set + */ public YesNoNullType getLMPCertain() { synchronized (this.monitor()) { this.check_orphaned(); @@ -112,7 +193,15 @@ public YesNoNullType getLMPCertain() { return target; } } - + + /** + * Sets the certainty status of the Last Menstrual Period (LMP) date. + * + * Recording LMP certainty helps healthcare providers assess the reliability of + * menstrual dating and determine whether additional dating methods are needed. + * + * @param lmpCertain YesNoNullType the certainty status to set (Yes/No/Null) + */ public void setLMPCertain(final YesNoNullType lmpCertain) { synchronized (this.monitor()) { this.check_orphaned(); @@ -124,7 +213,15 @@ public void setLMPCertain(final YesNoNullType lmpCertain) { target.set((XmlObject)lmpCertain); } } - + + /** + * Creates and adds a new LMPCertain element to the XML structure. + * + * This factory method creates a new YesNoNullType instance for storing LMP certainty + * and adds it to the XML document tree. + * + * @return YesNoNullType the newly created LMP certainty element + */ public YesNoNullType addNewLMPCertain() { synchronized (this.monitor()) { this.check_orphaned(); @@ -133,7 +230,15 @@ public YesNoNullType addNewLMPCertain() { return target; } } - + + /** + * Gets the menstrual cycle length information. + * + * The menstrual cycle length (typically recorded in days) is used in conjunction with + * the LMP to calculate gestational age and estimated delivery dates. + * + * @return String the menstrual cycle length, or null if not set + */ public String getMenCycle() { synchronized (this.monitor()) { this.check_orphaned(); @@ -145,7 +250,14 @@ public String getMenCycle() { return target.getStringValue(); } } - + + /** + * Gets the menstrual cycle length as an XmlString object. + * + * This method provides access to the XML representation of the menstrual cycle length. + * + * @return XmlString the XML representation of the menstrual cycle length, or null if not set + */ public XmlString xgetMenCycle() { synchronized (this.monitor()) { this.check_orphaned(); @@ -154,7 +266,15 @@ public XmlString xgetMenCycle() { return target; } } - + + /** + * Sets the menstrual cycle length. + * + * This value (typically in days) is important for accurate gestational age calculation, + * especially when the cycle deviates from the standard 28-day assumption. + * + * @param menCycle String the menstrual cycle length to set + */ public void setMenCycle(final String menCycle) { synchronized (this.monitor()) { this.check_orphaned(); @@ -166,7 +286,15 @@ public void setMenCycle(final String menCycle) { target.setStringValue(menCycle); } } - + + /** + * Sets the menstrual cycle length using an XmlString object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param menCycle XmlString the XML representation of the menstrual cycle length to set + */ public void xsetMenCycle(final XmlString menCycle) { synchronized (this.monitor()) { this.check_orphaned(); @@ -178,7 +306,15 @@ public void xsetMenCycle(final XmlString menCycle) { target.set((XmlObject)menCycle); } } - + + /** + * Gets the regularity status of the menstrual cycle. + * + * Menstrual cycle regularity affects the reliability of LMP-based dating. + * Irregular cycles may indicate the need for ultrasound dating. + * + * @return YesNoNullType the regularity status (Yes/No/Null), or null if not set + */ public YesNoNullType getMenCycleRegular() { synchronized (this.monitor()) { this.check_orphaned(); @@ -190,7 +326,15 @@ public YesNoNullType getMenCycleRegular() { return target; } } - + + /** + * Sets the regularity status of the menstrual cycle. + * + * Recording whether cycles are regular helps assess the accuracy of menstrual dating + * and guides decisions about additional dating methods. + * + * @param menCycleRegular YesNoNullType the regularity status to set (Yes/No/Null) + */ public void setMenCycleRegular(final YesNoNullType menCycleRegular) { synchronized (this.monitor()) { this.check_orphaned(); @@ -202,7 +346,15 @@ public void setMenCycleRegular(final YesNoNullType menCycleRegular) { target.set((XmlObject)menCycleRegular); } } - + + /** + * Creates and adds a new MenCycleRegular element to the XML structure. + * + * This factory method creates a new YesNoNullType instance for storing menstrual + * cycle regularity status and adds it to the XML document tree. + * + * @return YesNoNullType the newly created menstrual cycle regularity element + */ public YesNoNullType addNewMenCycleRegular() { synchronized (this.monitor()) { this.check_orphaned(); @@ -211,7 +363,15 @@ public YesNoNullType addNewMenCycleRegular() { return target; } } - + + /** + * Gets the type of contraception previously used. + * + * Contraceptive history is relevant for pregnancy dating and risk assessment, + * particularly for hormonal contraceptives that may affect cycle regularity. + * + * @return String the contraceptive type, or null if not set + */ public String getContraceptiveType() { synchronized (this.monitor()) { this.check_orphaned(); @@ -223,7 +383,14 @@ public String getContraceptiveType() { return target.getStringValue(); } } - + + /** + * Gets the contraceptive type as an XmlString object. + * + * This method provides access to the XML representation of the contraceptive type. + * + * @return XmlString the XML representation of the contraceptive type, or null if not set + */ public XmlString xgetContraceptiveType() { synchronized (this.monitor()) { this.check_orphaned(); @@ -232,14 +399,27 @@ public XmlString xgetContraceptiveType() { return target; } } - + + /** + * Checks if the contraceptive type has been set. + * + * @return boolean true if contraceptive type is set, false otherwise + */ public boolean isSetContraceptiveType() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(PregnancyHistoryImpl.CONTRACEPTIVETYPE$8) != 0; } } - + + /** + * Sets the type of contraception previously used. + * + * This information is important for understanding conception timing and assessing + * any potential effects on early pregnancy. + * + * @param contraceptiveType String the contraceptive type to set + */ public void setContraceptiveType(final String contraceptiveType) { synchronized (this.monitor()) { this.check_orphaned(); @@ -251,7 +431,15 @@ public void setContraceptiveType(final String contraceptiveType) { target.setStringValue(contraceptiveType); } } - + + /** + * Sets the contraceptive type using an XmlString object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param contraceptiveType XmlString the XML representation of the contraceptive type to set + */ public void xsetContraceptiveType(final XmlString contraceptiveType) { synchronized (this.monitor()) { this.check_orphaned(); @@ -263,14 +451,28 @@ public void xsetContraceptiveType(final XmlString contraceptiveType) { target.set((XmlObject)contraceptiveType); } } - + + /** + * Removes the contraceptive type element from the XML structure. + * + * This method completely removes the contraceptive type element, which is + * different from setting it to null or empty. + */ public void unsetContraceptiveType() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(PregnancyHistoryImpl.CONTRACEPTIVETYPE$8, 0); } } - + + /** + * Gets the date when contraception was last used. + * + * This date is relevant for understanding the timing of conception and assessing + * any potential effects of recent contraceptive use on the pregnancy. + * + * @return Calendar the date contraception was last used, or null if not set + */ public Calendar getContraceptiveLastUsed() { synchronized (this.monitor()) { this.check_orphaned(); @@ -282,7 +484,14 @@ public Calendar getContraceptiveLastUsed() { return target.getCalendarValue(); } } - + + /** + * Gets the contraceptive last used date as an XmlDate object. + * + * This method provides access to the XML representation of the date. + * + * @return XmlDate the XML representation of the contraceptive last used date, or null if not set + */ public XmlDate xgetContraceptiveLastUsed() { synchronized (this.monitor()) { this.check_orphaned(); @@ -291,7 +500,12 @@ public XmlDate xgetContraceptiveLastUsed() { return target; } } - + + /** + * Checks if the contraceptive last used date is explicitly set to nil. + * + * @return boolean true if the date is explicitly nil, false otherwise + */ public boolean isNilContraceptiveLastUsed() { synchronized (this.monitor()) { this.check_orphaned(); @@ -300,7 +514,15 @@ public boolean isNilContraceptiveLastUsed() { return target != null && target.isNil(); } } - + + /** + * Sets the date when contraception was last used. + * + * This information helps healthcare providers understand the conception timeline + * and assess any potential implications for the pregnancy. + * + * @param contraceptiveLastUsed Calendar the date contraception was last used + */ public void setContraceptiveLastUsed(final Calendar contraceptiveLastUsed) { synchronized (this.monitor()) { this.check_orphaned(); @@ -312,7 +534,15 @@ public void setContraceptiveLastUsed(final Calendar contraceptiveLastUsed) { target.setCalendarValue(contraceptiveLastUsed); } } - + + /** + * Sets the contraceptive last used date using an XmlDate object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param contraceptiveLastUsed XmlDate the XML representation of the contraceptive last used date + */ public void xsetContraceptiveLastUsed(final XmlDate contraceptiveLastUsed) { synchronized (this.monitor()) { this.check_orphaned(); @@ -324,7 +554,12 @@ public void xsetContraceptiveLastUsed(final XmlDate contraceptiveLastUsed) { target.set((XmlObject)contraceptiveLastUsed); } } - + + /** + * Sets the contraceptive last used date to nil. + * + * This method explicitly marks the date as having no value. + */ public void setNilContraceptiveLastUsed() { synchronized (this.monitor()) { this.check_orphaned(); @@ -336,7 +571,15 @@ public void setNilContraceptiveLastUsed() { target.setNil(); } } - + + /** + * Gets the Estimated Date of Birth (EDB) calculated using menstrual dating. + * + * This EDB is calculated from the LMP and menstrual cycle information using + * Naegele's rule or similar menstrual-based calculations. + * + * @return Calendar the menstrual EDB, or null if not set + */ public Calendar getMenstrualEDB() { synchronized (this.monitor()) { this.check_orphaned(); @@ -348,7 +591,14 @@ public Calendar getMenstrualEDB() { return target.getCalendarValue(); } } - + + /** + * Gets the menstrual EDB as an XmlDate object. + * + * This method provides access to the XML representation of the menstrual EDB. + * + * @return XmlDate the XML representation of the menstrual EDB, or null if not set + */ public XmlDate xgetMenstrualEDB() { synchronized (this.monitor()) { this.check_orphaned(); @@ -357,7 +607,12 @@ public XmlDate xgetMenstrualEDB() { return target; } } - + + /** + * Checks if the menstrual EDB is explicitly set to nil. + * + * @return boolean true if the menstrual EDB is explicitly nil, false otherwise + */ public boolean isNilMenstrualEDB() { synchronized (this.monitor()) { this.check_orphaned(); @@ -366,7 +621,15 @@ public boolean isNilMenstrualEDB() { return target != null && target.isNil(); } } - + + /** + * Sets the Estimated Date of Birth (EDB) calculated using menstrual dating. + * + * This EDB serves as one of several dating methods that may be used to determine + * the final EDB for the pregnancy. + * + * @param menstrualEDB Calendar the menstrual EDB to set + */ public void setMenstrualEDB(final Calendar menstrualEDB) { synchronized (this.monitor()) { this.check_orphaned(); @@ -378,7 +641,15 @@ public void setMenstrualEDB(final Calendar menstrualEDB) { target.setCalendarValue(menstrualEDB); } } - + + /** + * Sets the menstrual EDB using an XmlDate object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param menstrualEDB XmlDate the XML representation of the menstrual EDB to set + */ public void xsetMenstrualEDB(final XmlDate menstrualEDB) { synchronized (this.monitor()) { this.check_orphaned(); @@ -390,7 +661,12 @@ public void xsetMenstrualEDB(final XmlDate menstrualEDB) { target.set((XmlObject)menstrualEDB); } } - + + /** + * Sets the menstrual EDB to nil. + * + * This method explicitly marks the menstrual EDB as having no value. + */ public void setNilMenstrualEDB() { synchronized (this.monitor()) { this.check_orphaned(); @@ -402,7 +678,16 @@ public void setNilMenstrualEDB() { target.setNil(); } } - + + /** + * Gets the final Estimated Date of Birth (EDB) for the pregnancy. + * + * The final EDB is determined by the healthcare provider based on all available dating + * methods (menstrual dating, ultrasound measurements, clinical examination) and represents + * the official due date used for pregnancy management. + * + * @return Calendar the final EDB, or null if not set + */ public Calendar getFinalEDB() { synchronized (this.monitor()) { this.check_orphaned(); @@ -414,7 +699,14 @@ public Calendar getFinalEDB() { return target.getCalendarValue(); } } - + + /** + * Gets the final EDB as an XmlDate object. + * + * This method provides access to the XML representation of the final EDB. + * + * @return XmlDate the XML representation of the final EDB, or null if not set + */ public XmlDate xgetFinalEDB() { synchronized (this.monitor()) { this.check_orphaned(); @@ -423,7 +715,15 @@ public XmlDate xgetFinalEDB() { return target; } } - + + /** + * Sets the final Estimated Date of Birth (EDB) for the pregnancy. + * + * This is the clinically determined due date used for all pregnancy management + * decisions and is based on the most reliable dating information available. + * + * @param finalEDB Calendar the final EDB to set + */ public void setFinalEDB(final Calendar finalEDB) { synchronized (this.monitor()) { this.check_orphaned(); @@ -435,7 +735,15 @@ public void setFinalEDB(final Calendar finalEDB) { target.setCalendarValue(finalEDB); } } - + + /** + * Sets the final EDB using an XmlDate object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param finalEDB XmlDate the XML representation of the final EDB to set + */ public void xsetFinalEDB(final XmlDate finalEDB) { synchronized (this.monitor()) { this.check_orphaned(); @@ -447,7 +755,16 @@ public void xsetFinalEDB(final XmlDate finalEDB) { target.set((XmlObject)finalEDB); } } - + + /** + * Gets the dating methods used to determine gestational age and EDB. + * + * Multiple dating methods may be used in obstetric care, including menstrual dating, + * ultrasound measurements, and clinical examination. This element documents which + * methods were employed. + * + * @return DatingMethods the dating methods information, or null if not set + */ public DatingMethods getDatingMethods() { synchronized (this.monitor()) { this.check_orphaned(); @@ -459,7 +776,15 @@ public DatingMethods getDatingMethods() { return target; } } - + + /** + * Sets the dating methods used to determine gestational age and EDB. + * + * Documenting the dating methods provides important context for understanding + * the reliability and basis of the estimated due date. + * + * @param datingMethods DatingMethods the dating methods information to set + */ public void setDatingMethods(final DatingMethods datingMethods) { synchronized (this.monitor()) { this.check_orphaned(); @@ -471,7 +796,15 @@ public void setDatingMethods(final DatingMethods datingMethods) { target.set((XmlObject)datingMethods); } } - + + /** + * Creates and adds a new DatingMethods element to the XML structure. + * + * This factory method creates a new DatingMethods instance and adds it to the + * XML document tree for recording pregnancy dating information. + * + * @return DatingMethods the newly created dating methods element + */ public DatingMethods addNewDatingMethods() { synchronized (this.monitor()) { this.check_orphaned(); @@ -480,7 +813,16 @@ public DatingMethods addNewDatingMethods() { return target; } } - + + /** + * Gets the gravida count (total number of pregnancies). + * + * Gravida is the first component of the GTPAL system for recording obstetric history. + * It represents the total number of times the patient has been pregnant, including + * the current pregnancy. + * + * @return int the gravida count, or 0 if not set + */ public int getGravida() { synchronized (this.monitor()) { this.check_orphaned(); @@ -492,7 +834,14 @@ public int getGravida() { return target.getIntValue(); } } - + + /** + * Gets the gravida count as an XmlInt object. + * + * This method provides access to the XML representation of the gravida count. + * + * @return XmlInt the XML representation of the gravida count, or null if not set + */ public XmlInt xgetGravida() { synchronized (this.monitor()) { this.check_orphaned(); @@ -501,7 +850,14 @@ public XmlInt xgetGravida() { return target; } } - + + /** + * Sets the gravida count (total number of pregnancies). + * + * This value is fundamental to obstetric risk assessment and care planning. + * + * @param gravida int the gravida count to set + */ public void setGravida(final int gravida) { synchronized (this.monitor()) { this.check_orphaned(); @@ -513,7 +869,15 @@ public void setGravida(final int gravida) { target.setIntValue(gravida); } } - + + /** + * Sets the gravida count using an XmlInt object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param gravida XmlInt the XML representation of the gravida count to set + */ public void xsetGravida(final XmlInt gravida) { synchronized (this.monitor()) { this.check_orphaned(); @@ -525,7 +889,15 @@ public void xsetGravida(final XmlInt gravida) { target.set((XmlObject)gravida); } } - + + /** + * Gets the count of term pregnancies (delivered at or after 37 weeks gestation). + * + * Term is the second component of the GTPAL system. It represents the number of + * pregnancies that reached full term and resulted in delivery. + * + * @return int the term pregnancy count, or 0 if not set + */ public int getTerm() { synchronized (this.monitor()) { this.check_orphaned(); @@ -537,7 +909,14 @@ public int getTerm() { return target.getIntValue(); } } - + + /** + * Gets the term pregnancy count as an XmlInt object. + * + * This method provides access to the XML representation of the term count. + * + * @return XmlInt the XML representation of the term pregnancy count, or null if not set + */ public XmlInt xgetTerm() { synchronized (this.monitor()) { this.check_orphaned(); @@ -546,7 +925,14 @@ public XmlInt xgetTerm() { return target; } } - + + /** + * Sets the count of term pregnancies. + * + * This information is important for assessing obstetric risk and previous pregnancy outcomes. + * + * @param term int the term pregnancy count to set + */ public void setTerm(final int term) { synchronized (this.monitor()) { this.check_orphaned(); @@ -558,7 +944,15 @@ public void setTerm(final int term) { target.setIntValue(term); } } - + + /** + * Sets the term pregnancy count using an XmlInt object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param term XmlInt the XML representation of the term pregnancy count to set + */ public void xsetTerm(final XmlInt term) { synchronized (this.monitor()) { this.check_orphaned(); @@ -570,7 +964,15 @@ public void xsetTerm(final XmlInt term) { target.set((XmlObject)term); } } - + + /** + * Gets the count of premature deliveries (before 37 weeks gestation). + * + * Premature is the third component of the GTPAL system. It represents the number of + * pregnancies that resulted in premature birth. + * + * @return int the premature delivery count, or 0 if not set + */ public int getPremature() { synchronized (this.monitor()) { this.check_orphaned(); @@ -582,7 +984,14 @@ public int getPremature() { return target.getIntValue(); } } - + + /** + * Gets the premature delivery count as an XmlInt object. + * + * This method provides access to the XML representation of the premature delivery count. + * + * @return XmlInt the XML representation of the premature delivery count, or null if not set + */ public XmlInt xgetPremature() { synchronized (this.monitor()) { this.check_orphaned(); @@ -591,7 +1000,15 @@ public XmlInt xgetPremature() { return target; } } - + + /** + * Sets the count of premature deliveries. + * + * History of premature delivery is a significant risk factor for preterm birth in + * subsequent pregnancies and affects care planning. + * + * @param premature int the premature delivery count to set + */ public void setPremature(final int premature) { synchronized (this.monitor()) { this.check_orphaned(); @@ -603,7 +1020,15 @@ public void setPremature(final int premature) { target.setIntValue(premature); } } - + + /** + * Sets the premature delivery count using an XmlInt object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param premature XmlInt the XML representation of the premature delivery count to set + */ public void xsetPremature(final XmlInt premature) { synchronized (this.monitor()) { this.check_orphaned(); @@ -615,7 +1040,15 @@ public void xsetPremature(final XmlInt premature) { target.set((XmlObject)premature); } } - + + /** + * Gets the count of abortuses (miscarriages and induced abortions). + * + * Abortuses is the fourth component of the GTPAL system. It represents the total number + * of pregnancy losses before viability, including both spontaneous and induced abortions. + * + * @return int the abortus count, or 0 if not set + */ public int getAbortuses() { synchronized (this.monitor()) { this.check_orphaned(); @@ -627,7 +1060,14 @@ public int getAbortuses() { return target.getIntValue(); } } - + + /** + * Gets the abortus count as an XmlInt object. + * + * This method provides access to the XML representation of the abortus count. + * + * @return XmlInt the XML representation of the abortus count, or null if not set + */ public XmlInt xgetAbortuses() { synchronized (this.monitor()) { this.check_orphaned(); @@ -636,7 +1076,15 @@ public XmlInt xgetAbortuses() { return target; } } - + + /** + * Sets the count of abortuses. + * + * This information is important for assessing pregnancy risk, particularly for + * recurrent pregnancy loss and related complications. + * + * @param abortuses int the abortus count to set + */ public void setAbortuses(final int abortuses) { synchronized (this.monitor()) { this.check_orphaned(); @@ -648,7 +1096,15 @@ public void setAbortuses(final int abortuses) { target.setIntValue(abortuses); } } - + + /** + * Sets the abortus count using an XmlInt object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param abortuses XmlInt the XML representation of the abortus count to set + */ public void xsetAbortuses(final XmlInt abortuses) { synchronized (this.monitor()) { this.check_orphaned(); @@ -660,7 +1116,15 @@ public void xsetAbortuses(final XmlInt abortuses) { target.set((XmlObject)abortuses); } } - + + /** + * Gets the count of living children. + * + * Living is the fifth component of the GTPAL system. It represents the number of + * children currently living from all previous pregnancies. + * + * @return int the living children count, or 0 if not set + */ public int getLiving() { synchronized (this.monitor()) { this.check_orphaned(); @@ -672,7 +1136,14 @@ public int getLiving() { return target.getIntValue(); } } - + + /** + * Gets the living children count as an XmlInt object. + * + * This method provides access to the XML representation of the living children count. + * + * @return XmlInt the XML representation of the living children count, or null if not set + */ public XmlInt xgetLiving() { synchronized (this.monitor()) { this.check_orphaned(); @@ -681,7 +1152,15 @@ public XmlInt xgetLiving() { return target; } } - + + /** + * Sets the count of living children. + * + * This completes the GTPAL obstetric history documentation and provides important + * context for family planning and pregnancy care. + * + * @param living int the living children count to set + */ public void setLiving(final int living) { synchronized (this.monitor()) { this.check_orphaned(); @@ -693,7 +1172,15 @@ public void setLiving(final int living) { target.setIntValue(living); } } - + + /** + * Sets the living children count using an XmlInt object. + * + * This method allows setting the value using the XML representation, preserving + * XML-specific metadata and attributes. + * + * @param living XmlInt the XML representation of the living children count to set + */ public void xsetLiving(final XmlInt living) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PrenatalGeneticScreeningTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PrenatalGeneticScreeningTypeImpl.java index 677dc0dc397..ece3e9f1ba6 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PrenatalGeneticScreeningTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PrenatalGeneticScreeningTypeImpl.java @@ -10,6 +10,36 @@ import ca.openosp.openo.ar2005.PrenatalGeneticScreeningType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for prenatal genetic screening data management in the British Columbia Antenatal Record (BCAR) system. + * + *

    This class provides XML-based persistence for prenatal genetic screening test results and patient decisions + * within the AR2005 (Antenatal Record 2005) form. It manages multiple types of genetic screening tests commonly + * performed during pregnancy to assess risk for chromosomal abnormalities and neural tube defects.

    + * + *

    Healthcare Context:

    + *
      + *
    • MSS/IPS/FTS: Maternal Serum Screening / Integrated Prenatal Screening / First Trimester Screening + * - Combined tests that assess risk for Down syndrome and other chromosomal abnormalities
    • + *
    • EDB/CVS: Early Detection of Birth Defects / Chorionic Villus Sampling + * - Invasive diagnostic procedures for definitive chromosomal analysis
    • + *
    • MSAFP: Maternal Serum Alpha-Fetoprotein + * - Screening test for neural tube defects and other abnormalities
    • + *
    • Custom Lab: Additional laboratory investigations specific to patient needs
    • + *
    • Declined: Patient choice to decline genetic screening
    • + *
    + * + *

    This implementation extends Apache XMLBeans {@link XmlComplexContentImpl} to provide thread-safe + * XML serialization and deserialization capabilities for integration with BC's provincial health systems.

    + * + *

    Thread Safety: All public methods are synchronized using the XMLBeans monitor pattern + * to ensure safe concurrent access in multi-threaded healthcare applications.

    + * + * @since 2026-01-24 + * @see PrenatalGeneticScreeningType + * @see CustomLab + * @see ca.openosp.openo.ar2005.AR1 + */ public class PrenatalGeneticScreeningTypeImpl extends XmlComplexContentImpl implements PrenatalGeneticScreeningType { private static final long serialVersionUID = 1L; @@ -18,11 +48,34 @@ public class PrenatalGeneticScreeningTypeImpl extends XmlComplexContentImpl impl private static final QName MSAFP$4; private static final QName CUSTOMLAB1$6; private static final QName DECLINED$8; - + + /** + * Constructs a new PrenatalGeneticScreeningTypeImpl instance with the specified schema type. + * + *

    This constructor is typically invoked by the Apache XMLBeans framework during XML parsing + * and object instantiation. It initializes the underlying XML store with the appropriate schema + * definition for prenatal genetic screening data.

    + * + * @param sType SchemaType the XMLBeans schema type definition for this complex type + */ public PrenatalGeneticScreeningTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the MSS/IPS/FTS screening test result value. + * + *

    MSS/IPS/FTS represents combined prenatal screening tests: + *

      + *
    • MSS: Maternal Serum Screening
    • + *
    • IPS: Integrated Prenatal Screening
    • + *
    • FTS: First Trimester Screening
    • + *
    + * These tests assess the risk of chromosomal abnormalities such as Down syndrome (Trisomy 21), + * Edwards syndrome (Trisomy 18), and neural tube defects.

    + * + * @return String the test result value, or null if not set + */ public String getMSSIPSFTS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -34,7 +87,15 @@ public String getMSSIPSFTS() { return target.getStringValue(); } } - + + /** + * Gets the MSS/IPS/FTS screening test result as an XMLBeans XmlString object. + * + *

    This method provides access to the underlying XMLBeans representation, allowing for + * advanced XML manipulation and schema validation operations.

    + * + * @return XmlString the XMLBeans representation of the test result, or null if not set + */ public XmlString xgetMSSIPSFTS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -43,7 +104,16 @@ public XmlString xgetMSSIPSFTS() { return target; } } - + + /** + * Sets the MSS/IPS/FTS screening test result value. + * + *

    Stores the result or status of combined prenatal screening tests. The value typically + * represents test results, risk assessment scores, or completion status as defined by + * provincial healthcare protocols.

    + * + * @param mssipsfts String the test result value to set + */ public void setMSSIPSFTS(final String mssipsfts) { synchronized (this.monitor()) { this.check_orphaned(); @@ -55,7 +125,15 @@ public void setMSSIPSFTS(final String mssipsfts) { target.setStringValue(mssipsfts); } } - + + /** + * Sets the MSS/IPS/FTS screening test result using an XMLBeans XmlString object. + * + *

    This method accepts the XMLBeans representation directly, useful when working with + * pre-validated XML content or performing complex schema operations.

    + * + * @param mssipsfts XmlString the XMLBeans representation of the test result + */ public void xsetMSSIPSFTS(final XmlString mssipsfts) { synchronized (this.monitor()) { this.check_orphaned(); @@ -67,7 +145,21 @@ public void xsetMSSIPSFTS(final XmlString mssipsfts) { target.set((XmlObject)mssipsfts); } } - + + /** + * Gets the EDB/CVS diagnostic test result value. + * + *

    EDB/CVS represents invasive prenatal diagnostic procedures: + *

      + *
    • EDB: Early Detection of Birth Defects
    • + *
    • CVS: Chorionic Villus Sampling
    • + *
    + * These are invasive diagnostic tests performed to obtain fetal cells for chromosomal analysis, + * providing definitive diagnosis rather than risk assessment. CVS is typically performed between + * 10-13 weeks of gestation.

    + * + * @return String the diagnostic test result value, or null if not set + */ public String getEDBCVS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -79,7 +171,15 @@ public String getEDBCVS() { return target.getStringValue(); } } - + + /** + * Gets the EDB/CVS diagnostic test result as an XMLBeans XmlString object. + * + *

    This method provides access to the underlying XMLBeans representation for advanced + * XML operations and schema validation.

    + * + * @return XmlString the XMLBeans representation of the diagnostic test result, or null if not set + */ public XmlString xgetEDBCVS() { synchronized (this.monitor()) { this.check_orphaned(); @@ -88,7 +188,15 @@ public XmlString xgetEDBCVS() { return target; } } - + + /** + * Sets the EDB/CVS diagnostic test result value. + * + *

    Stores the result or status of invasive prenatal diagnostic procedures. The value typically + * represents test results, karyotype findings, or procedure completion status.

    + * + * @param edbcvs String the diagnostic test result value to set + */ public void setEDBCVS(final String edbcvs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -100,7 +208,15 @@ public void setEDBCVS(final String edbcvs) { target.setStringValue(edbcvs); } } - + + /** + * Sets the EDB/CVS diagnostic test result using an XMLBeans XmlString object. + * + *

    This method accepts the XMLBeans representation directly for use with pre-validated + * XML content or complex schema operations.

    + * + * @param edbcvs XmlString the XMLBeans representation of the diagnostic test result + */ public void xsetEDBCVS(final XmlString edbcvs) { synchronized (this.monitor()) { this.check_orphaned(); @@ -112,7 +228,22 @@ public void xsetEDBCVS(final XmlString edbcvs) { target.set((XmlObject)edbcvs); } } - + + /** + * Gets the MSAFP screening test result value. + * + *

    MSAFP (Maternal Serum Alpha-Fetoprotein) is a prenatal screening test that measures the level + * of alpha-fetoprotein in the mother's blood. This test is primarily used to screen for: + *

      + *
    • Neural tube defects (spina bifida, anencephaly)
    • + *
    • Abdominal wall defects
    • + *
    • Chromosomal abnormalities when combined with other markers
    • + *
    + * Elevated or decreased levels may indicate potential fetal abnormalities and typically prompt + * further diagnostic testing such as ultrasound or amniocentesis.

    + * + * @return String the MSAFP test result value, or null if not set + */ public String getMSAFP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -124,7 +255,15 @@ public String getMSAFP() { return target.getStringValue(); } } - + + /** + * Gets the MSAFP screening test result as an XMLBeans XmlString object. + * + *

    This method provides access to the underlying XMLBeans representation for advanced + * XML operations and schema validation.

    + * + * @return XmlString the XMLBeans representation of the MSAFP test result, or null if not set + */ public XmlString xgetMSAFP() { synchronized (this.monitor()) { this.check_orphaned(); @@ -133,7 +272,15 @@ public XmlString xgetMSAFP() { return target; } } - + + /** + * Sets the MSAFP screening test result value. + * + *

    Stores the result or status of the Maternal Serum Alpha-Fetoprotein screening test. + * The value typically represents test results, AFP levels, risk assessment, or completion status.

    + * + * @param msafp String the MSAFP test result value to set + */ public void setMSAFP(final String msafp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -145,7 +292,15 @@ public void setMSAFP(final String msafp) { target.setStringValue(msafp); } } - + + /** + * Sets the MSAFP screening test result using an XMLBeans XmlString object. + * + *

    This method accepts the XMLBeans representation directly for use with pre-validated + * XML content or complex schema operations.

    + * + * @param msafp XmlString the XMLBeans representation of the MSAFP test result + */ public void xsetMSAFP(final XmlString msafp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -157,7 +312,24 @@ public void xsetMSAFP(final XmlString msafp) { target.set((XmlObject)msafp); } } - + + /** + * Gets the custom laboratory investigation entry. + * + *

    This field allows for documentation of additional prenatal genetic screening tests + * that are not covered by the standard MSS/IPS/FTS, EDB/CVS, or MSAFP categories. This + * flexibility accommodates:

    + *
      + *
    • Emerging genetic screening technologies
    • + *
    • Specialized tests for specific genetic conditions
    • + *
    • Province-specific or institution-specific screening protocols
    • + *
    • Cell-free DNA testing (NIPT)
    • + *
    • Carrier screening for genetic disorders
    • + *
    + * + * @return CustomLab the custom laboratory investigation details, or null if not set + * @see CustomLab + */ public CustomLab getCustomLab1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -169,7 +341,17 @@ public CustomLab getCustomLab1() { return target; } } - + + /** + * Sets the custom laboratory investigation entry. + * + *

    Stores details of additional prenatal genetic screening tests beyond the standard + * screening categories. This allows healthcare providers to document any relevant genetic + * testing performed during prenatal care.

    + * + * @param customLab1 CustomLab the custom laboratory investigation details to set + * @see CustomLab + */ public void setCustomLab1(final CustomLab customLab1) { synchronized (this.monitor()) { this.check_orphaned(); @@ -181,7 +363,17 @@ public void setCustomLab1(final CustomLab customLab1) { target.set((XmlObject)customLab1); } } - + + /** + * Adds and returns a new custom laboratory investigation entry. + * + *

    Creates a new {@link CustomLab} element in the XML structure and returns it for + * immediate population with test details. This method is typically used when building + * new prenatal genetic screening records programmatically.

    + * + * @return CustomLab the newly created custom laboratory investigation object + * @see CustomLab + */ public CustomLab addNewCustomLab1() { synchronized (this.monitor()) { this.check_orphaned(); @@ -190,7 +382,25 @@ public CustomLab addNewCustomLab1() { return target; } } - + + /** + * Gets the declined status indicating whether the patient has refused prenatal genetic screening. + * + *

    This field documents informed patient choice regarding prenatal genetic screening. In accordance + * with patient autonomy principles and healthcare ethics, pregnant patients have the right to decline + * any or all prenatal genetic screening tests after being provided with appropriate counseling about + * the benefits, limitations, and implications of testing.

    + * + *

    Clinical Significance: Documentation of declined screening is important for: + *

      + *
    • Legal protection for healthcare providers
    • + *
    • Demonstrating informed consent was obtained
    • + *
    • Continuity of care documentation
    • + *
    • Quality assurance and healthcare reporting
    • + *

    + * + * @return boolean true if prenatal genetic screening was declined by the patient, false otherwise + */ public boolean getDeclined() { synchronized (this.monitor()) { this.check_orphaned(); @@ -199,7 +409,15 @@ public boolean getDeclined() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the declined status as an XMLBeans XmlBoolean object. + * + *

    This method provides access to the underlying XMLBeans representation for advanced + * XML operations and schema validation.

    + * + * @return XmlBoolean the XMLBeans representation of the declined status, or null if not set + */ public XmlBoolean xgetDeclined() { synchronized (this.monitor()) { this.check_orphaned(); @@ -208,7 +426,16 @@ public XmlBoolean xgetDeclined() { return target; } } - + + /** + * Sets the declined status indicating whether the patient has refused prenatal genetic screening. + * + *

    This should be set to true when a patient makes an informed decision to decline any or all + * prenatal genetic screening after appropriate counseling. Documentation should include evidence + * that informed consent discussions occurred.

    + * + * @param declined boolean true to indicate screening was declined, false otherwise + */ public void setDeclined(final boolean declined) { synchronized (this.monitor()) { this.check_orphaned(); @@ -220,7 +447,15 @@ public void setDeclined(final boolean declined) { target.setBooleanValue(declined); } } - + + /** + * Sets the declined status using an XMLBeans XmlBoolean object. + * + *

    This method accepts the XMLBeans representation directly for use with pre-validated + * XML content or complex schema operations.

    + * + * @param declined XmlBoolean the XMLBeans representation of the declined status + */ public void xsetDeclined(final XmlBoolean declined) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/PsychosocialTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/PsychosocialTypeImpl.java index 3e0fe1bf4ce..13c2c44a5a0 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/PsychosocialTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/PsychosocialTypeImpl.java @@ -7,6 +7,37 @@ import ca.openosp.openo.ar2005.PsychosocialType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of the PsychosocialType interface for AR2005 (Antenatal Record 2005) forms. + * + *

    This class provides XML binding functionality for psychosocial assessment data collected + * during prenatal care. It manages seven key psychosocial risk factors that may impact maternal + * and fetal health outcomes:

    + *
      + *
    • Poor social support networks
    • + *
    • Relationship problems or domestic issues
    • + *
    • Emotional depression or mood disorders
    • + *
    • Substance abuse (alcohol, drugs, tobacco)
    • + *
    • Family violence or safety concerns
    • + *
    • Parenting concerns or lack of preparation
    • + *
    • Religious or cultural considerations
    • + *
    + * + *

    Each psychosocial factor is represented as a Yes/No/Null value, allowing healthcare providers + * to document presence, absence, or non-assessment of each factor. This data is critical for: + * identifying high-risk pregnancies, coordinating appropriate social services, and ensuring + * comprehensive prenatal care that addresses both medical and psychosocial needs.

    + * + *

    This implementation uses Apache XMLBeans for XML serialization/deserialization, providing + * thread-safe access to psychosocial assessment data through synchronized getter/setter methods. + * All operations are backed by the XMLBeans store mechanism, ensuring data integrity and proper + * XML schema validation according to the AR2005 specification.

    + * + * @since 2026-01-24 + * @see ca.openosp.openo.ar2005.PsychosocialType + * @see ca.openosp.openo.ar2005.YesNoNullType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + */ public class PsychosocialTypeImpl extends XmlComplexContentImpl implements PsychosocialType { private static final long serialVersionUID = 1L; @@ -17,11 +48,29 @@ public class PsychosocialTypeImpl extends XmlComplexContentImpl implements Psych private static final QName FAMILYVIOLENCE$8; private static final QName PARENTINGCONCERNS$10; private static final QName RELIGIOUSCULTURAL$12; - + + /** + * Constructs a new PsychosocialTypeImpl instance with the specified schema type. + * + *

    This constructor initializes the XMLBeans complex content implementation with the + * provided schema type, setting up the internal XML store for managing psychosocial + * assessment data elements.

    + * + * @param sType SchemaType the XML schema type definition for this psychosocial data element + */ public PsychosocialTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the poor social support assessment value. + * + *

    This method returns whether the patient has been identified as having poor or inadequate + * social support networks during pregnancy. Social support is a critical psychosocial factor + * that can impact maternal mental health, pregnancy outcomes, and postpartum adjustment.

    + * + * @return YesNoNullType the poor social support indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getPoortSocialSupport() { synchronized (this.monitor()) { this.check_orphaned(); @@ -33,7 +82,16 @@ public YesNoNullType getPoortSocialSupport() { return target; } } - + + /** + * Sets the poor social support assessment value. + * + *

    This method records whether the patient has been identified as having inadequate social + * support networks. Healthcare providers use this assessment to identify patients who may + * benefit from additional social services, support groups, or community resources.

    + * + * @param poortSocialSupport YesNoNullType the poor social support indicator to set (Yes/No/Null) + */ public void setPoortSocialSupport(final YesNoNullType poortSocialSupport) { synchronized (this.monitor()) { this.check_orphaned(); @@ -45,7 +103,16 @@ public void setPoortSocialSupport(final YesNoNullType poortSocialSupport) { target.set((XmlObject)poortSocialSupport); } } - + + /** + * Creates and adds a new poor social support assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * poor social support assessment. The returned object can be further configured with the + * appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new poor social support element ready for configuration + */ public YesNoNullType addNewPoortSocialSupport() { synchronized (this.monitor()) { this.check_orphaned(); @@ -54,7 +121,16 @@ public YesNoNullType addNewPoortSocialSupport() { return target; } } - + + /** + * Retrieves the relationship problems assessment value. + * + *

    This method returns whether the patient has disclosed relationship problems, partner + * conflict, or domestic issues during pregnancy. Relationship stress can significantly impact + * maternal well-being and may indicate need for counseling or intervention services.

    + * + * @return YesNoNullType the relationship problems indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getRelationshipProblems() { synchronized (this.monitor()) { this.check_orphaned(); @@ -66,7 +142,16 @@ public YesNoNullType getRelationshipProblems() { return target; } } - + + /** + * Sets the relationship problems assessment value. + * + *

    This method records whether the patient has reported relationship difficulties or partner + * conflict. Documentation of relationship problems helps care teams identify patients who may + * benefit from couples counseling, conflict resolution resources, or safety planning.

    + * + * @param relationshipProblems YesNoNullType the relationship problems indicator to set (Yes/No/Null) + */ public void setRelationshipProblems(final YesNoNullType relationshipProblems) { synchronized (this.monitor()) { this.check_orphaned(); @@ -78,7 +163,16 @@ public void setRelationshipProblems(final YesNoNullType relationshipProblems) { target.set((XmlObject)relationshipProblems); } } - + + /** + * Creates and adds a new relationship problems assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * relationship problems assessment. The returned object can be further configured with the + * appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new relationship problems element ready for configuration + */ public YesNoNullType addNewRelationshipProblems() { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +181,17 @@ public YesNoNullType addNewRelationshipProblems() { return target; } } - + + /** + * Retrieves the emotional depression assessment value. + * + *

    This method returns whether the patient has been assessed for or diagnosed with emotional + * depression or mood disorders during pregnancy. Perinatal depression is a significant health + * concern that affects both maternal well-being and pregnancy outcomes, requiring early + * identification and appropriate mental health intervention.

    + * + * @return YesNoNullType the emotional depression indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getEmotionalDepression() { synchronized (this.monitor()) { this.check_orphaned(); @@ -99,7 +203,16 @@ public YesNoNullType getEmotionalDepression() { return target; } } - + + /** + * Sets the emotional depression assessment value. + * + *

    This method records whether the patient has been screened for or diagnosed with emotional + * depression or mood disorders. Documentation supports appropriate referral to mental health + * services, monitoring for postpartum depression risk, and coordination of comprehensive care.

    + * + * @param emotionalDepression YesNoNullType the emotional depression indicator to set (Yes/No/Null) + */ public void setEmotionalDepression(final YesNoNullType emotionalDepression) { synchronized (this.monitor()) { this.check_orphaned(); @@ -111,7 +224,16 @@ public void setEmotionalDepression(final YesNoNullType emotionalDepression) { target.set((XmlObject)emotionalDepression); } } - + + /** + * Creates and adds a new emotional depression assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * emotional depression assessment. The returned object can be further configured with the + * appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new emotional depression element ready for configuration + */ public YesNoNullType addNewEmotionalDepression() { synchronized (this.monitor()) { this.check_orphaned(); @@ -120,7 +242,17 @@ public YesNoNullType addNewEmotionalDepression() { return target; } } - + + /** + * Retrieves the substance abuse assessment value. + * + *

    This method returns whether the patient has been identified as having substance abuse + * issues, including alcohol, illicit drugs, or tobacco use during pregnancy. Substance use + * during pregnancy is a critical risk factor that can significantly impact fetal development + * and requires immediate intervention and support services.

    + * + * @return YesNoNullType the substance abuse indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getSubstanceAbuse() { synchronized (this.monitor()) { this.check_orphaned(); @@ -132,7 +264,16 @@ public YesNoNullType getSubstanceAbuse() { return target; } } - + + /** + * Sets the substance abuse assessment value. + * + *

    This method records whether the patient has been screened for or disclosed substance use + * including alcohol, drugs, or tobacco. Documentation enables appropriate referral to addiction + * services, increased monitoring for fetal complications, and coordination of specialized care.

    + * + * @param substanceAbuse YesNoNullType the substance abuse indicator to set (Yes/No/Null) + */ public void setSubstanceAbuse(final YesNoNullType substanceAbuse) { synchronized (this.monitor()) { this.check_orphaned(); @@ -144,7 +285,16 @@ public void setSubstanceAbuse(final YesNoNullType substanceAbuse) { target.set((XmlObject)substanceAbuse); } } - + + /** + * Creates and adds a new substance abuse assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * substance abuse assessment. The returned object can be further configured with the + * appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new substance abuse element ready for configuration + */ public YesNoNullType addNewSubstanceAbuse() { synchronized (this.monitor()) { this.check_orphaned(); @@ -153,7 +303,17 @@ public YesNoNullType addNewSubstanceAbuse() { return target; } } - + + /** + * Retrieves the family violence assessment value. + * + *

    This method returns whether the patient has disclosed or been identified as experiencing + * family violence, domestic abuse, or safety concerns. Family violence is a critical risk + * factor during pregnancy that requires immediate safety assessment, intervention planning, + * and coordination with protective services.

    + * + * @return YesNoNullType the family violence indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getFamilyViolence() { synchronized (this.monitor()) { this.check_orphaned(); @@ -165,7 +325,16 @@ public YesNoNullType getFamilyViolence() { return target; } } - + + /** + * Sets the family violence assessment value. + * + *

    This method records whether the patient has reported experiencing family violence or + * domestic abuse. Documentation is essential for safety planning, connecting patients with + * protective services, and ensuring appropriate follow-up care in a safe environment.

    + * + * @param familyViolence YesNoNullType the family violence indicator to set (Yes/No/Null) + */ public void setFamilyViolence(final YesNoNullType familyViolence) { synchronized (this.monitor()) { this.check_orphaned(); @@ -177,7 +346,16 @@ public void setFamilyViolence(final YesNoNullType familyViolence) { target.set((XmlObject)familyViolence); } } - + + /** + * Creates and adds a new family violence assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * family violence assessment. The returned object can be further configured with the + * appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new family violence element ready for configuration + */ public YesNoNullType addNewFamilyViolence() { synchronized (this.monitor()) { this.check_orphaned(); @@ -186,7 +364,17 @@ public YesNoNullType addNewFamilyViolence() { return target; } } - + + /** + * Retrieves the parenting concerns assessment value. + * + *

    This method returns whether the patient has expressed concerns about parenting readiness, + * parenting skills, or preparation for the transition to parenthood. Identifying parenting + * concerns enables healthcare providers to offer prenatal education, parenting classes, and + * supportive resources to promote positive parent-child relationships.

    + * + * @return YesNoNullType the parenting concerns indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getParentingConcerns() { synchronized (this.monitor()) { this.check_orphaned(); @@ -198,7 +386,16 @@ public YesNoNullType getParentingConcerns() { return target; } } - + + /** + * Sets the parenting concerns assessment value. + * + *

    This method records whether the patient has reported concerns about parenting or lack of + * preparation for childcare responsibilities. Documentation supports referral to prenatal + * classes, parenting support groups, and educational resources to build parenting confidence.

    + * + * @param parentingConcerns YesNoNullType the parenting concerns indicator to set (Yes/No/Null) + */ public void setParentingConcerns(final YesNoNullType parentingConcerns) { synchronized (this.monitor()) { this.check_orphaned(); @@ -210,7 +407,16 @@ public void setParentingConcerns(final YesNoNullType parentingConcerns) { target.set((XmlObject)parentingConcerns); } } - + + /** + * Creates and adds a new parenting concerns assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * parenting concerns assessment. The returned object can be further configured with the + * appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new parenting concerns element ready for configuration + */ public YesNoNullType addNewParentingConcerns() { synchronized (this.monitor()) { this.check_orphaned(); @@ -219,7 +425,17 @@ public YesNoNullType addNewParentingConcerns() { return target; } } - + + /** + * Retrieves the religious or cultural considerations assessment value. + * + *

    This method returns whether the patient has identified religious or cultural factors that + * may impact pregnancy care, birth preferences, or healthcare decision-making. Understanding + * religious and cultural beliefs enables providers to deliver culturally competent, + * patient-centered care that respects individual values and traditions.

    + * + * @return YesNoNullType the religious/cultural considerations indicator (Yes/No/Null), or null if not set + */ public YesNoNullType getReligiousCultural() { synchronized (this.monitor()) { this.check_orphaned(); @@ -231,7 +447,17 @@ public YesNoNullType getReligiousCultural() { return target; } } - + + /** + * Sets the religious or cultural considerations assessment value. + * + *

    This method records whether the patient has religious or cultural beliefs that should be + * considered in care planning. Documentation ensures that care teams are aware of and can + * accommodate religious practices, cultural traditions, and specific preferences during + * pregnancy, labor, delivery, and postpartum care.

    + * + * @param religiousCultural YesNoNullType the religious/cultural considerations indicator to set (Yes/No/Null) + */ public void setReligiousCultural(final YesNoNullType religiousCultural) { synchronized (this.monitor()) { this.check_orphaned(); @@ -243,7 +469,16 @@ public void setReligiousCultural(final YesNoNullType religiousCultural) { target.set((XmlObject)religiousCultural); } } - + + /** + * Creates and adds a new religious or cultural considerations assessment element. + * + *

    This method creates a new YesNoNullType element in the XML structure for recording + * religious or cultural considerations. The returned object can be further configured with + * the appropriate Yes/No/Null value.

    + * + * @return YesNoNullType a new religious/cultural considerations element ready for configuration + */ public YesNoNullType addNewReligiousCultural() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/RecommendedImmunoprophylaxisTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/RecommendedImmunoprophylaxisTypeImpl.java index 9fc0f1ea725..8b9a483c4cb 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/RecommendedImmunoprophylaxisTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/RecommendedImmunoprophylaxisTypeImpl.java @@ -10,6 +10,33 @@ import ca.openosp.openo.ar2005.RecommendedImmunoprophylaxisType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XML Bean implementation for recommended immunoprophylaxis tracking in antenatal care. + * + *

    This class implements the RecommendedImmunoprophylaxisType interface and provides + * XML binding functionality for storing and managing maternal immunoprophylaxis recommendations + * as part of the British Columbia Antenatal Record (BCAR) AR2005 form. It handles critical + * pregnancy-related immunoprophylaxis data including Rh immunoglobulin, rubella vaccination, + * and hepatitis B prophylaxis.

    + * + *

    The implementation extends Apache XMLBeans XmlComplexContentImpl to provide thread-safe + * XML serialization and deserialization capabilities. All accessor methods are synchronized + * to ensure data integrity in concurrent access scenarios.

    + * + *

    Healthcare Context: Immunoprophylaxis during pregnancy is critical for + * preventing maternal-fetal complications such as Rh disease, congenital rubella syndrome, + * and vertical transmission of hepatitis B virus. This class tracks:

    + *
      + *
    • Rh negative status and Rh immunoglobulin (RhIg) administration dates
    • + *
    • Rubella vaccination status and recommendations
    • + *
    • Newborn hepatitis B immunoglobulin (HepIG) recommendations
    • + *
    • Maternal hepatitis B vaccine administration
    • + *
    + * + * @see ca.openosp.openo.ar2005.RecommendedImmunoprophylaxisType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-23 + */ public class RecommendedImmunoprophylaxisTypeImpl extends XmlComplexContentImpl implements RecommendedImmunoprophylaxisType { private static final long serialVersionUID = 1L; @@ -18,11 +45,29 @@ public class RecommendedImmunoprophylaxisTypeImpl extends XmlComplexContentImpl private static final QName RUBELLA$4; private static final QName NEWBORNHEPIG$6; private static final QName HEPBVACCINE$8; - + + /** + * Constructs a new RecommendedImmunoprophylaxisTypeImpl instance with the specified schema type. + * + *

    This constructor is called by the XMLBeans framework during XML deserialization + * to create a properly typed instance bound to the AR2005 schema definition.

    + * + * @param sType SchemaType the XML schema type definition for this element + */ public RecommendedImmunoprophylaxisTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the Rh negative status flag. + * + *

    Indicates whether the mother has Rh negative blood type (D-negative). + * Rh negative mothers carrying Rh positive fetuses require Rh immunoglobulin (RhIg) + * prophylaxis to prevent maternal sensitization and hemolytic disease of the newborn + * in subsequent pregnancies.

    + * + * @return boolean true if the mother is Rh negative, false otherwise + */ public boolean getRhNegative() { synchronized (this.monitor()) { this.check_orphaned(); @@ -31,7 +76,15 @@ public boolean getRhNegative() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the Rh negative status as an XmlBoolean object. + * + *

    Provides access to the underlying XMLBeans representation of the boolean value, + * allowing for XML-specific operations and schema validation.

    + * + * @return XmlBoolean the XMLBeans object wrapping the Rh negative status, or null if not set + */ public XmlBoolean xgetRhNegative() { synchronized (this.monitor()) { this.check_orphaned(); @@ -40,7 +93,16 @@ public XmlBoolean xgetRhNegative() { return target; } } - + + /** + * Sets the Rh negative status flag. + * + *

    Records whether the mother has Rh negative blood type. This information + * is critical for determining the need for RhIg prophylaxis during pregnancy + * (typically at 28 weeks gestation) and within 72 hours postpartum.

    + * + * @param rhNegative boolean true if the mother is Rh negative, false otherwise + */ public void setRhNegative(final boolean rhNegative) { synchronized (this.monitor()) { this.check_orphaned(); @@ -52,7 +114,15 @@ public void setRhNegative(final boolean rhNegative) { target.setBooleanValue(rhNegative); } } - + + /** + * Sets the Rh negative status using an XmlBoolean object. + * + *

    Allows setting the value using the XMLBeans representation, preserving + * XML schema metadata and validation constraints.

    + * + * @param rhNegative XmlBoolean the XMLBeans object containing the Rh negative status + */ public void xsetRhNegative(final XmlBoolean rhNegative) { synchronized (this.monitor()) { this.check_orphaned(); @@ -64,7 +134,17 @@ public void xsetRhNegative(final XmlBoolean rhNegative) { target.set((XmlObject)rhNegative); } } - + + /** + * Gets the date when Rh immunoglobulin (RhIg) was administered. + * + *

    Returns the date of RhIg administration for Rh negative mothers. Standard protocols + * recommend RhIg prophylaxis at 28 weeks gestation and within 72 hours after delivery + * of an Rh positive infant. Additional doses may be required after events that could + * cause fetomaternal hemorrhage (amniocentesis, trauma, bleeding).

    + * + * @return Calendar the date RhIg was given, or null if not administered or not set + */ public Calendar getRhIgGiven() { synchronized (this.monitor()) { this.check_orphaned(); @@ -76,7 +156,15 @@ public Calendar getRhIgGiven() { return target.getCalendarValue(); } } - + + /** + * Gets the RhIg administration date as an XmlDate object. + * + *

    Provides access to the underlying XMLBeans date representation, allowing + * for XML-specific operations and schema validation.

    + * + * @return XmlDate the XMLBeans date object, or null if not set + */ public XmlDate xgetRhIgGiven() { synchronized (this.monitor()) { this.check_orphaned(); @@ -85,7 +173,15 @@ public XmlDate xgetRhIgGiven() { return target; } } - + + /** + * Checks if the RhIg given date element is explicitly set to nil. + * + *

    In XML schema, a nil value indicates the element exists but is explicitly empty, + * which is semantically different from the element being absent or having a null value.

    + * + * @return boolean true if the date element is explicitly nil, false otherwise + */ public boolean isNilRhIgGiven() { synchronized (this.monitor()) { this.check_orphaned(); @@ -94,7 +190,16 @@ public boolean isNilRhIgGiven() { return target != null && target.isNil(); } } - + + /** + * Sets the date when Rh immunoglobulin (RhIg) was administered. + * + *

    Records the administration date for RhIg prophylaxis. This is a critical + * clinical data point for tracking compliance with prenatal care protocols and + * preventing Rh isoimmunization.

    + * + * @param rhIgGiven Calendar the date RhIg was administered, or null to clear the value + */ public void setRhIgGiven(final Calendar rhIgGiven) { synchronized (this.monitor()) { this.check_orphaned(); @@ -106,7 +211,15 @@ public void setRhIgGiven(final Calendar rhIgGiven) { target.setCalendarValue(rhIgGiven); } } - + + /** + * Sets the RhIg administration date using an XmlDate object. + * + *

    Allows setting the date using the XMLBeans representation, preserving + * XML schema metadata and validation constraints.

    + * + * @param rhIgGiven XmlDate the XMLBeans date object containing the administration date + */ public void xsetRhIgGiven(final XmlDate rhIgGiven) { synchronized (this.monitor()) { this.check_orphaned(); @@ -118,7 +231,13 @@ public void xsetRhIgGiven(final XmlDate rhIgGiven) { target.set((XmlObject)rhIgGiven); } } - + + /** + * Sets the RhIg given date element to nil. + * + *

    Explicitly marks the date element as nil in the XML document, indicating + * the data is intentionally empty or not applicable, distinct from being absent.

    + */ public void setNilRhIgGiven() { synchronized (this.monitor()) { this.check_orphaned(); @@ -130,7 +249,18 @@ public void setNilRhIgGiven() { target.setNil(); } } - + + /** + * Gets the rubella vaccination recommendation status. + * + *

    Indicates whether rubella vaccination is recommended for the mother. + * Rubella immunity is routinely screened during pregnancy. Non-immune women + * cannot receive the live attenuated vaccine during pregnancy but should be + * vaccinated immediately postpartum to prevent congenital rubella syndrome + * in future pregnancies.

    + * + * @return boolean true if rubella vaccination is recommended, false otherwise + */ public boolean getRubella() { synchronized (this.monitor()) { this.check_orphaned(); @@ -139,7 +269,15 @@ public boolean getRubella() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the rubella vaccination recommendation as an XmlBoolean object. + * + *

    Provides access to the underlying XMLBeans representation of the boolean value, + * allowing for XML-specific operations and schema validation.

    + * + * @return XmlBoolean the XMLBeans object wrapping the rubella vaccination recommendation, or null if not set + */ public XmlBoolean xgetRubella() { synchronized (this.monitor()) { this.check_orphaned(); @@ -148,7 +286,15 @@ public XmlBoolean xgetRubella() { return target; } } - + + /** + * Sets the rubella vaccination recommendation status. + * + *

    Records whether rubella vaccination is recommended for postpartum administration. + * This is typically set to true when prenatal screening shows non-immune status.

    + * + * @param rubella boolean true if rubella vaccination is recommended, false otherwise + */ public void setRubella(final boolean rubella) { synchronized (this.monitor()) { this.check_orphaned(); @@ -160,7 +306,15 @@ public void setRubella(final boolean rubella) { target.setBooleanValue(rubella); } } - + + /** + * Sets the rubella vaccination recommendation using an XmlBoolean object. + * + *

    Allows setting the value using the XMLBeans representation, preserving + * XML schema metadata and validation constraints.

    + * + * @param rubella XmlBoolean the XMLBeans object containing the rubella vaccination recommendation + */ public void xsetRubella(final XmlBoolean rubella) { synchronized (this.monitor()) { this.check_orphaned(); @@ -172,7 +326,17 @@ public void xsetRubella(final XmlBoolean rubella) { target.set((XmlObject)rubella); } } - + + /** + * Gets the newborn hepatitis B immunoglobulin (HepIG) recommendation status. + * + *

    Indicates whether hepatitis B immunoglobulin is recommended for the newborn. + * HepIG is administered to infants born to hepatitis B surface antigen (HBsAg) + * positive mothers within 12 hours of birth, combined with hepatitis B vaccine, + * to prevent vertical transmission of hepatitis B virus.

    + * + * @return boolean true if newborn HepIG is recommended, false otherwise + */ public boolean getNewbornHepIG() { synchronized (this.monitor()) { this.check_orphaned(); @@ -181,7 +345,15 @@ public boolean getNewbornHepIG() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the newborn HepIG recommendation as an XmlBoolean object. + * + *

    Provides access to the underlying XMLBeans representation of the boolean value, + * allowing for XML-specific operations and schema validation.

    + * + * @return XmlBoolean the XMLBeans object wrapping the newborn HepIG recommendation, or null if not set + */ public XmlBoolean xgetNewbornHepIG() { synchronized (this.monitor()) { this.check_orphaned(); @@ -190,7 +362,16 @@ public XmlBoolean xgetNewbornHepIG() { return target; } } - + + /** + * Sets the newborn hepatitis B immunoglobulin (HepIG) recommendation status. + * + *

    Records whether HepIG is recommended for the newborn. This is typically set + * to true when maternal hepatitis B screening indicates HBsAg positive status, + * requiring immediate postpartum prophylaxis for the infant.

    + * + * @param newbornHepIG boolean true if newborn HepIG is recommended, false otherwise + */ public void setNewbornHepIG(final boolean newbornHepIG) { synchronized (this.monitor()) { this.check_orphaned(); @@ -202,7 +383,15 @@ public void setNewbornHepIG(final boolean newbornHepIG) { target.setBooleanValue(newbornHepIG); } } - + + /** + * Sets the newborn HepIG recommendation using an XmlBoolean object. + * + *

    Allows setting the value using the XMLBeans representation, preserving + * XML schema metadata and validation constraints.

    + * + * @param newbornHepIG XmlBoolean the XMLBeans object containing the newborn HepIG recommendation + */ public void xsetNewbornHepIG(final XmlBoolean newbornHepIG) { synchronized (this.monitor()) { this.check_orphaned(); @@ -214,7 +403,17 @@ public void xsetNewbornHepIG(final XmlBoolean newbornHepIG) { target.set((XmlObject)newbornHepIG); } } - + + /** + * Gets the maternal hepatitis B vaccine recommendation status. + * + *

    Indicates whether hepatitis B vaccination is recommended for the mother. + * Hepatitis B vaccine can be safely administered during pregnancy to non-immune + * women, particularly those at high risk of infection. The vaccine series consists + * of three doses administered over 6 months.

    + * + * @return boolean true if maternal HepB vaccine is recommended, false otherwise + */ public boolean getHepBVaccine() { synchronized (this.monitor()) { this.check_orphaned(); @@ -223,7 +422,15 @@ public boolean getHepBVaccine() { return target != null && target.getBooleanValue(); } } - + + /** + * Gets the maternal HepB vaccine recommendation as an XmlBoolean object. + * + *

    Provides access to the underlying XMLBeans representation of the boolean value, + * allowing for XML-specific operations and schema validation.

    + * + * @return XmlBoolean the XMLBeans object wrapping the maternal HepB vaccine recommendation, or null if not set + */ public XmlBoolean xgetHepBVaccine() { synchronized (this.monitor()) { this.check_orphaned(); @@ -232,7 +439,15 @@ public XmlBoolean xgetHepBVaccine() { return target; } } - + + /** + * Sets the maternal hepatitis B vaccine recommendation status. + * + *

    Records whether hepatitis B vaccination is recommended for the mother during + * or after pregnancy. This is based on screening results and risk factor assessment.

    + * + * @param hepBVaccine boolean true if maternal HepB vaccine is recommended, false otherwise + */ public void setHepBVaccine(final boolean hepBVaccine) { synchronized (this.monitor()) { this.check_orphaned(); @@ -244,7 +459,15 @@ public void setHepBVaccine(final boolean hepBVaccine) { target.setBooleanValue(hepBVaccine); } } - + + /** + * Sets the maternal HepB vaccine recommendation using an XmlBoolean object. + * + *

    Allows setting the value using the XMLBeans representation, preserving + * XML schema metadata and validation constraints.

    + * + * @param hepBVaccine XmlBoolean the XMLBeans object containing the maternal HepB vaccine recommendation + */ public void xsetHepBVaccine(final XmlBoolean hepBVaccine) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/RiskFactorItemTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/RiskFactorItemTypeImpl.java index 4038c0c627c..19b93acb92d 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/RiskFactorItemTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/RiskFactorItemTypeImpl.java @@ -8,16 +8,51 @@ import ca.openosp.openo.ar2005.RiskFactorItemType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Apache XMLBeans implementation for AR2005 (Antenatal Record 2005) risk factor item type. + * + * This class provides the concrete implementation of the RiskFactorItemType interface, + * representing a patient risk factor and its associated plan of management in the context + * of antenatal care. The AR2005 standard is used for structured electronic antenatal + * records in Canadian healthcare settings. + * + * The implementation uses Apache XMLBeans for XML serialization/deserialization, + * providing both standard Java String accessors and XMLBeans-specific XmlString + * accessors for each property. All methods are thread-safe through synchronized + * access to the underlying XMLBeans store. + * + * @since 2026-01-24 + * @see RiskFactorItemType + * @see XmlComplexContentImpl + */ public class RiskFactorItemTypeImpl extends XmlComplexContentImpl implements RiskFactorItemType { private static final long serialVersionUID = 1L; private static final QName RISKFACTOR$0; private static final QName PLANOFMANAGEMENT$2; - + + /** + * Constructs a new RiskFactorItemTypeImpl with the specified schema type. + * + * This constructor initializes the XMLBeans implementation with the provided + * schema type definition, which defines the structure and validation rules + * for risk factor items in the AR2005 antenatal record format. + * + * @param sType SchemaType the schema type definition for this XML element + */ public RiskFactorItemTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Gets the risk factor description as a standard Java String. + * + * Retrieves the clinical risk factor identified during antenatal assessment + * (e.g., "gestational diabetes", "hypertension", "previous cesarean section"). + * This method provides thread-safe access to the underlying XML element value. + * + * @return String the risk factor description, or null if not set + */ public String getRiskFactor() { synchronized (this.monitor()) { this.check_orphaned(); @@ -29,7 +64,16 @@ public String getRiskFactor() { return target.getStringValue(); } } - + + /** + * Gets the risk factor description as an XMLBeans XmlString object. + * + * Provides low-level access to the risk factor element as an XmlString, + * which allows access to XML-specific metadata, attributes, and validation + * information not available through the standard String accessor. + * + * @return XmlString the risk factor as an XmlString object, or null if not set + */ public XmlString xgetRiskFactor() { synchronized (this.monitor()) { this.check_orphaned(); @@ -38,7 +82,16 @@ public XmlString xgetRiskFactor() { return target; } } - + + /** + * Sets the risk factor description from a standard Java String. + * + * Updates the clinical risk factor identified during antenatal assessment. + * If the element does not exist in the XML structure, it will be created. + * This method provides thread-safe write access to the underlying XML element. + * + * @param riskFactor String the risk factor description to set + */ public void setRiskFactor(final String riskFactor) { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +103,16 @@ public void setRiskFactor(final String riskFactor) { target.setStringValue(riskFactor); } } - + + /** + * Sets the risk factor description from an XMLBeans XmlString object. + * + * Provides low-level write access to the risk factor element using an XmlString, + * which preserves XML-specific metadata, attributes, and validation information. + * If the element does not exist in the XML structure, it will be created. + * + * @param riskFactor XmlString the risk factor as an XmlString object to set + */ public void xsetRiskFactor(final XmlString riskFactor) { synchronized (this.monitor()) { this.check_orphaned(); @@ -62,7 +124,17 @@ public void xsetRiskFactor(final XmlString riskFactor) { target.set((XmlObject)riskFactor); } } - + + /** + * Gets the plan of management as a standard Java String. + * + * Retrieves the clinical plan for managing the identified risk factor during + * pregnancy and delivery (e.g., "monitor blood glucose levels weekly", + * "scheduled cesarean section at 39 weeks", "refer to high-risk obstetrics"). + * This method provides thread-safe access to the underlying XML element value. + * + * @return String the plan of management description, or null if not set + */ public String getPlanOfManagement() { synchronized (this.monitor()) { this.check_orphaned(); @@ -74,7 +146,16 @@ public String getPlanOfManagement() { return target.getStringValue(); } } - + + /** + * Gets the plan of management as an XMLBeans XmlString object. + * + * Provides low-level access to the plan of management element as an XmlString, + * which allows access to XML-specific metadata, attributes, and validation + * information not available through the standard String accessor. + * + * @return XmlString the plan of management as an XmlString object, or null if not set + */ public XmlString xgetPlanOfManagement() { synchronized (this.monitor()) { this.check_orphaned(); @@ -83,7 +164,17 @@ public XmlString xgetPlanOfManagement() { return target; } } - + + /** + * Sets the plan of management from a standard Java String. + * + * Updates the clinical plan for managing the identified risk factor during + * pregnancy and delivery. If the element does not exist in the XML structure, + * it will be created. This method provides thread-safe write access to the + * underlying XML element. + * + * @param planOfManagement String the plan of management description to set + */ public void setPlanOfManagement(final String planOfManagement) { synchronized (this.monitor()) { this.check_orphaned(); @@ -95,7 +186,17 @@ public void setPlanOfManagement(final String planOfManagement) { target.setStringValue(planOfManagement); } } - + + /** + * Sets the plan of management from an XMLBeans XmlString object. + * + * Provides low-level write access to the plan of management element using + * an XmlString, which preserves XML-specific metadata, attributes, and + * validation information. If the element does not exist in the XML structure, + * it will be created. + * + * @param planOfManagement XmlString the plan of management as an XmlString object to set + */ public void xsetPlanOfManagement(final XmlString planOfManagement) { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/SignatureTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/SignatureTypeImpl.java index 65d063a56fd..1337df123c8 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/SignatureTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/SignatureTypeImpl.java @@ -10,6 +10,25 @@ import ca.openosp.openo.ar2005.SignatureType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation of SignatureType for AR2005 (Antenatal Record 2005) XML schema handling. + * + *

    This class provides the concrete implementation of the SignatureType interface, managing + * healthcare provider signatures and associated dates for medical documentation. The AR2005 + * standard is used in Canadian healthcare for antenatal records, supporting dual signature + * capabilities (primary and secondary) with corresponding date fields.

    + * + *

    The implementation extends Apache XMLBeans' XmlComplexContentImpl to provide XML + * serialization/deserialization capabilities for signature data, ensuring proper handling + * of healthcare documentation requirements including audit trails and compliance tracking.

    + * + *

    Thread Safety: All public methods are synchronized on the underlying XMLBeans monitor + * to ensure thread-safe access to the XML store.

    + * + * @see SignatureType + * @see org.apache.xmlbeans.impl.values.XmlComplexContentImpl + * @since 2026-01-23 + */ public class SignatureTypeImpl extends XmlComplexContentImpl implements SignatureType { private static final long serialVersionUID = 1L; @@ -17,11 +36,25 @@ public class SignatureTypeImpl extends XmlComplexContentImpl implements Signatur private static final QName DATE$2; private static final QName SIGNATURE2$4; private static final QName DATE2$6; - + + /** + * Constructs a new SignatureTypeImpl with the specified schema type. + * + * @param sType SchemaType the schema type definition for this signature element + */ public SignatureTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the primary signature value. + * + *

    Returns the string representation of the primary healthcare provider's signature. + * This is typically used to capture the electronic signature of the attending physician + * or primary care provider.

    + * + * @return String the primary signature value, or null if not set + */ public String getSignature() { synchronized (this.monitor()) { this.check_orphaned(); @@ -33,7 +66,15 @@ public String getSignature() { return target.getStringValue(); } } - + + /** + * Retrieves the primary signature as an XmlString object. + * + *

    Provides access to the underlying XMLBeans representation of the signature field, + * allowing for advanced XML manipulation and validation operations.

    + * + * @return XmlString the primary signature XML object, or null if not set + */ public XmlString xgetSignature() { synchronized (this.monitor()) { this.check_orphaned(); @@ -42,7 +83,15 @@ public XmlString xgetSignature() { return target; } } - + + /** + * Sets the primary signature value. + * + *

    Stores the electronic signature of the primary healthcare provider. This method + * creates the signature element if it doesn't exist, or updates it if already present.

    + * + * @param signature String the signature value to set + */ public void setSignature(final String signature) { synchronized (this.monitor()) { this.check_orphaned(); @@ -54,7 +103,15 @@ public void setSignature(final String signature) { target.setStringValue(signature); } } - + + /** + * Sets the primary signature using an XmlString object. + * + *

    Advanced setter method that accepts an XmlString for scenarios requiring + * detailed XML validation or when the signature comes from another XMLBeans object.

    + * + * @param signature XmlString the XML string object containing the signature value + */ public void xsetSignature(final XmlString signature) { synchronized (this.monitor()) { this.check_orphaned(); @@ -66,7 +123,15 @@ public void xsetSignature(final XmlString signature) { target.set((XmlObject)signature); } } - + + /** + * Retrieves the date associated with the primary signature. + * + *

    Returns the timestamp when the primary signature was captured, essential for + * audit trails and legal compliance in healthcare documentation.

    + * + * @return Calendar the date/time of the primary signature, or null if not set + */ public Calendar getDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -78,7 +143,15 @@ public Calendar getDate() { return target.getCalendarValue(); } } - + + /** + * Retrieves the primary signature date as an XmlDate object. + * + *

    Provides access to the underlying XMLBeans date representation for advanced + * date validation and XML manipulation operations.

    + * + * @return XmlDate the primary signature date XML object, or null if not set + */ public XmlDate xgetDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -87,7 +160,15 @@ public XmlDate xgetDate() { return target; } } - + + /** + * Sets the date associated with the primary signature. + * + *

    Records the timestamp when the primary healthcare provider signed the document. + * Creates the date element if it doesn't exist, or updates it if already present.

    + * + * @param date Calendar the date/time to associate with the primary signature + */ public void setDate(final Calendar date) { synchronized (this.monitor()) { this.check_orphaned(); @@ -99,7 +180,15 @@ public void setDate(final Calendar date) { target.setCalendarValue(date); } } - + + /** + * Sets the primary signature date using an XmlDate object. + * + *

    Advanced setter method for scenarios requiring detailed XML date validation + * or when the date comes from another XMLBeans object.

    + * + * @param date XmlDate the XML date object containing the signature date + */ public void xsetDate(final XmlDate date) { synchronized (this.monitor()) { this.check_orphaned(); @@ -111,7 +200,16 @@ public void xsetDate(final XmlDate date) { target.set((XmlObject)date); } } - + + /** + * Retrieves the secondary signature value. + * + *

    Returns the string representation of a secondary healthcare provider's signature. + * This optional field supports scenarios requiring co-signatures or witness signatures + * in medical documentation.

    + * + * @return String the secondary signature value, or null if not set + */ public String getSignature2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -123,7 +221,15 @@ public String getSignature2() { return target.getStringValue(); } } - + + /** + * Retrieves the secondary signature as an XmlString object. + * + *

    Provides access to the underlying XMLBeans representation of the secondary + * signature field for advanced XML operations.

    + * + * @return XmlString the secondary signature XML object, or null if not set + */ public XmlString xgetSignature2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -132,14 +238,31 @@ public XmlString xgetSignature2() { return target; } } - + + /** + * Checks whether the secondary signature field has been set. + * + *

    Useful for distinguishing between an explicitly null signature and one that + * has never been set, important for validation and compliance checking.

    + * + * @return boolean true if the secondary signature element exists, false otherwise + */ public boolean isSetSignature2() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(SignatureTypeImpl.SIGNATURE2$4) != 0; } } - + + /** + * Sets the secondary signature value. + * + *

    Stores the electronic signature of a secondary healthcare provider, supervisor, + * or witness. Creates the signature element if it doesn't exist, or updates it if + * already present.

    + * + * @param signature2 String the secondary signature value to set + */ public void setSignature2(final String signature2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -151,7 +274,15 @@ public void setSignature2(final String signature2) { target.setStringValue(signature2); } } - + + /** + * Sets the secondary signature using an XmlString object. + * + *

    Advanced setter method for XML-aware signature assignment with validation + * capabilities.

    + * + * @param signature2 XmlString the XML string object containing the secondary signature value + */ public void xsetSignature2(final XmlString signature2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -163,14 +294,28 @@ public void xsetSignature2(final XmlString signature2) { target.set((XmlObject)signature2); } } - + + /** + * Removes the secondary signature field. + * + *

    Completely removes the secondary signature element from the XML document, + * useful for scenarios where a co-signature is revoked or no longer applicable.

    + */ public void unsetSignature2() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(SignatureTypeImpl.SIGNATURE2$4, 0); } } - + + /** + * Retrieves the date associated with the secondary signature. + * + *

    Returns the timestamp when the secondary signature was captured, supporting + * audit requirements for co-signed medical documentation.

    + * + * @return Calendar the date/time of the secondary signature, or null if not set + */ public Calendar getDate2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -182,7 +327,15 @@ public Calendar getDate2() { return target.getCalendarValue(); } } - + + /** + * Retrieves the secondary signature date as an XmlDate object. + * + *

    Provides access to the underlying XMLBeans date representation for the + * secondary signature timestamp.

    + * + * @return XmlDate the secondary signature date XML object, or null if not set + */ public XmlDate xgetDate2() { synchronized (this.monitor()) { this.check_orphaned(); @@ -191,14 +344,30 @@ public XmlDate xgetDate2() { return target; } } - + + /** + * Checks whether the secondary signature date field has been set. + * + *

    Determines if the secondary signature date element exists in the XML document, + * essential for validation workflows.

    + * + * @return boolean true if the secondary signature date element exists, false otherwise + */ public boolean isSetDate2() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(SignatureTypeImpl.DATE2$6) != 0; } } - + + /** + * Sets the date associated with the secondary signature. + * + *

    Records the timestamp when the secondary healthcare provider signed the document. + * Creates the date element if it doesn't exist, or updates it if already present.

    + * + * @param date2 Calendar the date/time to associate with the secondary signature + */ public void setDate2(final Calendar date2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -210,7 +379,14 @@ public void setDate2(final Calendar date2) { target.setCalendarValue(date2); } } - + + /** + * Sets the secondary signature date using an XmlDate object. + * + *

    Advanced setter method for XML-aware date assignment with validation capabilities.

    + * + * @param date2 XmlDate the XML date object containing the secondary signature date + */ public void xsetDate2(final XmlDate date2) { synchronized (this.monitor()) { this.check_orphaned(); @@ -222,14 +398,19 @@ public void xsetDate2(final XmlDate date2) { target.set((XmlObject)date2); } } - + + /** + * Removes the secondary signature date field. + * + *

    Completely removes the secondary signature date element from the XML document.

    + */ public void unsetDate2() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(SignatureTypeImpl.DATE2$6, 0); } } - + static { SIGNATURE$0 = new QName("http://www.oscarmcmaster.org/AR2005", "signature"); DATE$2 = new QName("http://www.oscarmcmaster.org/AR2005", "date"); diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/SubsequentVisitItemTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/SubsequentVisitItemTypeImpl.java index 947ed2f3267..9533b2d43b9 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/SubsequentVisitItemTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/SubsequentVisitItemTypeImpl.java @@ -12,6 +12,47 @@ import ca.openosp.openo.ar2005.SubsequentVisitItemType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XMLBeans implementation class for subsequent prenatal visit data tracking in the AR2005 (Antenatal Record 2005) schema. + * + *

    This class provides a complete implementation for managing clinical data collected during routine prenatal + * follow-up appointments. It handles the storage and retrieval of essential obstetric measurements and assessments + * performed at each subsequent visit throughout the pregnancy, supporting comprehensive antenatal care documentation + * in compliance with Canadian healthcare standards.

    + * + *

    The class manages the following clinical data elements:

    + *
      + *
    • Visit Date - Calendar date of the prenatal appointment
    • + *
    • Gestational Age (GA) - Pregnancy duration at time of visit, typically in weeks+days format
    • + *
    • Weight - Maternal weight measurement in kilograms for tracking pregnancy weight gain
    • + *
    • Blood Pressure (BP) - Systolic/diastolic reading for monitoring hypertension and preeclampsia risk
    • + *
    • Urine Protein (UrinePR) - Protein level in urine sample, indicator for preeclampsia screening
    • + *
    • Urine Glucose (UrineGI) - Glucose level in urine sample for gestational diabetes monitoring
    • + *
    • Symphysis-Fundal Height (SFH) - Fundal height measurement in centimeters for fetal growth assessment
    • + *
    • Presentation/Position - Fetal presentation (cephalic, breech, transverse) and position in uterus
    • + *
    • FHR/FM - Fetal heart rate and fetal movements assessment
    • + *
    • Comments - Free-text clinical notes and observations from the visit
    • + *
    + * + *

    This implementation extends {@link XmlComplexContentImpl} to provide XMLBeans-based XML serialization + * and deserialization capabilities, allowing prenatal visit data to be stored, transmitted, and exchanged + * in standardized XML format for interoperability with other healthcare systems and electronic health records.

    + * + *

    Each data element supports both standard getters/setters and XMLBeans-specific xget/xset methods for + * type-safe XML manipulation. Many fields also support nil/null value handling to distinguish between + * "not measured" and "measured with zero/empty value" states.

    + * + *

    The class includes three inner implementation classes for schema-bound types:

    + *
      + *
    • {@link GaImpl} - String-based gestational age representation with schema validation
    • + *
    • {@link WeightImpl} - Float-based weight measurement with schema constraints
    • + *
    • {@link BpImpl} - String-based blood pressure format with validation rules
    • + *
    + * + * @see SubsequentVisitItemType + * @see XmlComplexContentImpl + * @since 2026-01-24 + */ public class SubsequentVisitItemTypeImpl extends XmlComplexContentImpl implements SubsequentVisitItemType { private static final long serialVersionUID = 1L; @@ -25,11 +66,29 @@ public class SubsequentVisitItemTypeImpl extends XmlComplexContentImpl implement private static final QName PRESENTATIONPOSITION$14; private static final QName FHRFM$16; private static final QName COMMENTS$18; - + + /** + * Constructs a new SubsequentVisitItemTypeImpl instance with the specified schema type. + * + *

    This constructor initializes the XMLBeans implementation object with the provided + * schema type definition, setting up the internal XML store for managing subsequent + * prenatal visit data elements according to the AR2005 schema specifications.

    + * + * @param sType SchemaType the schema type definition for this XML element + */ public SubsequentVisitItemTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the date of the prenatal visit. + * + *

    Returns the appointment date when this subsequent prenatal visit occurred. + * This date is essential for tracking the timeline of antenatal care and correlating + * clinical measurements with gestational age progression.

    + * + * @return Calendar the visit date, or null if not set + */ public Calendar getDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -41,7 +100,15 @@ public Calendar getDate() { return target.getCalendarValue(); } } - + + /** + * Retrieves the visit date as an XmlDate object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlDate representation, + * allowing for type-safe XML manipulation and schema validation of the date element.

    + * + * @return XmlDate the visit date as an XMLBeans date object, or null if not set + */ public XmlDate xgetDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -50,7 +117,16 @@ public XmlDate xgetDate() { return target; } } - + + /** + * Checks whether the visit date element is explicitly set to nil. + * + *

    Distinguishes between a date that is absent/not set and a date that is explicitly + * marked as nil in the XML representation, which can be semantically significant in + * some data exchange scenarios.

    + * + * @return boolean true if the date is explicitly nil, false otherwise + */ public boolean isNilDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -59,7 +135,16 @@ public boolean isNilDate() { return target != null && target.isNil(); } } - + + /** + * Sets the date of the prenatal visit. + * + *

    Records the appointment date when this subsequent prenatal visit occurred. + * This establishes the temporal context for all clinical measurements and observations + * documented in this visit record.

    + * + * @param date Calendar the visit date to set + */ public void setDate(final Calendar date) { synchronized (this.monitor()) { this.check_orphaned(); @@ -71,7 +156,16 @@ public void setDate(final Calendar date) { target.setCalendarValue(date); } } - + + /** + * Sets the visit date using an XmlDate object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlDate object, allowing for type-safe + * XML manipulation with schema validation. Useful when working directly with + * XML documents or performing schema-aware transformations.

    + * + * @param date XmlDate the visit date to set as an XMLBeans date object + */ public void xsetDate(final XmlDate date) { synchronized (this.monitor()) { this.check_orphaned(); @@ -83,7 +177,14 @@ public void xsetDate(final XmlDate date) { target.set((XmlObject)date); } } - + + /** + * Explicitly sets the visit date element to nil. + * + *

    Marks the date element as nil in the XML representation, which is semantically + * different from simply not setting a value. This can be used to explicitly indicate + * that the date information is intentionally absent or not applicable.

    + */ public void setNilDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -95,7 +196,16 @@ public void setNilDate() { target.setNil(); } } - + + /** + * Retrieves the gestational age (GA) at the time of visit. + * + *

    Returns the pregnancy duration typically expressed in weeks and days format (e.g., "28+3" + * for 28 weeks and 3 days). Gestational age is fundamental for assessing fetal development, + * determining appropriate screening tests, and identifying deviations from expected growth patterns.

    + * + * @return String the gestational age, or null if not recorded + */ public String getGa() { synchronized (this.monitor()) { this.check_orphaned(); @@ -107,7 +217,16 @@ public String getGa() { return target.getStringValue(); } } - + + /** + * Retrieves the gestational age as a schema-typed Ga object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans Ga type representation, + * allowing for schema validation and type-safe XML manipulation of the gestational + * age element.

    + * + * @return Ga the gestational age as a schema-typed object, or null if not set + */ public Ga xgetGa() { synchronized (this.monitor()) { this.check_orphaned(); @@ -116,7 +235,16 @@ public Ga xgetGa() { return target; } } - + + /** + * Sets the gestational age (GA) at the time of visit. + * + *

    Records the pregnancy duration, typically in weeks and days format. This value is + * critical for clinical decision-making, including timing of screening tests, assessment + * of fetal growth adequacy, and planning for delivery.

    + * + * @param ga String the gestational age to set (e.g., "28+3" for 28 weeks 3 days) + */ public void setGa(final String ga) { synchronized (this.monitor()) { this.check_orphaned(); @@ -128,7 +256,15 @@ public void setGa(final String ga) { target.setStringValue(ga); } } - + + /** + * Sets the gestational age using a schema-typed Ga object for XML-specific operations. + * + *

    This method accepts an XMLBeans Ga type object, enabling schema-validated assignment + * of the gestational age element. Useful for XML document manipulation with type safety.

    + * + * @param ga Ga the gestational age to set as a schema-typed object + */ public void xsetGa(final Ga ga) { synchronized (this.monitor()) { this.check_orphaned(); @@ -140,7 +276,17 @@ public void xsetGa(final Ga ga) { target.set((XmlObject)ga); } } - + + /** + * Retrieves the maternal weight measurement. + * + *

    Returns the weight in kilograms recorded at this prenatal visit. Weight tracking + * throughout pregnancy is essential for monitoring maternal health, assessing appropriate + * weight gain, and identifying potential complications such as inadequate nutrition or + * excessive fluid retention.

    + * + * @return float the maternal weight in kilograms, or 0.0 if not recorded + */ public float getWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -152,7 +298,15 @@ public float getWeight() { return target.getFloatValue(); } } - + + /** + * Retrieves the maternal weight as a schema-typed Weight object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans Weight type representation, + * allowing for schema validation and type-safe XML manipulation of the weight element.

    + * + * @return Weight the maternal weight as a schema-typed object, or null if not set + */ public Weight xgetWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -161,7 +315,16 @@ public Weight xgetWeight() { return target; } } - + + /** + * Checks whether the weight element is explicitly set to nil. + * + *

    Distinguishes between a weight that is absent/not measured and a weight that is + * explicitly marked as nil in the XML representation, which can be semantically significant + * in clinical data exchange.

    + * + * @return boolean true if the weight is explicitly nil, false otherwise + */ public boolean isNilWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -170,7 +333,16 @@ public boolean isNilWeight() { return target != null && target.isNil(); } } - + + /** + * Sets the maternal weight measurement. + * + *

    Records the weight in kilograms measured at this prenatal visit. This data point + * contributes to the longitudinal tracking of maternal weight gain throughout pregnancy, + * supporting clinical assessment and patient counseling.

    + * + * @param weight float the maternal weight in kilograms to set + */ public void setWeight(final float weight) { synchronized (this.monitor()) { this.check_orphaned(); @@ -182,7 +354,15 @@ public void setWeight(final float weight) { target.setFloatValue(weight); } } - + + /** + * Sets the maternal weight using a schema-typed Weight object for XML-specific operations. + * + *

    This method accepts an XMLBeans Weight type object, enabling schema-validated assignment + * of the weight element. Useful for XML document manipulation with type safety.

    + * + * @param weight Weight the maternal weight to set as a schema-typed object + */ public void xsetWeight(final Weight weight) { synchronized (this.monitor()) { this.check_orphaned(); @@ -194,7 +374,13 @@ public void xsetWeight(final Weight weight) { target.set((XmlObject)weight); } } - + + /** + * Explicitly sets the weight element to nil. + * + *

    Marks the weight element as nil in the XML representation, explicitly indicating + * that the weight measurement is intentionally absent or not applicable for this visit.

    + */ public void setNilWeight() { synchronized (this.monitor()) { this.check_orphaned(); @@ -206,7 +392,17 @@ public void setNilWeight() { target.setNil(); } } - + + /** + * Retrieves the blood pressure (BP) measurement. + * + *

    Returns the blood pressure reading typically formatted as "systolic/diastolic" (e.g., "120/80"). + * Blood pressure monitoring is critical during pregnancy for early detection of hypertensive disorders + * including gestational hypertension and preeclampsia, which can pose serious risks to both mother + * and fetus if not identified and managed promptly.

    + * + * @return String the blood pressure reading, or null if not recorded + */ public String getBp() { synchronized (this.monitor()) { this.check_orphaned(); @@ -218,7 +414,15 @@ public String getBp() { return target.getStringValue(); } } - + + /** + * Retrieves the blood pressure as a schema-typed Bp object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans Bp type representation, + * allowing for schema validation and type-safe XML manipulation of the blood pressure element.

    + * + * @return Bp the blood pressure as a schema-typed object, or null if not set + */ public Bp xgetBp() { synchronized (this.monitor()) { this.check_orphaned(); @@ -227,7 +431,16 @@ public Bp xgetBp() { return target; } } - + + /** + * Sets the blood pressure (BP) measurement. + * + *

    Records the blood pressure reading for this prenatal visit, typically in "systolic/diastolic" + * format. This vital sign is essential for ongoing maternal health surveillance and early detection + * of pregnancy-related hypertensive complications.

    + * + * @param bp String the blood pressure reading to set (e.g., "120/80") + */ public void setBp(final String bp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -239,7 +452,15 @@ public void setBp(final String bp) { target.setStringValue(bp); } } - + + /** + * Sets the blood pressure using a schema-typed Bp object for XML-specific operations. + * + *

    This method accepts an XMLBeans Bp type object, enabling schema-validated assignment + * of the blood pressure element. Useful for XML document manipulation with type safety.

    + * + * @param bp Bp the blood pressure to set as a schema-typed object + */ public void xsetBp(final Bp bp) { synchronized (this.monitor()) { this.check_orphaned(); @@ -251,7 +472,17 @@ public void xsetBp(final Bp bp) { target.set((XmlObject)bp); } } - + + /** + * Retrieves the urine protein (UrinePR) test result. + * + *

    Returns the protein level detected in the urine sample, typically reported as negative, + * trace, 1+, 2+, 3+, or 4+. Proteinuria is a key diagnostic marker for preeclampsia screening + * and monitoring, as elevated protein levels can indicate kidney dysfunction associated with + * this serious pregnancy complication.

    + * + * @return String the urine protein level, or null if not tested + */ public String getUrinePR() { synchronized (this.monitor()) { this.check_orphaned(); @@ -263,7 +494,15 @@ public String getUrinePR() { return target.getStringValue(); } } - + + /** + * Retrieves the urine protein as an XmlString object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlString representation, + * allowing for type-safe XML manipulation of the urine protein element.

    + * + * @return XmlString the urine protein level as an XMLBeans string object, or null if not set + */ public XmlString xgetUrinePR() { synchronized (this.monitor()) { this.check_orphaned(); @@ -272,7 +511,16 @@ public XmlString xgetUrinePR() { return target; } } - + + /** + * Sets the urine protein (UrinePR) test result. + * + *

    Records the protein level detected in the urine sample. This measurement is a standard + * component of prenatal screening for preeclampsia and other kidney-related complications + * during pregnancy.

    + * + * @param urinePR String the urine protein level to set (e.g., "negative", "trace", "1+", "2+") + */ public void setUrinePR(final String urinePR) { synchronized (this.monitor()) { this.check_orphaned(); @@ -284,7 +532,15 @@ public void setUrinePR(final String urinePR) { target.setStringValue(urinePR); } } - + + /** + * Sets the urine protein using an XmlString object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlString object, allowing for type-safe + * XML manipulation of the urine protein element.

    + * + * @param urinePR XmlString the urine protein level to set as an XMLBeans string object + */ public void xsetUrinePR(final XmlString urinePR) { synchronized (this.monitor()) { this.check_orphaned(); @@ -296,7 +552,17 @@ public void xsetUrinePR(final XmlString urinePR) { target.set((XmlObject)urinePR); } } - + + /** + * Retrieves the urine glucose (UrineGI) test result. + * + *

    Returns the glucose level detected in the urine sample, typically reported as negative + * or in gradations (trace, 1+, 2+, etc.). Glycosuria can indicate gestational diabetes or + * poor glycemic control in patients with pre-existing diabetes, warranting further assessment + * and management to prevent maternal and fetal complications.

    + * + * @return String the urine glucose level, or null if not tested + */ public String getUrineGI() { synchronized (this.monitor()) { this.check_orphaned(); @@ -308,7 +574,15 @@ public String getUrineGI() { return target.getStringValue(); } } - + + /** + * Retrieves the urine glucose as an XmlString object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlString representation, + * allowing for type-safe XML manipulation of the urine glucose element.

    + * + * @return XmlString the urine glucose level as an XMLBeans string object, or null if not set + */ public XmlString xgetUrineGI() { synchronized (this.monitor()) { this.check_orphaned(); @@ -317,7 +591,16 @@ public XmlString xgetUrineGI() { return target; } } - + + /** + * Sets the urine glucose (UrineGI) test result. + * + *

    Records the glucose level detected in the urine sample. This screening test helps + * identify patients who may require formal glucose tolerance testing for gestational + * diabetes diagnosis or monitoring of glycemic control in diabetic pregnancies.

    + * + * @param urineGI String the urine glucose level to set (e.g., "negative", "trace", "1+") + */ public void setUrineGI(final String urineGI) { synchronized (this.monitor()) { this.check_orphaned(); @@ -329,7 +612,15 @@ public void setUrineGI(final String urineGI) { target.setStringValue(urineGI); } } - + + /** + * Sets the urine glucose using an XmlString object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlString object, allowing for type-safe + * XML manipulation of the urine glucose element.

    + * + * @param urineGI XmlString the urine glucose level to set as an XMLBeans string object + */ public void xsetUrineGI(final XmlString urineGI) { synchronized (this.monitor()) { this.check_orphaned(); @@ -341,7 +632,18 @@ public void xsetUrineGI(final XmlString urineGI) { target.set((XmlObject)urineGI); } } - + + /** + * Retrieves the symphysis-fundal height (SFH) measurement. + * + *

    Returns the fundal height measurement in centimeters, representing the distance from + * the pubic symphysis to the top of the uterine fundus. This clinical measurement correlates + * with gestational age and is used to assess fetal growth adequacy. Deviations from expected + * values may indicate intrauterine growth restriction, macrosomia, polyhydramnios, or + * oligohydramnios requiring further investigation.

    + * + * @return String the symphysis-fundal height in centimeters, or null if not measured + */ public String getSFH() { synchronized (this.monitor()) { this.check_orphaned(); @@ -353,7 +655,15 @@ public String getSFH() { return target.getStringValue(); } } - + + /** + * Retrieves the symphysis-fundal height as an XmlString object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlString representation, + * allowing for type-safe XML manipulation of the SFH element.

    + * + * @return XmlString the symphysis-fundal height as an XMLBeans string object, or null if not set + */ public XmlString xgetSFH() { synchronized (this.monitor()) { this.check_orphaned(); @@ -362,7 +672,16 @@ public XmlString xgetSFH() { return target; } } - + + /** + * Sets the symphysis-fundal height (SFH) measurement. + * + *

    Records the fundal height measurement in centimeters. This value is plotted on growth + * charts to monitor fetal growth trends over time and identify potential abnormalities + * requiring ultrasound evaluation or other interventions.

    + * + * @param sfh String the symphysis-fundal height in centimeters to set + */ public void setSFH(final String sfh) { synchronized (this.monitor()) { this.check_orphaned(); @@ -374,7 +693,15 @@ public void setSFH(final String sfh) { target.setStringValue(sfh); } } - + + /** + * Sets the symphysis-fundal height using an XmlString object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlString object, allowing for type-safe + * XML manipulation of the SFH element.

    + * + * @param sfh XmlString the symphysis-fundal height to set as an XMLBeans string object + */ public void xsetSFH(final XmlString sfh) { synchronized (this.monitor()) { this.check_orphaned(); @@ -386,7 +713,17 @@ public void xsetSFH(final XmlString sfh) { target.set((XmlObject)sfh); } } - + + /** + * Retrieves the fetal presentation and position assessment. + * + *

    Returns the clinical determination of fetal presentation (cephalic/vertex, breech, + * transverse/oblique) and position within the uterus. This information becomes increasingly + * important in the third trimester for delivery planning, as non-cephalic presentations + * may require external cephalic version attempts or cesarean delivery.

    + * + * @return String the fetal presentation and position, or null if not assessed + */ public String getPresentationPosition() { synchronized (this.monitor()) { this.check_orphaned(); @@ -398,7 +735,15 @@ public String getPresentationPosition() { return target.getStringValue(); } } - + + /** + * Retrieves the fetal presentation/position as an XmlString object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlString representation, + * allowing for type-safe XML manipulation of the presentation/position element.

    + * + * @return XmlString the fetal presentation and position as an XMLBeans string object, or null if not set + */ public XmlString xgetPresentationPosition() { synchronized (this.monitor()) { this.check_orphaned(); @@ -407,7 +752,16 @@ public XmlString xgetPresentationPosition() { return target; } } - + + /** + * Sets the fetal presentation and position assessment. + * + *

    Records the clinical determination of how the fetus is oriented within the uterus. + * This assessment guides obstetric decision-making, particularly as term approaches, + * regarding the feasibility and safety of vaginal delivery.

    + * + * @param presentationPosition String the fetal presentation and position to set (e.g., "cephalic", "breech", "transverse") + */ public void setPresentationPosition(final String presentationPosition) { synchronized (this.monitor()) { this.check_orphaned(); @@ -419,7 +773,15 @@ public void setPresentationPosition(final String presentationPosition) { target.setStringValue(presentationPosition); } } - + + /** + * Sets the fetal presentation/position using an XmlString object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlString object, allowing for type-safe + * XML manipulation of the presentation/position element.

    + * + * @param presentationPosition XmlString the fetal presentation and position to set as an XMLBeans string object + */ public void xsetPresentationPosition(final XmlString presentationPosition) { synchronized (this.monitor()) { this.check_orphaned(); @@ -431,7 +793,18 @@ public void xsetPresentationPosition(final XmlString presentationPosition) { target.set((XmlObject)presentationPosition); } } - + + /** + * Retrieves the fetal heart rate (FHR) and fetal movements (Fm) assessment. + * + *

    Returns the documentation of fetal heart rate (typically 110-160 beats per minute in + * normal range) and maternal report or clinical observation of fetal movements. These vital + * signs of fetal well-being are assessed at each prenatal visit to ensure ongoing fetal + * health. Abnormal heart rates or decreased fetal movement may warrant additional testing + * such as non-stress testing or biophysical profile.

    + * + * @return String the fetal heart rate and movement assessment, or null if not documented + */ public String getFHRFm() { synchronized (this.monitor()) { this.check_orphaned(); @@ -443,7 +816,15 @@ public String getFHRFm() { return target.getStringValue(); } } - + + /** + * Retrieves the FHR/Fm as an XmlString object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlString representation, + * allowing for type-safe XML manipulation of the fetal heart rate/movements element.

    + * + * @return XmlString the fetal heart rate and movements as an XMLBeans string object, or null if not set + */ public XmlString xgetFHRFm() { synchronized (this.monitor()) { this.check_orphaned(); @@ -452,7 +833,16 @@ public XmlString xgetFHRFm() { return target; } } - + + /** + * Sets the fetal heart rate (FHR) and fetal movements (Fm) assessment. + * + *

    Records the fetal heart rate and movement observations from this prenatal visit. + * This documentation provides a longitudinal record of fetal well-being throughout + * the pregnancy and can be critical for identifying concerning trends.

    + * + * @param fhrFm String the fetal heart rate and movement assessment to set (e.g., "FHR 140 bpm, active movements") + */ public void setFHRFm(final String fhrFm) { synchronized (this.monitor()) { this.check_orphaned(); @@ -464,7 +854,15 @@ public void setFHRFm(final String fhrFm) { target.setStringValue(fhrFm); } } - + + /** + * Sets the FHR/Fm using an XmlString object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlString object, allowing for type-safe + * XML manipulation of the fetal heart rate/movements element.

    + * + * @param fhrFm XmlString the fetal heart rate and movements to set as an XMLBeans string object + */ public void xsetFHRFm(final XmlString fhrFm) { synchronized (this.monitor()) { this.check_orphaned(); @@ -476,7 +874,17 @@ public void xsetFHRFm(final XmlString fhrFm) { target.set((XmlObject)fhrFm); } } - + + /** + * Retrieves the clinical comments and observations from the visit. + * + *

    Returns free-text clinical notes documenting any additional findings, patient concerns, + * care plan discussions, or observations not captured in the structured data fields. This + * narrative component allows healthcare providers to record clinical context, patient education + * provided, and any issues requiring follow-up or special attention.

    + * + * @return String the clinical comments, or null if none recorded + */ public String getComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -488,7 +896,15 @@ public String getComments() { return target.getStringValue(); } } - + + /** + * Retrieves the comments as an XmlString object for XML-specific operations. + * + *

    This method provides access to the underlying XMLBeans XmlString representation, + * allowing for type-safe XML manipulation of the comments element.

    + * + * @return XmlString the clinical comments as an XMLBeans string object, or null if not set + */ public XmlString xgetComments() { synchronized (this.monitor()) { this.check_orphaned(); @@ -497,7 +913,16 @@ public XmlString xgetComments() { return target; } } - + + /** + * Sets the clinical comments and observations from the visit. + * + *

    Records free-text clinical notes to supplement the structured visit data. This allows + * documentation of nuanced clinical information, patient-provider discussions, and contextual + * details important for continuity of care.

    + * + * @param comments String the clinical comments to set + */ public void setComments(final String comments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -509,7 +934,15 @@ public void setComments(final String comments) { target.setStringValue(comments); } } - + + /** + * Sets the comments using an XmlString object for XML-specific operations. + * + *

    This method accepts an XMLBeans XmlString object, allowing for type-safe + * XML manipulation of the comments element.

    + * + * @param comments XmlString the clinical comments to set as an XMLBeans string object + */ public void xsetComments(final XmlString comments) { synchronized (this.monitor()) { this.check_orphaned(); @@ -534,41 +967,117 @@ public void xsetComments(final XmlString comments) { FHRFM$16 = new QName("http://www.oscarmcmaster.org/AR2005", "FHR_fm"); COMMENTS$18 = new QName("http://www.oscarmcmaster.org/AR2005", "comments"); } - + + /** + * Inner implementation class for the gestational age (GA) XML schema type. + * + *

    This class provides the XMLBeans implementation for the Ga schema type, extending + * {@link JavaStringHolderEx} to handle string-based gestational age values with schema + * validation. It supports the storage and retrieval of gestational age data in compliance + * with the AR2005 schema definitions.

    + * + * @see JavaStringHolderEx + * @see Ga + */ public static class GaImpl extends JavaStringHolderEx implements Ga { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new GaImpl instance with the specified schema type. + * + * @param sType SchemaType the schema type definition for this XML element + */ public GaImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new GaImpl instance with the specified schema type and mutability flag. + * + *

    This protected constructor allows subclasses to control the mutability of the + * XML value holder.

    + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean the mutability flag + */ protected GaImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the weight XML schema type. + * + *

    This class provides the XMLBeans implementation for the Weight schema type, extending + * {@link JavaFloatHolderEx} to handle floating-point weight values with schema validation. + * It supports the storage and retrieval of maternal weight measurements in kilograms, + * ensuring compliance with the AR2005 schema definitions and constraints.

    + * + * @see JavaFloatHolderEx + * @see Weight + */ public static class WeightImpl extends JavaFloatHolderEx implements Weight { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new WeightImpl instance with the specified schema type. + * + * @param sType SchemaType the schema type definition for this XML element + */ public WeightImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new WeightImpl instance with the specified schema type and mutability flag. + * + *

    This protected constructor allows subclasses to control the mutability of the + * XML value holder.

    + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean the mutability flag + */ protected WeightImpl(final SchemaType sType, final boolean b) { super(sType, b); } } - + + /** + * Inner implementation class for the blood pressure (BP) XML schema type. + * + *

    This class provides the XMLBeans implementation for the Bp schema type, extending + * {@link JavaStringHolderEx} to handle string-based blood pressure values with schema + * validation. It supports the storage and retrieval of blood pressure measurements in + * standard systolic/diastolic format (e.g., "120/80"), ensuring compliance with the + * AR2005 schema definitions.

    + * + * @see JavaStringHolderEx + * @see Bp + */ public static class BpImpl extends JavaStringHolderEx implements Bp { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new BpImpl instance with the specified schema type. + * + * @param sType SchemaType the schema type definition for this XML element + */ public BpImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new BpImpl instance with the specified schema type and mutability flag. + * + *

    This protected constructor allows subclasses to control the mutability of the + * XML value holder.

    + * + * @param sType SchemaType the schema type definition for this XML element + * @param b boolean the mutability flag + */ protected BpImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/UltrasoundTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/UltrasoundTypeImpl.java index 2ea3ac7dd3c..cb613ae5b1a 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/UltrasoundTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/UltrasoundTypeImpl.java @@ -11,6 +11,28 @@ import ca.openosp.openo.ar2005.UltrasoundType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * XMLBeans implementation class for ultrasound examination data in prenatal care records. + * + *

    This class provides the concrete implementation of the {@link UltrasoundType} interface, + * managing ultrasound examination data as part of the AR2005 (Antenatal Record 2005) healthcare + * form used in British Columbia prenatal care. It handles the storage and retrieval of ultrasound + * examination dates, gestational age (GA) assessments, and clinical results through an XML-based + * data structure.

    + * + *

    The implementation uses Apache XMLBeans for XML binding and provides both standard Java + * accessor methods and XMLBeans-specific methods (prefixed with 'x') for fine-grained control + * over the XML representation. All operations are thread-safe through synchronization on the + * internal XML store monitor.

    + * + *

    Healthcare Context: Ultrasound examinations are critical components of prenatal care, + * used to assess fetal development, estimate gestational age, and identify potential complications. + * This data is part of the standardized British Columbia Antenatal Record (BCAR) form system.

    + * + * @see UltrasoundType + * @see ca.openosp.openo.ar2005 + * @since 2026-01-23 + */ public class UltrasoundTypeImpl extends XmlComplexContentImpl implements UltrasoundType { private static final long serialVersionUID = 1L; @@ -18,10 +40,28 @@ public class UltrasoundTypeImpl extends XmlComplexContentImpl implements Ultraso private static final QName GA$2; private static final QName RESULTS$4; + /** + * Constructs a new UltrasoundTypeImpl instance with the specified schema type. + * + *

    This constructor is typically called by the XMLBeans framework during XML + * deserialization or when creating new instances through the Factory class.

    + * + * @param sType SchemaType the XMLBeans schema type definition for ultrasound data + */ public UltrasoundTypeImpl(final SchemaType sType) { super(sType); } + /** + * Retrieves the date when the ultrasound examination was performed. + * + *

    This method returns the ultrasound examination date as a Calendar object, + * which includes the full date and time information. The date is critical for + * tracking the timeline of prenatal care and correlating ultrasound findings + * with gestational age.

    + * + * @return Calendar the ultrasound examination date, or null if not set + */ public Calendar getDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -34,6 +74,16 @@ public Calendar getDate() { } } + /** + * Retrieves the ultrasound examination date as an XmlDate object. + * + *

    This XMLBeans-specific method provides direct access to the underlying XML + * date representation, allowing for low-level XML manipulation and validation. + * Use this method when you need to access XML-specific features or metadata + * beyond the standard Calendar representation.

    + * + * @return XmlDate the XML representation of the ultrasound examination date, or null if not set + */ public XmlDate xgetDate() { synchronized (this.monitor()) { this.check_orphaned(); @@ -43,6 +93,16 @@ public XmlDate xgetDate() { } } + /** + * Sets the date when the ultrasound examination was performed. + * + *

    This method stores the ultrasound examination date. If no date element exists + * in the XML structure, one is created automatically. The date is essential for + * maintaining accurate prenatal care timelines and is typically set when recording + * or updating ultrasound examination results.

    + * + * @param date Calendar the ultrasound examination date to set + */ public void setDate(final Calendar date) { synchronized (this.monitor()) { this.check_orphaned(); @@ -55,6 +115,15 @@ public void setDate(final Calendar date) { } } + /** + * Sets the ultrasound examination date using an XmlDate object. + * + *

    This XMLBeans-specific method allows setting the date using the XML + * representation directly, preserving all XML-specific metadata and formatting. + * If no date element exists in the XML structure, one is created automatically.

    + * + * @param date XmlDate the XML representation of the ultrasound examination date to set + */ public void xsetDate(final XmlDate date) { synchronized (this.monitor()) { this.check_orphaned(); @@ -67,6 +136,17 @@ public void xsetDate(final XmlDate date) { } } + /** + * Retrieves the gestational age (GA) determined by the ultrasound examination. + * + *

    Gestational age is a critical prenatal care metric representing the estimated + * age of the fetus based on ultrasound measurements. This value is typically expressed + * in weeks and days format (e.g., "28 weeks 3 days") and is used to track fetal + * development, estimate the due date, and assess whether growth is appropriate for + * the stage of pregnancy.

    + * + * @return String the gestational age assessment, or null if not set + */ public String getGa() { synchronized (this.monitor()) { this.check_orphaned(); @@ -79,6 +159,15 @@ public String getGa() { } } + /** + * Retrieves the gestational age as a typed Ga object. + * + *

    This XMLBeans-specific method provides access to the gestational age data + * with its full XML type information, allowing for XML schema validation and + * type-specific operations beyond simple string access.

    + * + * @return Ga the typed XML representation of the gestational age, or null if not set + */ public Ga xgetGa() { synchronized (this.monitor()) { this.check_orphaned(); @@ -88,6 +177,16 @@ public Ga xgetGa() { } } + /** + * Sets the gestational age determined by the ultrasound examination. + * + *

    This method stores the gestational age assessment based on ultrasound measurements. + * If no GA element exists in the XML structure, one is created automatically. The + * gestational age is typically calculated from fetal biometric measurements such as + * crown-rump length, biparietal diameter, femur length, and abdominal circumference.

    + * + * @param ga String the gestational age to set (typically in "weeks days" format) + */ public void setGa(final String ga) { synchronized (this.monitor()) { this.check_orphaned(); @@ -100,6 +199,15 @@ public void setGa(final String ga) { } } + /** + * Sets the gestational age using a typed Ga object. + * + *

    This XMLBeans-specific method allows setting the gestational age using the + * full XML type representation, preserving XML schema validation and type information. + * If no GA element exists in the XML structure, one is created automatically.

    + * + * @param ga Ga the typed XML representation of the gestational age to set + */ public void xsetGa(final Ga ga) { synchronized (this.monitor()) { this.check_orphaned(); @@ -112,6 +220,16 @@ public void xsetGa(final Ga ga) { } } + /** + * Retrieves the clinical results and findings from the ultrasound examination. + * + *

    This method returns the textual description of the ultrasound examination results, + * which may include fetal measurements, anatomical observations, placental location, + * amniotic fluid assessment, and any abnormal findings identified during the examination. + * These results are used for clinical decision-making and monitoring prenatal health.

    + * + * @return String the ultrasound examination results and clinical findings, or null if not set + */ public String getResults() { synchronized (this.monitor()) { this.check_orphaned(); @@ -124,6 +242,15 @@ public String getResults() { } } + /** + * Retrieves the ultrasound results as an XmlString object. + * + *

    This XMLBeans-specific method provides access to the results with full XML + * type information, allowing for XML schema validation and advanced XML operations + * beyond simple string access.

    + * + * @return XmlString the XML representation of the ultrasound examination results, or null if not set + */ public XmlString xgetResults() { synchronized (this.monitor()) { this.check_orphaned(); @@ -133,6 +260,16 @@ public XmlString xgetResults() { } } + /** + * Sets the clinical results and findings from the ultrasound examination. + * + *

    This method stores the textual description of the ultrasound examination findings. + * If no results element exists in the XML structure, one is created automatically. + * This field typically contains detailed clinical observations recorded by the + * ultrasonographer or interpreting physician.

    + * + * @param results String the ultrasound examination results and clinical findings to set + */ public void setResults(final String results) { synchronized (this.monitor()) { this.check_orphaned(); @@ -145,6 +282,15 @@ public void setResults(final String results) { } } + /** + * Sets the ultrasound results using an XmlString object. + * + *

    This XMLBeans-specific method allows setting the results using the XML + * representation directly, preserving all XML-specific metadata and type information. + * If no results element exists in the XML structure, one is created automatically.

    + * + * @param results XmlString the XML representation of the ultrasound examination results to set + */ public void xsetResults(final XmlString results) { synchronized (this.monitor()) { this.check_orphaned(); @@ -163,14 +309,36 @@ public void xsetResults(final XmlString results) { RESULTS$4 = new QName("http://www.oscarmcmaster.org/AR2005", "results"); } + /** + * Inner implementation class for the Ga (Gestational Age) XML type. + * + *

    This nested class provides the concrete XMLBeans implementation for the + * gestational age string type, extending JavaStringHolderEx to handle XML + * string values with schema validation. It is used internally by the XMLBeans + * framework for type-safe gestational age data management.

    + * + * @see Ga + * @since 2026-01-23 + */ public static class GaImpl extends JavaStringHolderEx implements Ga { private static final long serialVersionUID = 1L; - + + /** + * Constructs a new GaImpl instance with the specified schema type. + * + * @param sType SchemaType the XMLBeans schema type definition for gestational age + */ public GaImpl(final SchemaType sType) { super(sType, false); } - + + /** + * Constructs a new GaImpl instance with the specified schema type and validation flag. + * + * @param sType SchemaType the XMLBeans schema type definition for gestational age + * @param b boolean flag controlling validation behavior + */ protected GaImpl(final SchemaType sType, final boolean b) { super(sType, b); } diff --git a/src/main/java/ca/openosp/openo/ar2005/impl/YesNoNullTypeImpl.java b/src/main/java/ca/openosp/openo/ar2005/impl/YesNoNullTypeImpl.java index 320461044a3..8f80f966172 100644 --- a/src/main/java/ca/openosp/openo/ar2005/impl/YesNoNullTypeImpl.java +++ b/src/main/java/ca/openosp/openo/ar2005/impl/YesNoNullTypeImpl.java @@ -8,17 +8,56 @@ import ca.openosp.openo.ar2005.YesNoNullType; import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; +/** + * Implementation class for YesNoNullType XML schema element used in the AR2005 (Antenatal Record 2005) system. + * + *

    This class provides XMLBeans-based implementation for representing a tri-state boolean value commonly used + * in obstetrical and prenatal care documentation. The tri-state design allows healthcare providers to distinguish + * between affirmative responses (yes), negative responses (no), and explicitly null/unknown responses, which is + * critical for accurate medical record keeping in pregnancy care.

    + * + *

    The AR2005 package contains XML schema types and implementations for the British Columbia Antenatal Record + * (BCAR) system, which is used to track pregnancy history, obstetrical information, physical examinations, and + * other prenatal care data in compliance with Canadian healthcare standards.

    + * + *

    This implementation extends {@link XmlComplexContentImpl} from Apache XMLBeans and provides thread-safe + * access to the underlying XML element data through synchronized methods. All operations use the internal + * XMLBeans store with orphan checking to ensure data integrity.

    + * + * @see YesNoNullType + * @see XmlComplexContentImpl + * @see ca.openosp.openo.ar2005 + * @since 2026-01-23 + */ public class YesNoNullTypeImpl extends XmlComplexContentImpl implements YesNoNullType { private static final long serialVersionUID = 1L; private static final QName YES$0; private static final QName NO$2; private static final QName NULL$4; - + + /** + * Constructs a new YesNoNullTypeImpl instance with the specified schema type. + * + *

    This constructor initializes the XMLBeans complex content implementation with the provided + * schema type definition. It is typically invoked by the XMLBeans framework during XML parsing + * or when creating new instances through the Factory class.

    + * + * @param sType SchemaType the schema type definition for this XML element + */ public YesNoNullTypeImpl(final SchemaType sType) { super(sType); } - + + /** + * Retrieves the boolean value of the "yes" element. + * + *

    This method provides thread-safe access to the "yes" element value in the XML structure. + * In the context of prenatal care documentation, this represents an affirmative response to + * a clinical question or observation.

    + * + * @return boolean true if the "yes" element exists and contains a true value, false otherwise + */ public boolean getYes() { synchronized (this.monitor()) { this.check_orphaned(); @@ -27,7 +66,16 @@ public boolean getYes() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XmlBoolean representation of the "yes" element. + * + *

    This method provides access to the underlying XMLBeans XmlBoolean object, which allows + * for more advanced XML manipulation including access to XML metadata, validation state, + * and schema type information.

    + * + * @return XmlBoolean the XMLBeans representation of the "yes" element, or null if not set + */ public XmlBoolean xgetYes() { synchronized (this.monitor()) { this.check_orphaned(); @@ -36,14 +84,32 @@ public XmlBoolean xgetYes() { return target; } } - + + /** + * Checks whether the "yes" element is present in the XML structure. + * + *

    This method determines if the "yes" element has been explicitly set, which is important + * for tri-state logic in medical records where the distinction between "not set", "yes", and "no" + * carries clinical significance.

    + * + * @return boolean true if the "yes" element is present, false otherwise + */ public boolean isSetYes() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(YesNoNullTypeImpl.YES$0) != 0; } } - + + /** + * Sets the boolean value of the "yes" element. + * + *

    This method provides thread-safe modification of the "yes" element. If the element does not + * exist, it will be created. In prenatal care workflows, this is used to record affirmative + * responses to clinical assessments, screening questions, or examination findings.

    + * + * @param yes boolean the value to set for the "yes" element + */ public void setYes(final boolean yes) { synchronized (this.monitor()) { this.check_orphaned(); @@ -55,7 +121,16 @@ public void setYes(final boolean yes) { target.setBooleanValue(yes); } } - + + /** + * Sets the "yes" element using an XmlBoolean object. + * + *

    This method allows setting the "yes" element using an XMLBeans XmlBoolean object, + * which preserves XML metadata and schema validation information. This is useful when + * copying or transforming XML structures while maintaining full XMLBeans context.

    + * + * @param yes XmlBoolean the XMLBeans object to set for the "yes" element + */ public void xsetYes(final XmlBoolean yes) { synchronized (this.monitor()) { this.check_orphaned(); @@ -67,14 +142,30 @@ public void xsetYes(final XmlBoolean yes) { target.set((XmlObject)yes); } } - + + /** + * Removes the "yes" element from the XML structure. + * + *

    This method provides thread-safe removal of the "yes" element. In medical documentation, + * unsetting an element is different from setting it to false, as it represents the absence of + * a recorded response rather than a negative response.

    + */ public void unsetYes() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(YesNoNullTypeImpl.YES$0, 0); } } - + + /** + * Retrieves the boolean value of the "no" element. + * + *

    This method provides thread-safe access to the "no" element value in the XML structure. + * In the context of prenatal care documentation, this represents a negative response to + * a clinical question or observation.

    + * + * @return boolean true if the "no" element exists and contains a true value, false otherwise + */ public boolean getNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -83,7 +174,16 @@ public boolean getNo() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XmlBoolean representation of the "no" element. + * + *

    This method provides access to the underlying XMLBeans XmlBoolean object, which allows + * for more advanced XML manipulation including access to XML metadata, validation state, + * and schema type information.

    + * + * @return XmlBoolean the XMLBeans representation of the "no" element, or null if not set + */ public XmlBoolean xgetNo() { synchronized (this.monitor()) { this.check_orphaned(); @@ -92,14 +192,32 @@ public XmlBoolean xgetNo() { return target; } } - + + /** + * Checks whether the "no" element is present in the XML structure. + * + *

    This method determines if the "no" element has been explicitly set, which is important + * for tri-state logic in medical records where the distinction between "not set", "yes", and "no" + * carries clinical significance.

    + * + * @return boolean true if the "no" element is present, false otherwise + */ public boolean isSetNo() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(YesNoNullTypeImpl.NO$2) != 0; } } - + + /** + * Sets the boolean value of the "no" element. + * + *

    This method provides thread-safe modification of the "no" element. If the element does not + * exist, it will be created. In prenatal care workflows, this is used to record negative + * responses to clinical assessments, screening questions, or examination findings.

    + * + * @param no boolean the value to set for the "no" element + */ public void setNo(final boolean no) { synchronized (this.monitor()) { this.check_orphaned(); @@ -111,7 +229,16 @@ public void setNo(final boolean no) { target.setBooleanValue(no); } } - + + /** + * Sets the "no" element using an XmlBoolean object. + * + *

    This method allows setting the "no" element using an XMLBeans XmlBoolean object, + * which preserves XML metadata and schema validation information. This is useful when + * copying or transforming XML structures while maintaining full XMLBeans context.

    + * + * @param no XmlBoolean the XMLBeans object to set for the "no" element + */ public void xsetNo(final XmlBoolean no) { synchronized (this.monitor()) { this.check_orphaned(); @@ -123,14 +250,31 @@ public void xsetNo(final XmlBoolean no) { target.set((XmlObject)no); } } - + + /** + * Removes the "no" element from the XML structure. + * + *

    This method provides thread-safe removal of the "no" element. In medical documentation, + * unsetting an element is different from setting it to false, as it represents the absence of + * a recorded response rather than a positive response.

    + */ public void unsetNo() { synchronized (this.monitor()) { this.check_orphaned(); this.get_store().remove_element(YesNoNullTypeImpl.NO$2, 0); } } - + + /** + * Retrieves the boolean value of the "null" element. + * + *

    This method provides thread-safe access to the "null" element value in the XML structure. + * In the context of prenatal care documentation, this represents an explicitly unknown or + * not-applicable response to a clinical question or observation, which is distinct from + * simply not providing an answer.

    + * + * @return boolean true if the "null" element exists and contains a true value, false otherwise + */ public boolean getNull() { synchronized (this.monitor()) { this.check_orphaned(); @@ -139,7 +283,16 @@ public boolean getNull() { return target != null && target.getBooleanValue(); } } - + + /** + * Retrieves the XmlBoolean representation of the "null" element. + * + *

    This method provides access to the underlying XMLBeans XmlBoolean object, which allows + * for more advanced XML manipulation including access to XML metadata, validation state, + * and schema type information.

    + * + * @return XmlBoolean the XMLBeans representation of the "null" element, or null if not set + */ public XmlBoolean xgetNull() { synchronized (this.monitor()) { this.check_orphaned(); @@ -148,14 +301,33 @@ public XmlBoolean xgetNull() { return target; } } - + + /** + * Checks whether the "null" element is present in the XML structure. + * + *

    This method determines if the "null" element has been explicitly set, which is important + * for tri-state logic in medical records where explicitly recording "unknown" or "not applicable" + * is clinically different from not recording a response at all.

    + * + * @return boolean true if the "null" element is present, false otherwise + */ public boolean isSetNull() { synchronized (this.monitor()) { this.check_orphaned(); return this.get_store().count_elements(YesNoNullTypeImpl.NULL$4) != 0; } } - + + /** + * Sets the boolean value of the "null" element. + * + *

    This method provides thread-safe modification of the "null" element. If the element does not + * exist, it will be created. In prenatal care workflows, this is used to explicitly record when + * information is unknown, not applicable, or when a healthcare provider chooses to mark a field + * as null rather than leaving it unanswered.

    + * + * @param xnull boolean the value to set for the "null" element + */ public void setNull(final boolean xnull) { synchronized (this.monitor()) { this.check_orphaned(); @@ -167,7 +339,16 @@ public void setNull(final boolean xnull) { target.setBooleanValue(xnull); } } - + + /** + * Sets the "null" element using an XmlBoolean object. + * + *

    This method allows setting the "null" element using an XMLBeans XmlBoolean object, + * which preserves XML metadata and schema validation information. This is useful when + * copying or transforming XML structures while maintaining full XMLBeans context.

    + * + * @param xnull XmlBoolean the XMLBeans object to set for the "null" element + */ public void xsetNull(final XmlBoolean xnull) { synchronized (this.monitor()) { this.check_orphaned(); @@ -179,7 +360,14 @@ public void xsetNull(final XmlBoolean xnull) { target.set((XmlObject)xnull); } } - + + /** + * Removes the "null" element from the XML structure. + * + *

    This method provides thread-safe removal of the "null" element. In medical documentation, + * unsetting the null element reverts the field to an unrecorded state, which is different from + * having explicitly marked it as null/unknown.

    + */ public void unsetNull() { synchronized (this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/billing/CA/ON/web/MoveMOHFiles2Action.java b/src/main/java/ca/openosp/openo/billing/CA/ON/web/MoveMOHFiles2Action.java index 643193e986e..d3e2b6e08a2 100644 --- a/src/main/java/ca/openosp/openo/billing/CA/ON/web/MoveMOHFiles2Action.java +++ b/src/main/java/ca/openosp/openo/billing/CA/ON/web/MoveMOHFiles2Action.java @@ -21,7 +21,32 @@ import ca.openosp.openo.utility.SpringUtils; import ca.openosp.openo.utility.WebUtils; - +/** + * Struts2 action for managing Ontario Ministry of Health (MOH) billing file archival operations. + * + *

    This action handles the secure movement of MOH billing files from active Electronic Data + * Transfer (EDT) folders to an archive directory. It is part of the Ontario-specific billing + * infrastructure for MCEDT (Medical Certificate Electronic Data Transfer) file management.

    + * + *

    The action provides critical file management functionality for healthcare billing workflows, + * ensuring that processed MOH billing files are safely archived while maintaining data integrity + * and security compliance. All file operations include path validation to prevent path traversal + * attacks and unauthorized file access.

    + * + *

    Security: Requires administrative privileges (_admin with write access) to + * execute file archival operations. All file paths are validated using {@link PathValidationUtils} + * to ensure files are within authorized EDT folder locations.

    + * + *

    Healthcare Context: In Ontario's healthcare billing system, MOH files contain + * sensitive billing data that must be processed and archived according to provincial regulations. + * This action supports the billing workflow by managing the lifecycle of these files after they + * have been processed for claims submission.

    + * + * @see EDTFolder + * @see PathValidationUtils + * @see SecurityInfoManager + * @since 2026-01-24 + */ public class MoveMOHFiles2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -29,6 +54,37 @@ public class MoveMOHFiles2Action extends ActionSupport { private static Logger logger = MiscUtils.getLogger(); private SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); + /** + * Executes the MOH file archival operation. + * + *

    This method handles the main workflow for archiving selected MOH billing files from their + * current EDT folder location to the archive directory. The process includes:

    + *
      + *
    • Security validation to ensure the user has administrative privileges
    • + *
    • Validation of request parameters (folder and file selection)
    • + *
    • Path validation to prevent unauthorized file access
    • + *
    • File movement to the archive directory using secure file operations
    • + *
    • Status message generation for success and error conditions
    • + *
    + * + *

    Request Parameters:

    + *
      + *
    • folder - String identifying the source EDT folder (required)
    • + *
    • mohFile - String array of filenames to archive (required, multiple values)
    • + *
    + * + *

    Security: This operation requires the _admin security object + * with write privileges. All file paths are validated to ensure they reside within authorized + * EDT folder locations before any file operations are performed.

    + * + *

    Error Handling: Individual file failures are logged and reported to the + * user via session messages, but do not halt processing of remaining files. Success and error + * messages are accumulated and displayed to the user via {@link WebUtils} session messaging.

    + * + * @return String result code "Success" upon completion of the archival process + * @throws Exception if an unexpected error occurs during execution + * @throws SecurityException if the user lacks required administrative privileges (_admin with write access) + */ public String execute() throws Exception { if(!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_admin", "w", null)) { throw new SecurityException("missing required sec object (_admin)"); @@ -86,6 +142,26 @@ public String execute() throws Exception { return "Success"; } + /** + * Validates that a file resides within an authorized EDT folder location. + * + *

    This security method ensures that the specified file is located within one of the + * authorized Electronic Data Transfer (EDT) folder paths. It iterates through all defined + * EDT folders and uses {@link PathValidationUtils#validateExistingPath(File, File)} to + * verify the file's location against each authorized directory.

    + * + *

    This validation is critical for preventing path traversal attacks and ensuring that + * only files within approved MOH billing directories can be archived. The method uses a + * try-each-folder approach, accepting the file if it validates against any of the authorized + * EDT folder locations.

    + * + *

    Security: Uses {@link PathValidationUtils} to perform secure path + * validation, preventing directory traversal attacks and unauthorized file access. Any + * validation failures are caught and the method continues checking other authorized folders.

    + * + * @param file File object representing the file to validate (must not be null) + * @return boolean true if the file is within an authorized EDT folder, false otherwise + */ private boolean validateFileLocation(File file) { boolean result = false; try { @@ -105,6 +181,22 @@ private boolean validateFileLocation(File file) { return result; } + /** + * Retrieves a File object for the specified filename within the given folder path. + * + *

    This method creates a File object by combining the folder path and filename. It includes + * URL decoding of the filename parameter to handle filenames that may have been URL-encoded + * during HTTP transmission. This is necessary because filenames from web forms may contain + * special characters that are URL-encoded.

    + * + *

    Error Handling: If the filename cannot be decoded using UTF-8 encoding, + * an error is logged and null is returned. The calling method should check for null and handle + * the error appropriately.

    + * + * @param folderPath String representing the absolute path to the folder containing the file + * @param fileName String representing the URL-encoded filename to retrieve + * @return File object representing the file at the specified path, or null if filename decoding fails + */ private File getFile(String folderPath, String fileName) { try { fileName = URLDecoder.decode(fileName, "UTF-8"); @@ -116,6 +208,24 @@ private File getFile(String folderPath, String fileName) { return new File(folderPath, fileName); } + /** + * Moves a MOH billing file to the archive directory. + * + *

    This method performs the actual file movement operation using Apache Commons FileUtils + * to safely move the file to the designated archive directory. The archive directory is + * automatically created if it does not exist (createDirectory parameter set to true).

    + * + *

    The method uses {@link FileUtils#moveToDirectory(File, File, boolean)} which provides + * atomic file movement when possible and handles cross-filesystem moves gracefully. This + * ensures data integrity during the archival process.

    + * + *

    Error Handling: Any IOException during the move operation is caught, + * logged, and results in a false return value. The original file remains in place if the + * move fails.

    + * + * @param file File object representing the MOH billing file to move to archive + * @return boolean true if the file was successfully moved to the archive directory, false if the move failed + */ private boolean moveFile(File file) { File archiveDir = new File(EDTFolder.ARCHIVE.getPath()); try { @@ -127,6 +237,19 @@ private boolean moveFile(File file) { return true; } + /** + * Resolves an EDT folder name to its absolute filesystem path. + * + *

    This method uses the {@link EDTFolder} enumeration to map a folder name identifier + * to its configured absolute path. The EDTFolder enum provides centralized configuration + * of all authorized Electronic Data Transfer folder locations for Ontario MOH billing files.

    + * + *

    The folder name parameter typically comes from a web form selection and identifies + * which EDT folder category (e.g., inbox, outbox, error) the user is working with.

    + * + * @param folderName String identifier for the EDT folder (e.g., "INBOX", "OUTBOX", "ERROR") + * @return String representing the absolute filesystem path for the specified EDT folder + */ private String getFolderPath(String folderName) { EDTFolder folder = EDTFolder.getFolder(folderName); return folder.getPath(); diff --git a/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingController.java b/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingController.java index e9ff34920bb..d0cb7649c29 100644 --- a/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingController.java +++ b/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingController.java @@ -25,10 +25,32 @@ import ca.openosp.openo.utility.SpringUtils; import ca.openosp.openo.clinic.ClinicData; -/* - * Author: Charles Liu - * Company: WELL Health Technologies Corp. - * Date: December 6, 2018 +/** + * HTTP servlet controller for managing private billing operations in British Columbia. + *

    + * This controller handles the display and printing of private bills (non-MSP/non-provincial + * insurance billing) for BC healthcare providers. It supports listing private bills by provider, + * generating print previews with patient and recipient information, and integrating clinic details + * for invoice generation. + *

    + *

    + * Key operations include: + *

      + *
    • Listing private bills filtered by provider ID
    • + *
    • Generating print preview for selected bills with patient demographics
    • + *
    • Handling recipient information (either patient or third-party recipient)
    • + *
    • Including clinic information for invoice headers
    • + *
    + *

    + *

    + * This controller is specific to British Columbia's private billing workflows and does not + * interface with provincial MSP billing systems. + *

    + * + * @see PrivateBillingDAO + * @see ca.openosp.openo.commn.model.Demographic + * @see ca.openosp.openo.commn.model.Provider + * @since 2026-01-23 */ public class PrivateBillingController extends HttpServlet { private static String LIST_PRIVATE_BILLS = "billing/CA/BC/privateBilling/viewStatement.jsp"; @@ -36,12 +58,41 @@ public class PrivateBillingController extends HttpServlet { private PrivateBillingDAO dao; private ProviderDao providerDao; + /** + * Constructs a new PrivateBillingController instance. + *

    + * Initializes the PrivateBillingDAO for database operations and retrieves the ProviderDao + * from the Spring application context for provider data access. + *

    + */ public PrivateBillingController() { super(); dao = new PrivateBillingDAO(); providerDao = SpringUtils.getBean(ProviderDao.class); } + /** + * Lists all private bills, optionally filtered by provider ID. + *

    + * Retrieves all providers from the database and displays private bills for the specified + * provider. If no provider ID is specified or the parameter is empty, displays bills for + * all providers using a wildcard filter ("%"). + *

    + *

    + * The results are forwarded to the viewStatement.jsp page with the following attributes: + *

      + *
    • providers - List of all Provider objects
    • + *
    • providerId - String the selected provider ID or "%" for all
    • + *
    • bills - List of private bills matching the filter criteria
    • + *
    + *

    + * + * @param request HttpServletRequest the servlet request containing optional "providerId" parameter + * @param response HttpServletResponse the servlet response for forwarding to the view + * @param forward String the forward path (overridden to LIST_PRIVATE_BILLS) + * @throws ServletException if request forwarding fails + * @throws IOException if an I/O error occurs during request processing + */ private void listPrivateBills(HttpServletRequest request, HttpServletResponse response, String forward) throws ServletException, IOException { try { List providers = providerDao.getProviders(); @@ -63,6 +114,40 @@ private void listPrivateBills(HttpServletRequest request, HttpServletResponse re } } + /** + * Generates a print preview for selected private bills with patient and recipient information. + *

    + * Processes a JSON array of bill IDs to create print-ready invoice data. For each bill: + *

      + *
    • Retrieves patient demographic information (name, address, date of birth)
    • + *
    • Determines recipient information (patient or third-party recipient)
    • + *
    • Includes current clinic information (name, address, contact details)
    • + *
    • Fetches invoice line items for the bill
    • + *
    + *

    + *

    + * The method expects a "billIds" parameter containing a JSON array with objects having: + *

      + *
    • demographicNumber - String the patient's demographic ID
    • + *
    • recipientId - String the recipient's ID (empty string indicates patient is recipient)
    • + *
    + *

    + *

    + * Results are forwarded to printPreview.jsp with attributes: + *

      + *
    • date - String current date for invoice generation
    • + *
    • billToClinic - String flag indicating if bill is directed to clinic
    • + *
    • billIds - String the original JSON array of bill IDs
    • + *
    • patientBills - List of HashMap objects containing complete bill data for each patient
    • + *
    + *

    + * + * @param request HttpServletRequest the servlet request containing "billIds" parameter (JSON array) + * @param response HttpServletResponse the servlet response for forwarding to the print preview + * @param forward String the forward path (overridden to PRINT_PREVIEW_BILLS) + * @throws ServletException if request forwarding fails + * @throws IOException if an I/O error occurs during request processing + */ private void printPreviewBills(HttpServletRequest request, HttpServletResponse response, String forward) throws ServletException, IOException { try { DemographicData demoData = new DemographicData(); @@ -143,6 +228,26 @@ private void printPreviewBills(HttpServletRequest request, HttpServletResponse r } } + /** + * Handles HTTP GET requests for private billing operations. + *

    + * Routes requests based on the "action" parameter to the appropriate handler method: + *

      + *
    • "listPrivateBills" - Displays a list of private bills (default action)
    • + *
    • "printPreviewBills" - Generates print preview for selected bills
    • + *
    + *

    + *

    + * If the action parameter is missing or null, defaults to listing private bills. + * This provides a safe fallback behavior for direct navigation to the controller. + *

    + * + * @param request HttpServletRequest the servlet request containing the "action" parameter + * @param response HttpServletResponse the servlet response for forwarding to the appropriate view + * @throws ServletException if request forwarding fails + * @throws IOException if an I/O error occurs during request processing + * @throws NullPointerException if the action parameter is null (caught and handled internally) + */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, NullPointerException { String forward = ""; String action = request.getParameter("action"); diff --git a/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingDAO.java b/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingDAO.java index af3b9a3edea..60b391c01bb 100644 --- a/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingDAO.java +++ b/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingDAO.java @@ -9,22 +9,64 @@ import java.util.HashMap; import java.util.List; -/* - * Author: Charles Liu - * Company: WELL Health Technologies Corp. - * Date: December 6, 2018 +/** + * Data Access Object for managing private billing records in British Columbia. + * + *

    This DAO handles database operations for private billing invoices that are not submitted + * to the provincial Medical Services Plan (MSP). Private billing is used for non-insured services, + * third-party billing, or services where the patient pays directly.

    + * + *

    The DAO provides functionality to:

    + *
      + *
    • Retrieve billing recipient information including name and address details
    • + *
    • List private billing items for a specific patient and recipient
    • + *
    • List all private billing records for a specific healthcare provider
    • + *
    + * + *

    Note: This class uses direct JDBC connections and manual resource management. + * Callers should be aware that database connections are obtained via {@link DbUtil#getConnection()} + * and resources are closed in finally blocks.

    + * + * @see PrivateBillingModel + * @see DbUtil + * @since 2026-01-24 */ public class PrivateBillingDAO { private Connection connection; private PreparedStatement statement; private ResultSet rs; + /** + * Constructs a new PrivateBillingDAO instance. + * + *

    Initializes database connection resources to null. Actual database connections + * are created on-demand when methods are invoked.

    + */ public PrivateBillingDAO() { connection = null; statement = null; rs = null; } + /** + * Retrieves billing recipient information by recipient ID. + * + *

    Queries the {@code bill_recipients} table to fetch contact information for the + * specified recipient. The returned map contains the following keys:

    + *
      + *
    • {@code name} - String recipient's full name
    • + *
    • {@code address} - String street address
    • + *
    • {@code city} - String city name
    • + *
    • {@code province} - String province code (e.g., "BC", "ON")
    • + *
    • {@code postal} - String postal code
    • + *
    + * + *

    If the recipient is not found, the map is returned with empty string values for all keys.

    + * + * @param recipientId String the unique identifier of the billing recipient + * @return HashMap<String, String> map containing recipient contact information with keys: + * name, address, city, province, postal. Returns empty strings for all values if recipient not found. + */ public HashMap getRecipientById(String recipientId) { HashMap recipient = new HashMap() {{ put("name", ""); @@ -65,6 +107,47 @@ public HashMap getRecipientById(String recipientId) { return recipient; } + /** + * Retrieves a list of private billing items for a specific patient and recipient. + * + *

    Performs a complex join across multiple billing tables to retrieve detailed invoice + * information for private billing transactions. The query filters by:

    + *
      + *
    • Billing type = 'PRI' (private billing)
    • + *
    • Billing status = 'P' (presumably "posted" or "processed")
    • + *
    • Specific demographic number (patient ID)
    • + *
    • Recipient name
    • + *
    + * + *

    Each item in the returned list contains a HashMap with the following keys:

    + *
      + *
    • {@code name} - String recipient name
    • + *
    • {@code billing_no} - String billing number (invoice ID)
    • + *
    • {@code demographic_no} - String patient demographic number
    • + *
    • {@code provider_no} - String healthcare provider number
    • + *
    • {@code demographic_name} - String patient name
    • + *
    • {@code billing_date} - String date of billing
    • + *
    • {@code total} - String total invoice amount
    • + *
    • {@code status} - String billing status code
    • + *
    • {@code payee_no} - String payee identifier
    • + *
    • {@code billing_unit} - String billing units (may appear twice)
    • + *
    • {@code bill_amount} - String billed amount
    • + *
    • {@code billingmaster_no} - String billing master record number
    • + *
    • {@code billing_code} - String service billing code
    • + *
    • {@code gst} - String GST amount
    • + *
    • {@code gstNo} - String GST registration number
    • + *
    • {@code amount} - String line item amount
    • + *
    • {@code amount_received} - String total amount received (aggregated from billing history)
    • + *
    • {@code description} - String service description from billing service table
    • + *
    + * + *

    Results are ordered by billing date in descending order (most recent first).

    + * + * @param demographicNumber String the patient's demographic number (patient ID) + * @param recipientName String the name of the billing recipient to filter by + * @return List<HashMap<String, String>> list of invoice items, each represented as a map + * of billing details. Returns an empty list if no matching records are found. + */ public List> listPrivateBillItems(String demographicNumber, String recipientName) { List> bills = new ArrayList>(); @@ -149,6 +232,36 @@ public List> listPrivateBillItems(String demographicNumb return bills; } + /** + * Retrieves a summarized list of all private billing records for a specific healthcare provider. + * + *

    This method aggregates private billing data grouped by patient (demographic number) and + * recipient name. The query performs complex joins across billing tables to compile:

    + *
      + *
    • Count of billing items per patient/recipient combination
    • + *
    • Total balance (sum of all bill amounts) for each group
    • + *
    • Billing metadata including dates, status, and provider information
    • + *
    + * + *

    The query filters by:

    + *
      + *
    • Billing type = 'PRI' (private billing)
    • + *
    • Billing status = 'P' (presumably "posted" or "processed")
    • + *
    • Status NOT LIKE 'A' (excludes archived or cancelled records)
    • + *
    • Specific provider number
    • + *
    + * + *

    Results are grouped by patient demographic number and recipient name, and ordered by + * billing date in descending order (most recent first).

    + * + *

    Each {@link PrivateBillingModel} in the returned list contains aggregated billing summary + * information for a unique patient/recipient combination.

    + * + * @param providerId String the healthcare provider's unique identifier + * @return List<PrivateBillingModel> list of billing summary records grouped by patient and recipient. + * Returns an empty list if no matching records are found for the provider. + * @see PrivateBillingModel + */ public List listPrivateBills(String providerId) { List bills = new ArrayList(); try { diff --git a/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingModel.java b/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingModel.java index 560defe9767..3d497135838 100644 --- a/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingModel.java +++ b/src/main/java/ca/openosp/openo/billings/ca/bc/privateBilling/PrivateBillingModel.java @@ -1,10 +1,19 @@ //CHECKSTYLE:OFF package ca.openosp.openo.billings.ca.bc.privateBilling; -/* - * Author: Charles Liu - * Company: WELL Health Technologies Corp. - * Date: December 6, 2018 +/** + * Data model representing private billing information for British Columbia healthcare providers. + * + *

    This model encapsulates billing details for non-MSP (Medical Services Plan) billing transactions, + * including patient demographics, provider information, billing status, and financial details. + * Private billing is used for services not covered under BC's public healthcare system, such as + * third-party insurance claims, WorkSafeBC claims, or patient self-pay transactions.

    + * + *

    The model tracks both the billing transaction details (number, date, type, status) and the + * parties involved (patient/demographic, provider, recipient/payer), along with financial information + * such as outstanding balance.

    + * + * @since 2026-01-23 */ public class PrivateBillingModel { @@ -21,98 +30,218 @@ public class PrivateBillingModel { private String balance; private String status; + /** + * Retrieves the current status of the billing record. + * + * @return String the billing record status + */ public String getStatus() { return this.status; } + /** + * Sets the status of the billing record. + * + * @param value String the billing record status to set + */ public void setStatus(String value) { this.status = value; } + /** + * Retrieves the unique billing number for this transaction. + * + * @return String the billing number identifier + */ public String getBillingNumber() { return this.billingNumber; } + /** + * Sets the unique billing number for this transaction. + * + * @param value String the billing number identifier to set + */ public void setBillingNumber(String value) { this.billingNumber = value; } + /** + * Retrieves the count of billing records or line items. + * + * @return int the billing count + */ public int getBillingCount() { return this.billingCount; } + /** + * Sets the count of billing records or line items. + * + * @param value int the billing count to set + */ public void setBillingCount(int value) { this.billingCount = value; } + /** + * Retrieves the date of the billing transaction. + * + * @return String the billing date + */ public String getBillingDate() { return this.billingDate; } + /** + * Sets the date of the billing transaction. + * + * @param value String the billing date to set + */ public void setBillingDate(String value) { this.billingDate = value; } + /** + * Retrieves the type of billing transaction (e.g., third-party insurance, WorkSafeBC, self-pay). + * + * @return String the billing type + */ public String getBillingType() { return this.billingType; } + /** + * Sets the type of billing transaction. + * + * @param value String the billing type to set + */ public void setBillingType(String value) { this.billingType = value; } + /** + * Retrieves the processing status of the billing transaction (e.g., pending, submitted, paid, rejected). + * + * @return String the billing processing status + */ public String getBillingStatus() { return this.billingStatus; } + /** + * Sets the processing status of the billing transaction. + * + * @param value String the billing processing status to set + */ public void setBillingStatus(String value) { this.billingStatus = value; } + /** + * Retrieves the patient's demographic number (unique patient identifier in the EMR system). + * + * @return String the patient's demographic number + */ public String getDemographicNumber() { return demographicNumber; } + /** + * Sets the patient's demographic number (unique patient identifier in the EMR system). + * + * @param value String the patient's demographic number to set + */ public void setDemographicNumber(String value) { this.demographicNumber = value; } + /** + * Retrieves the patient's full name. + * + * @return String the patient's full name + */ public String getDemographicName() { return demographicName; } + /** + * Sets the patient's full name. + * + * @param value String the patient's full name to set + */ public void setDemographicName(String value) { this.demographicName = value; } + /** + * Retrieves the healthcare provider's identification number (BC practitioner number). + * + * @return String the provider's identification number + */ public String getProviderNumber() { return this.providerNumber; } + /** + * Sets the healthcare provider's identification number (BC practitioner number). + * + * @param value String the provider's identification number to set + */ public void setProviderNumber(String value) { this.providerNumber = value; } + /** + * Retrieves the unique identifier of the billing recipient (payer/insurance company). + * + * @return String the recipient's unique identifier + */ public String getRecipientId() { return this.recipientId; } + /** + * Sets the unique identifier of the billing recipient (payer/insurance company). + * + * @param value String the recipient's unique identifier to set + */ public void setRecipientId(String value) { this.recipientId = value; } + /** + * Retrieves the name of the billing recipient (payer/insurance company name). + * + * @return String the recipient's name + */ public String getRecipientName() { return this.recipientName; } + /** + * Sets the name of the billing recipient (payer/insurance company name). + * + * @param value String the recipient's name to set + */ public void setRecipientName(String value) { this.recipientName = value; } + /** + * Retrieves the outstanding balance amount for this billing transaction. + * + * @return String the outstanding balance amount (typically in CAD) + */ public String getBalance() { return this.balance; } + /** + * Sets the outstanding balance amount for this billing transaction. + * + * @param value String the outstanding balance amount to set (typically in CAD) + */ public void setBalance(String value) { this.balance = value; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/AbstractModel.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/AbstractModel.java index aebe8801b1e..39fa9f7ea3d 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/AbstractModel.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/AbstractModel.java @@ -6,17 +6,120 @@ import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import java.io.Serializable; +/** + * Abstract base class for CAISI Integrator data access objects (models). + * + *

    This class provides common functionality for all CAISI Integrator models including + * identity management, equality comparison, and utility methods for working with model collections. + * The CAISI (Client Access to Integrated Services and Information) Integrator is a healthcare + * information exchange system that enables sharing of patient data across multiple OpenO EMR + * installations and external healthcare systems.

    + * + *

    All CAISI Integrator model classes extend this abstract base to ensure consistent + * object identity semantics based on persistent identifiers. The class enforces that models + * warns when models are not persisted (null ID) before participating in operations like + * equality comparison and hash-based collections. + * + *

    Type Parameter:

    + *
      + *
    • {@code T} - The type of the model's primary key identifier (e.g., Integer, Long, String, + * or composite key types like {@link FacilityIdStringCompositePk})
    • + *
    + * + *

    Key Features:

    + *
      + *
    • Generic type support for various primary key types
    • + *
    • Identity-based equality and hash code implementation
    • + *
    • Reflection-based toString for debugging and logging
    • + *
    • Utility methods for collection operations
    • + *
    • Validation warnings for operations on non-persisted objects
    • + *
    + * + *

    Usage Example:

    + *
    + * public class CachedDemographic extends AbstractModel<Integer> {
    + *     private Integer id;
    + *
    + *     {@literal @}Override
    + *     public Integer getId() {
    + *         return id;
    + *     }
    + * }
    + * 
    + * + * @param the type of the primary key identifier for this model + * + * @see CachedDemographic + * @see CachedProvider + * @see Facility + * @see FacilityIdStringCompositePk + * + * @since 2026-01-23 + */ abstract class AbstractModel implements Serializable { + /** + * Error message constant used when operations requiring a persisted object are performed + * on objects that have not yet been saved to the database. + * + *

    This message is logged as a warning when methods like {@link #hashCode()} or + * {@link #equals(Object)} are called on models with null identifiers, indicating that + * the object has not been persisted to the database yet.

    + */ protected static final String OBJECT_NOT_YET_PERISTED = "The object is not persisted yet, this operation requires the object to already be persisted."; - + + /** + * Returns the primary key identifier for this model instance. + * + *

    Subclasses must implement this method to provide access to their primary key field. + * The identifier should be null for transient (non-persisted) objects and non-null for + * objects that have been saved to the database.

    + * + *

    This method is used internally by {@link #hashCode()}, {@link #equals(Object)}, and + * {@link #existsId(List, AbstractModel)} to determine object identity.

    + * + * @return T the primary key identifier, or null if the object has not been persisted + */ public abstract T getId(); - + + /** + * Returns a string representation of this model instance using reflection. + * + *

    This method uses Apache Commons Lang's {@link ReflectionToStringBuilder} to + * automatically generate a string representation that includes all fields and their + * values. This is particularly useful for debugging, logging (non-PHI data only), + * and development purposes.

    + * + *

    Security Note: The generated string may contain sensitive patient + * health information (PHI). Care must be taken to ensure this method is only used in + * contexts where PHI logging is permitted and properly secured.

    + * + * @return String a reflection-based string representation of this object including + * all field names and values + */ @Override public String toString() { return ReflectionToStringBuilder.toString((Object)this); } - + + /** + * Returns a hash code value for this model based on its primary key identifier. + * + *

    This implementation provides identity-based hashing using the model's primary key. + * For persisted objects (non-null ID), the hash code is computed from the identifier + * to ensure consistent hashing behavior across sessions and JVM instances.

    + * + *

    For non-persisted objects (null ID), this method falls back to the default + * {@link Object#hashCode()} implementation and logs a warning, as using non-persisted + * objects in hash-based collections may lead to unexpected behavior after persistence.

    + * + *

    Important: Objects with null IDs should not be added to hash-based + * collections (HashSet, HashMap) if they will be persisted later, as their hash code + * will change upon persistence.

    + * + * @return int the hash code value computed from the primary key ID, or the default + * object hash code if the ID is null + */ @Override public int hashCode() { if (this.getId() == null) { @@ -25,7 +128,28 @@ public int hashCode() { } return this.getId().hashCode(); } - + + /** + * Compares this model to another object for equality based on class type and primary key. + * + *

    Two model instances are considered equal if and only if:

    + *
      + *
    • They are instances of the exact same class (not just compatible types)
    • + *
    • Their primary key identifiers are equal according to the ID's equals method
    • + *
    + * + *

    This implementation ensures that model equality is based on database identity + * (primary key) rather than object instance identity, which is appropriate for + * persistent domain objects.

    + * + *

    If this object's ID is null (not yet persisted), a warning is logged. Comparing + * non-persisted objects may produce unexpected results and should generally be avoided + * in business logic.

    + * + * @param object Object the reference object with which to compare + * + * @return boolean true if this model is equal to the object argument; false otherwise + */ @Override public boolean equals(final Object object) { if (this.getClass() != object.getClass()) { @@ -37,7 +161,38 @@ public boolean equals(final Object object) { } return this.getId().equals(abstractModel.getId()); } - + + /** + * Checks if a model with the same primary key identifier exists in the given list. + * + *

    This utility method searches through a list of models to determine if any model + * in the list has the same primary key identifier as the search model. The comparison + * is based solely on ID equality, not on object instance equality or full object equality.

    + * + *

    This method is useful for checking duplicates, validating data before insertion, + * or determining if a particular entity is already present in a collection when you + * only care about database identity rather than complete object state.

    + * + *

    Type Parameter:

    + *
      + *
    • {@code X} - A type that extends AbstractModel with any primary key type
    • + *
    + * + *

    Usage Example:

    + *
    +     * List<CachedDemographic> demographics = ...;
    +     * CachedDemographic newDemographic = ...;
    +     * if (!AbstractModel.existsId(demographics, newDemographic)) {
    +     *     demographics.add(newDemographic);
    +     * }
    +     * 
    + * + * @param the specific AbstractModel subtype contained in the list + * @param list List<X> the list of models to search through + * @param searchModel X the model whose ID to search for in the list + * + * @return Boolean true if a model with the same ID exists in the list; false otherwise + */ public static > boolean existsId(final List list, final X searchModel) { final Object searchPk = ((AbstractModel)searchModel).getId(); for (final X tempModel : list) { diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAdmission.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAdmission.java index 38c236f696f..2eddc276f5b 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAdmission.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAdmission.java @@ -19,6 +19,37 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Entity representing a cached admission record for the CAISI (Client Access to Integrated Services and Information) integrator system. + * + *

    This class stores admission and discharge information for patients enrolled in CAISI programs. It maintains + * a cache of admission data across multiple healthcare facilities participating in the integrator network. + * The entity tracks demographic associations, program enrollments, admission/discharge dates, and associated + * clinical notes.

    + * + *

    This is an OpenJPA enhanced entity that implements PersistenceCapable for advanced JPA features including + * detached state management, field-level change tracking, and optimized persistence operations. The enhancement + * is performed at build time by the OpenJPA enhancer.

    + * + *

    Key Features:

    + *
      + *
    • Composite primary key combining facility ID and admission ID for cross-facility uniqueness
    • + *
    • Indexed fields for efficient querying by demographic, program, and admission date
    • + *
    • Support for medium text notes (up to 16MB) for admission and discharge documentation
    • + *
    • Temporal tracking with timestamp precision for admission and discharge events
    • + *
    • OpenJPA persistence capabilities for advanced state management and detachment
    • + *
    + * + *

    CAISI Integration Context: CAISI is a community health information system that enables + * coordinated care across multiple healthcare providers and facilities. This cached admission entity supports + * the integrator's ability to aggregate and synchronize patient program enrollment data across the CAISI network.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see PersistenceCapable + * + * @since 2026-01-24 + */ @Entity public class CachedAdmission extends AbstractModel implements PersistenceCapable { @@ -52,7 +83,14 @@ public class CachedAdmission extends AbstractModel static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$CachedAdmission; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Constructs a new CachedAdmission instance with default values. + * + *

    Initializes all fields to their default states: object references to null and + * integer IDs to 0. This constructor is primarily used by JPA/OpenJPA for entity + * instantiation during database operations.

    + */ public CachedAdmission() { this.facilityIdIntegerCompositePk = null; this.caisiDemographicId = 0; @@ -62,68 +100,174 @@ public CachedAdmission() { this.admissionNotes = null; this.dischargeNotes = null; } - + + /** + * Retrieves the composite primary key for this admission record. + * + *

    The composite key combines the facility ID and admission ID to ensure uniqueness + * across multiple facilities in the CAISI integrator network.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key containing facility and admission identifiers + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityIdIntegerCompositePk(this); } - + + /** + * Sets the composite primary key for this admission record. + * + * @param facilityIdIntegerCompositePk FacilityIdIntegerCompositePk the composite primary key to set + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityIdIntegerCompositePk) { pcSetfacilityIdIntegerCompositePk(this, facilityIdIntegerCompositePk); } - + + /** + * Retrieves the entity's primary key identifier. + * + *

    This method overrides the AbstractModel getId() method to return the composite primary key.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityIdIntegerCompositePk(this); } - + + /** + * Retrieves the CAISI demographic identifier for the patient. + * + *

    This ID references the patient's demographic record in the CAISI system and is indexed + * for efficient query performance.

    + * + * @return int the CAISI demographic identifier + */ public int getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier for the patient. + * + * @param caisiDemographicId int the CAISI demographic identifier to set + */ public void setCaisiDemographicId(final int caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the CAISI program identifier. + * + *

    This ID identifies the specific CAISI program the patient is admitted to and is indexed + * for efficient querying of program enrollments.

    + * + * @return int the CAISI program identifier + */ public int getCaisiProgramId() { return pcGetcaisiProgramId(this); } - + + /** + * Sets the CAISI program identifier. + * + * @param caisiProgramId int the CAISI program identifier to set + */ public void setCaisiProgramId(final int caisiProgramId) { pcSetcaisiProgramId(this, caisiProgramId); } - + + /** + * Retrieves the date and time when the patient was admitted to the program. + * + *

    This field is indexed and stored with timestamp precision to support temporal queries + * and admission timeline tracking.

    + * + * @return Date the admission date and time, or null if not set + */ public Date getAdmissionDate() { return pcGetadmissionDate(this); } - + + /** + * Sets the date and time when the patient was admitted to the program. + * + * @param admissionDate Date the admission date and time to set + */ public void setAdmissionDate(final Date admissionDate) { pcSetadmissionDate(this, admissionDate); } - + + /** + * Retrieves the date and time when the patient was discharged from the program. + * + *

    This field is nullable to support ongoing admissions (not yet discharged) and is stored + * with timestamp precision.

    + * + * @return Date the discharge date and time, or null if patient is still admitted + */ public Date getDischargeDate() { return pcGetdischargeDate(this); } - + + /** + * Sets the date and time when the patient was discharged from the program. + * + * @param dischargeDate Date the discharge date and time to set, or null for ongoing admissions + */ public void setDischargeDate(final Date dischargeDate) { pcSetdischargeDate(this, dischargeDate); } - + + /** + * Retrieves the clinical notes recorded at admission. + * + *

    This field supports medium text storage (up to 16MB) to accommodate comprehensive + * admission documentation including clinical assessments, treatment plans, and initial observations.

    + * + * @return String the admission notes, or null if not recorded + */ public String getAdmissionNotes() { return pcGetadmissionNotes(this); } - + + /** + * Sets the clinical notes recorded at admission. + * + * @param admissionNotes String the admission notes to set + */ public void setAdmissionNotes(final String admissionNotes) { pcSetadmissionNotes(this, admissionNotes); } - + + /** + * Retrieves the clinical notes recorded at discharge. + * + *

    This field supports medium text storage (up to 16MB) for comprehensive discharge documentation + * including discharge summaries, follow-up instructions, and outcome assessments.

    + * + * @return String the discharge notes, or null if not recorded + */ public String getDischargeNotes() { return pcGetdischargeNotes(this); } - + + /** + * Sets the clinical notes recorded at discharge. + * + * @param dischargeNotes String the discharge notes to set + */ public void setDischargeNotes(final String dischargeNotes) { pcSetdischargeNotes(this, dischargeNotes); } - + + /** + * Returns the OpenJPA enhancement contract version. + * + *

    This method is part of the OpenJPA enhancement infrastructure and indicates the version + * of the persistence capability contract implemented by this enhanced entity.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -154,7 +298,18 @@ protected void pcClearFields() { this.dischargeNotes = null; this.facilityIdIntegerCompositePk = null; } - + + /** + * Creates a new instance of this entity with the specified state manager and object ID. + * + *

    This OpenJPA lifecycle method is used to create new entity instances with a specific + * state manager and key values copied from the provided object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID containing key field values to copy + * @param b boolean if true, clears all fields to default values before copying key fields + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedAdmission cachedAdmission = new CachedAdmission(); if (b) { @@ -164,7 +319,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedAdmission.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedAdmission; } - + + /** + * Creates a new instance of this entity with the specified state manager. + * + *

    This OpenJPA lifecycle method is used to create new entity instances with a specific + * state manager but without copying key fields from an object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all fields to default values + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedAdmission cachedAdmission = new CachedAdmission(); if (b) { @@ -177,7 +342,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final protected static int pcGetManagedFieldCount() { return 7; } - + + /** + * Replaces a single field value from the state manager. + * + *

    This OpenJPA field management method retrieves the current value for the specified field + * from the state manager and updates the entity's field accordingly. Used during entity refresh + * and state synchronization operations.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedAdmission.pcInheritedFieldCount; if (n2 < 0) { @@ -217,13 +392,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values from the state manager. + * + *

    This OpenJPA field management method replaces multiple fields in a single call by + * delegating to pcReplaceField for each specified field index.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the state manager. + * + *

    This OpenJPA field management method supplies the current value of the specified field + * to the state manager. Used during persistence operations such as flush and commit.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedAdmission.pcInheritedFieldCount; if (n2 < 0) { @@ -263,7 +455,15 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This OpenJPA field management method supplies multiple field values in a single call + * by delegating to pcProvideField for each specified field index.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -309,7 +509,18 @@ protected void pcCopyField(final CachedAdmission cachedAdmission, final int n) { } } } - + + /** + * Copies multiple field values from another entity instance. + * + *

    This OpenJPA field management method copies field values from the source entity to this + * entity for the specified field indices. Both entities must share the same state manager.

    + * + * @param o Object the source entity to copy from (must be a CachedAdmission instance) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source entity has a different state manager + * @throws IllegalStateException if this entity has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedAdmission cachedAdmission = (CachedAdmission)o; if (cachedAdmission.pcStateManager != this.pcStateManager) { @@ -322,25 +533,50 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedAdmission, array[i]); } } - + + /** + * Retrieves the generic context from the state manager. + * + *

    The generic context provides access to persistence context information managed by OpenJPA.

    + * + * @return Object the generic context, or null if no state manager is associated + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity from the state manager. + * + * @return Object the object ID, or null if no state manager is associated + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity is marked as deleted. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified. + * + *

    Performs a dirty check to determine if any field values have changed since the entity + * was loaded or last synchronized with the database.

    + * + * @return boolean true if the entity has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -349,41 +585,90 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created (not yet persisted). + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by a persistence context). + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is transactional (participating in a transaction). + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks the specified field as dirty. + * + *

    This method notifies the state manager that the named field has been modified and should + * be included in the next flush/commit operation.

    + * + * @param s String the name of the field to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager associated with this entity. + * + * @return StateManager the state manager, or null if not associated + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for this entity. + * + *

    The version is used for optimistic locking to detect concurrent modifications.

    + * + * @return Object the version information, or null if no state manager is associated + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    If a state manager is already associated, it delegates to the existing manager's + * replaceStateManager method. Otherwise, directly assigns the new manager.

    + * + * @param pcStateManager StateManager the new state manager to associate + * @throws SecurityException if the state manager replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -391,27 +676,75 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This operation is not supported for this entity type.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values to an object ID. + * + *

    This operation is not supported for this entity type.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    Extracts the composite primary key from the object ID and stores it via the field consumer.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key field value + * @param o Object the source object ID containing the key value + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(6 + CachedAdmission.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key field values from an object ID directly to this entity. + * + *

    Extracts the composite primary key from the object ID and assigns it to this entity's + * facilityIdIntegerCompositePk field.

    + * + * @param o Object the source object ID containing the key value + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityIdIntegerCompositePk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This operation is not supported for this entity type as the ObjectId class does not + * provide the required constructors.

    + * + * @param o Object the string representation of the object ID + * @return Object never returns; always throws exception + * @throws IllegalArgumentException always thrown as this operation is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedAdmission\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance using this entity's current key field values. + * + * @return Object a new ObjectId instance containing this entity's composite primary key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedAdmission.class$Lca$openosp$openo$caisi_integrator$dao$CachedAdmission != null) ? CachedAdmission.class$Lca$openosp$openo$caisi_integrator$dao$CachedAdmission : (CachedAdmission.class$Lca$openosp$openo$caisi_integrator$dao$CachedAdmission = class$("ca.openosp.openo.caisi_integrator.dao.CachedAdmission")), (Object)this.facilityIdIntegerCompositePk); } @@ -527,7 +860,20 @@ private static final void pcSetfacilityIdIntegerCompositePk(final CachedAdmissio } cachedAdmission.pcStateManager.settingObjectField((PersistenceCapable)cachedAdmission, CachedAdmission.pcInheritedFieldCount + 6, (Object)cachedAdmission.facilityIdIntegerCompositePk, (Object)facilityIdIntegerCompositePk, 0); } - + + /** + * Checks if this entity is in a detached state. + * + *

    A detached entity is one that was previously managed by a persistence context but is no + * longer associated with an active context. This method provides a three-valued logic:

    + *
      + *
    • Boolean.TRUE - definitively detached
    • + *
    • Boolean.FALSE - definitively not detached
    • + *
    • null - detachment state cannot be determined
    • + *
    + * + * @return Boolean the detachment state, or null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -552,11 +898,27 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state information for this entity. + * + *

    The detached state contains metadata used by OpenJPA to manage detached entities, + * including version information for optimistic locking and loaded field tracking.

    + * + * @return Object the detached state object, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state information for this entity. + * + *

    This method is used internally by OpenJPA during detachment and attachment operations + * to maintain the entity's state tracking information.

    + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAppointment.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAppointment.java index dc03ede3f69..10e4d0665f2 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAppointment.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedAppointment.java @@ -20,6 +20,37 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing cached appointment data synchronized from external healthcare facilities + * through the CAISI Integrator system. This entity stores appointment information for patients + * across multiple integrated healthcare facilities, enabling centralized appointment management + * and scheduling coordination. + * + *

    The CachedAppointment entity is part of the CAISI (Collaborative Applications for Integrated + * Service Information) Integrator data access layer, which facilitates data sharing between + * different healthcare EMR installations. Each cached appointment is uniquely identified by a + * composite key combining the facility identifier and the appointment ID from the source system.

    + * + *

    This class uses OpenJPA bytecode enhancement to implement the PersistenceCapable interface, + * which provides field-level access tracking and change detection for JPA persistence operations. + * The enhancement generates numerous internal methods (prefixed with "pc") that manage the + * entity's persistence state.

    + * + *

    Healthcare Context: Appointment scheduling is a critical function in healthcare + * delivery. This entity supports multi-facility healthcare networks where patients may have appointments + * scheduled at different locations within the same healthcare organization or integrated network. + * By caching appointment data from external facilities, the system enables providers to view a + * comprehensive schedule across all integrated facilities.

    + * + *

    Field Trimming: String fields use Apache Commons StringUtils for automatic + * trimming. Provider ID uses trimToEmpty() to ensure non-null values, while other string fields + * use trimToNull() to convert blank strings to null for database storage efficiency.

    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedAppointment extends AbstractModel implements Comparable, PersistenceCapable { @@ -69,7 +100,15 @@ public class CachedAppointment extends AbstractModelAfter construction, the setter methods should be used to populate the appointment + * data with values from the external facility's appointment system.

    + */ public CachedAppointment() { this.caisiDemographicId = null; this.caisiProviderId = null; @@ -87,145 +126,396 @@ public CachedAppointment() { this.updateDatetime = null; this.remarks = null; } - + + /** + * Retrieves the composite primary key identifying this cached appointment. + * The composite key consists of the integrator facility ID and the appointment ID + * from the source CAISI system. + * + * @return FacilityIdIntegerCompositePk the composite primary key, or null if not yet set + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityAppointmentPk(this); } - + + /** + * Sets the composite primary key identifying this cached appointment. + * This method should be called during entity initialization to establish the + * appointment's unique identity within the cached data set. + * + * @param facilityAppointmentPk FacilityIdIntegerCompositePk the composite primary key + * containing the facility ID and appointment ID from the source system + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityAppointmentPk) { pcSetfacilityAppointmentPk(this, facilityAppointmentPk); } - + + /** + * Retrieves the scheduled date for this appointment. + * The appointment date indicates when the patient is scheduled to visit the healthcare + * facility, stored as a DATE temporal type without time component. + * + * @return Date the scheduled appointment date, or null if not set + */ public Date getAppointmentDate() { return pcGetappointmentDate(this); } - + + /** + * Sets the scheduled date for this appointment. + * This field is mandatory for scheduling and should represent the day on which + * the patient's appointment is booked. + * + * @param appointmentDate Date the scheduled appointment date + */ public void setAppointmentDate(final Date appointmentDate) { pcSetappointmentDate(this, appointmentDate); } - + + /** + * Retrieves the scheduled start time for this appointment. + * The start time indicates when the appointment begins, stored as a TIME temporal type. + * This should be used in conjunction with the appointment date to determine the exact + * date-time of the scheduled visit. + * + * @return Date the appointment start time, or null if not set + */ public Date getStartTime() { return pcGetstartTime(this); } - + + /** + * Sets the scheduled start time for this appointment. + * The start time should represent the time of day when the patient's appointment is + * scheduled to begin. + * + * @param startTime Date the appointment start time + */ public void setStartTime(final Date startTime) { pcSetstartTime(this, startTime); } - + + /** + * Retrieves the scheduled end time for this appointment. + * The end time indicates when the appointment is scheduled to conclude, stored as a + * TIME temporal type. The duration between start time and end time determines the + * length of the appointment slot. + * + * @return Date the appointment end time, or null if not set + */ public Date getEndTime() { return pcGetendTime(this); } - + + /** + * Sets the scheduled end time for this appointment. + * The end time should be after the start time and determines when the appointment + * slot is scheduled to conclude. + * + * @param endTime Date the appointment end time + */ public void setEndTime(final Date endTime) { pcSetendTime(this, endTime); } - + + /** + * Retrieves the CAISI demographic identifier for the patient associated with this appointment. + * This ID references the patient's record in the CAISI Integrator system and is used to + * link the appointment to the patient's demographic information. This field is indexed + * for efficient query performance. + * + * @return Integer the CAISI demographic ID, or null if not set + */ public Integer getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier for the patient associated with this appointment. + * This is a required field that establishes the link between the appointment and the + * patient's record in the CAISI Integrator system. + * + * @param caisiDemographicId Integer the CAISI demographic ID + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the CAISI provider identifier for the healthcare provider scheduled for this appointment. + * This ID references the provider's record in the CAISI Integrator system and identifies + * which healthcare provider will be seeing the patient. Maximum length is 16 characters. + * + * @return String the CAISI provider ID (never null, returns empty string if not set due to trimToEmpty) + */ public String getCaisiProviderId() { return pcGetcaisiProviderId(this); } - + + /** + * Sets the CAISI provider identifier for the healthcare provider scheduled for this appointment. + * This is a required field. The value is automatically trimmed to empty string (not null) + * using StringUtils.trimToEmpty to ensure a non-null value for database storage. + * + * @param caisiProviderId String the CAISI provider ID (maximum 16 characters, will be trimmed) + */ public void setCaisiProviderId(final String caisiProviderId) { pcSetcaisiProviderId(this, StringUtils.trimToEmpty(caisiProviderId)); } - + + /** + * Retrieves the physical location or room designation for this appointment. + * This field indicates where within the healthcare facility the appointment will take place, + * such as a specific exam room, clinic area, or department. Maximum length is 30 characters. + * + * @return String the appointment location, or null if not specified + */ public String getLocation() { return pcGetlocation(this); } - + + /** + * Sets the physical location or room designation for this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param location String the appointment location (maximum 30 characters, will be trimmed to null if blank) + */ public void setLocation(final String location) { pcSetlocation(this, StringUtils.trimToNull(location)); } - + + /** + * Retrieves the clinical or administrative notes associated with this appointment. + * Notes may contain special instructions, preparation requirements, or other relevant + * information for the appointment. Maximum length is 80 characters. + * + * @return String the appointment notes, or null if not specified + */ public String getNotes() { return pcGetnotes(this); } - + + /** + * Sets the clinical or administrative notes for this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param notes String the appointment notes (maximum 80 characters, will be trimmed to null if blank) + */ public void setNotes(final String notes) { pcSetnotes(this, StringUtils.trimToNull(notes)); } - + + /** + * Retrieves the reason or purpose for this appointment. + * This field describes why the patient is scheduling the visit, such as "Annual Physical", + * "Follow-up", or specific symptoms/concerns. Maximum length is 80 characters. + * + * @return String the appointment reason, or null if not specified + */ public String getReason() { return pcGetreason(this); } - + + /** + * Sets the reason or purpose for this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param reason String the appointment reason (maximum 80 characters, will be trimmed to null if blank) + */ public void setReason(final String reason) { pcSetreason(this, StringUtils.trimToNull(reason)); } - + + /** + * Retrieves additional remarks or comments about this appointment. + * Remarks provide a free-text field for any supplementary information that doesn't + * fit in other structured fields. Maximum length is 50 characters. + * + * @return String the appointment remarks, or null if not specified + */ public String getRemarks() { return pcGetremarks(this); } - + + /** + * Sets additional remarks or comments for this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param remarks String the appointment remarks (maximum 50 characters, will be trimmed to null if blank) + */ public void setRemarks(final String remarks) { pcSetremarks(this, StringUtils.trimToNull(remarks)); } - + + /** + * Retrieves the resources or equipment required for this appointment. + * This field may list medical equipment, interpreters, or other special resources + * needed for the appointment. Maximum length is 255 characters. + * + * @return String the required resources, or null if not specified + */ public String getResources() { return pcGetresources(this); } - + + /** + * Sets the resources or equipment required for this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param resources String the required resources (maximum 255 characters, will be trimmed to null if blank) + */ public void setResources(final String resources) { pcSetresources(this, StringUtils.trimToNull(resources)); } - + + /** + * Retrieves the current status of this appointment. + * Status indicates the appointment's state such as scheduled, confirmed, cancelled, + * completed, or no-show. Maximum length is 2 characters, typically using status codes. + * + * @return String the appointment status code, or null if not specified + */ public String getStatus() { return pcGetstatus(this); } - + + /** + * Sets the current status of this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param status String the appointment status code (maximum 2 characters, will be trimmed to null if blank) + */ public void setStatus(final String status) { pcSetstatus(this, StringUtils.trimToNull(status)); } - + + /** + * Retrieves the display style or visual classification for this appointment. + * Style may be used to control how the appointment appears in calendar views or + * scheduling interfaces, such as color coding or icon selection. Maximum length is 10 characters. + * + * @return String the appointment style, or null if not specified + */ public String getStyle() { return pcGetstyle(this); } - + + /** + * Sets the display style or visual classification for this appointment. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param style String the appointment style (maximum 10 characters, will be trimmed to null if blank) + */ public void setStyle(final String style) { pcSetstyle(this, StringUtils.trimToNull(style)); } - + + /** + * Retrieves the appointment type classification. + * Type categorizes appointments by their nature, such as "Office Visit", "Telephone Consult", + * "Virtual Visit", or other appointment categories used by the healthcare facility. + * Maximum length is 10 characters. + * + * @return String the appointment type, or null if not specified + */ public String getType() { return pcGettype(this); } - + + /** + * Sets the appointment type classification. + * The value is automatically trimmed to null using StringUtils.trimToNull, + * converting blank strings to null for efficient database storage. + * + * @param type String the appointment type (maximum 10 characters, will be trimmed to null if blank) + */ public void setType(final String type) { pcSettype(this, StringUtils.trimToNull(type)); } - + + /** + * Retrieves the timestamp when this appointment record was created. + * This field provides an audit trail of when the appointment was initially scheduled + * or when the cached record was first synchronized from the external facility system. + * + * @return Date the creation timestamp, or null if not set + */ public Date getCreateDatetime() { return pcGetcreateDatetime(this); } - + + /** + * Sets the timestamp when this appointment record was created. + * This field should be set when the appointment is first created or when the cached + * record is initially synchronized from the external facility. + * + * @param createDatetime Date the creation timestamp + */ public void setCreateDatetime(final Date createDatetime) { pcSetcreateDatetime(this, createDatetime); } - + + /** + * Retrieves the timestamp when this appointment record was last updated. + * This field provides an audit trail of the most recent modification to the appointment + * data, whether from rescheduling, status changes, or cache synchronization updates. + * + * @return Date the last update timestamp, or null if never updated + */ public Date getUpdateDatetime() { return pcGetupdateDatetime(this); } - + + /** + * Sets the timestamp when this appointment record was last updated. + * This field should be updated whenever any appointment data is modified or when + * the cached record is re-synchronized from the external facility. + * + * @param updateDatetime Date the last update timestamp + */ public void setUpdateDatetime(final Date updateDatetime) { pcSetupdateDatetime(this, updateDatetime); } - + + /** + * Compares this appointment to another CachedAppointment for ordering purposes. + * Appointments are ordered by their CAISI item ID from the composite primary key. + * This enables consistent sorting of appointments when displayed in lists or collections. + * + * @param o CachedAppointment the appointment to compare against + * @return int negative if this appointment's ID is less, zero if equal, positive if greater + */ @Override public int compareTo(final CachedAppointment o) { return pcGetfacilityAppointmentPk(this).getCaisiItemId() - pcGetfacilityAppointmentPk(o).getCaisiItemId(); } - + + /** + * Retrieves the composite primary key identifier for this appointment. + * This method is required by the AbstractModel base class and provides access to + * the entity's unique identifier for persistence operations. + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityAppointmentPk(this); } - + + /** + * Returns the OpenJPA bytecode enhancement contract version. + * This method is part of the PersistenceCapable interface and is used by OpenJPA + * to verify compatibility between the enhanced entity class and the runtime environment. + * + * @return int the enhancement contract version (always 2 for this entity) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -246,7 +536,12 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default null values. + * This method is part of the OpenJPA persistence capability and is used during + * entity state management operations such as detachment or clearing. + */ protected void pcClearFields() { this.appointmentDate = null; this.caisiDemographicId = null; @@ -265,7 +560,17 @@ protected void pcClearFields() { this.type = null; this.updateDatetime = null; } - + + /** + * Creates a new instance of CachedAppointment with the specified state manager and object ID. + * This method is part of the PersistenceCapable interface and is used by OpenJPA + * during entity instantiation and persistence operations. + * + * @param pcStateManager StateManager the state manager to attach to the new instance + * @param o Object the object ID to use for key field initialization + * @param b boolean if true, clears all fields after initialization + * @return PersistenceCapable the newly created CachedAppointment instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedAppointment cachedAppointment = new CachedAppointment(); if (b) { @@ -275,7 +580,16 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedAppointment.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedAppointment; } - + + /** + * Creates a new instance of CachedAppointment with the specified state manager. + * This method is part of the PersistenceCapable interface and is used by OpenJPA + * during entity instantiation when no object ID is available. + * + * @param pcStateManager StateManager the state manager to attach to the new instance + * @param b boolean if true, clears all fields after initialization + * @return PersistenceCapable the newly created CachedAppointment instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedAppointment cachedAppointment = new CachedAppointment(); if (b) { @@ -284,11 +598,26 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedAppointment.pcStateManager = pcStateManager; return (PersistenceCapable)cachedAppointment; } - + + /** + * Returns the count of managed persistent fields in this entity. + * This method is used by OpenJPA to determine how many fields are under + * persistence management for state tracking and change detection. + * + * @return int the number of managed fields (16 for this entity) + */ protected static int pcGetManagedFieldCount() { return 16; } - + + /** + * Replaces a single field value from the state manager during persistence operations. + * This method is part of the PersistenceCapable interface and is invoked by OpenJPA + * when restoring entity state from the database or during refresh operations. + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedAppointment.pcInheritedFieldCount; if (n2 < 0) { @@ -364,13 +693,28 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values from the state manager during persistence operations. + * This method delegates to pcReplaceField for each field index in the array, + * providing an efficient batch operation for state restoration. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the state manager during persistence operations. + * This method is part of the PersistenceCapable interface and is invoked by OpenJPA + * when saving entity state to the database or during flush operations. + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedAppointment.pcInheritedFieldCount; if (n2 < 0) { @@ -446,13 +790,29 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager during persistence operations. + * This method delegates to pcProvideField for each field index in the array, + * providing an efficient batch operation for state persistence. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another CachedAppointment instance. + * This method is used by OpenJPA during entity merge and copy operations + * to transfer field values between entity instances. + * + * @param cachedAppointment CachedAppointment the source appointment to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedAppointment cachedAppointment, final int n) { final int n2 = n - CachedAppointment.pcInheritedFieldCount; if (n2 < 0) { @@ -528,7 +888,17 @@ protected void pcCopyField(final CachedAppointment cachedAppointment, final int } } } - + + /** + * Copies multiple field values from another entity instance. + * This method delegates to pcCopyField for each field index, enabling efficient + * batch copying during merge and detachment operations. + * + * @param o Object the source appointment to copy from (must be a CachedAppointment) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source has a different state manager + * @throws IllegalStateException if this entity has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedAppointment cachedAppointment = (CachedAppointment)o; if (cachedAppointment.pcStateManager != this.pcStateManager) { @@ -541,25 +911,53 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedAppointment, array[i]); } } - + + /** + * Retrieves the generic context object from the state manager. + * This method provides access to the OpenJPA context associated with this entity, + * which may contain framework-specific metadata and configuration. + * + * @return Object the generic context, or null if no state manager is attached + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the OpenJPA object ID for this entity. + * The object ID uniquely identifies this entity within the persistence context + * and is used for entity lookup and caching operations. + * + * @return Object the OpenJPA object ID, or null if no state manager is attached + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this entity has been marked for deletion. + * This method is used by OpenJPA to track entities that have been removed + * but may not yet be deleted from the database. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this entity has been modified since it was loaded or last saved. + * This method is used by OpenJPA to determine if the entity needs to be persisted + * during transaction commit. Triggers a dirty check through RedefinitionHelper. + * + * @return boolean true if the entity has unsaved changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -568,41 +966,99 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this entity is newly created and not yet persisted to the database. + * New entities have not been assigned a database-generated ID and have not been + * saved in a transaction. + * + * @return boolean true if the entity is new and unpersisted, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this entity is managed by the persistence context. + * Persistent entities are tracked by OpenJPA and will have their changes + * automatically synchronized with the database during transaction commit. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this entity is associated with a transaction. + * Transactional entities are being tracked within a database transaction + * and their changes will be committed or rolled back with the transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this entity is currently being serialized. + * This method is used during object serialization to determine if special + * handling is needed for the entity's state. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty, indicating it has been modified. + * This method notifies the state manager that a field has changed and needs + * to be persisted during the next flush or commit operation. + * + * @param s String the field name that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager associated with this entity. + * The state manager handles all persistence operations, field access tracking, + * and dirty checking for this entity instance. + * + * @return StateManager the state manager, or null if not attached + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version object for this entity used in optimistic locking. + * The version is incremented each time the entity is updated, preventing + * lost update problems in concurrent access scenarios. + * + * @return Object the version object, or null if no state manager is attached + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * This method is used by OpenJPA during entity attachment, detachment, and + * context transfer operations. If a state manager already exists, it delegates + * the replacement to the current state manager. + * + * @param pcStateManager StateManager the new state manager to attach + * @throws SecurityException if the state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -610,27 +1066,75 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * This method is not supported for this entity type and will throw an InternalException. + * The entity uses embedded ID which requires different object ID handling. + * + * @param fieldSupplier FieldSupplier the field supplier for copying values + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * This method is not supported for this entity type and will throw an InternalException. + * The entity uses embedded ID which requires different object ID handling. + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an OpenJPA object ID using a field consumer. + * This method extracts the embedded composite key from the object ID and stores it + * using the provided field consumer at the appropriate field index. + * + * @param fieldConsumer FieldConsumer the field consumer for storing values + * @param o Object the source OpenJPA ObjectId containing the key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(5 + CachedAppointment.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from an OpenJPA object ID to this entity's composite key field. + * This method extracts the embedded composite key from the object ID and assigns it + * to the facilityAppointmentPk field. + * + * @param o Object the source OpenJPA ObjectId containing the embedded key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityAppointmentPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * This method is not supported for this entity type because OpenJPA ObjectId + * does not provide the required string constructor for this entity's ID type. + * + * @param o Object the string representation of the object ID + * @return Object (never returns - always throws exception) + * @throws IllegalArgumentException always thrown as this operation is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedAppointment\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new OpenJPA object ID instance for this entity. + * The object ID encapsulates the embedded composite key (facilityAppointmentPk) + * and is used by OpenJPA for entity identification and caching. + * + * @return Object the newly created OpenJPA ObjectId containing this entity's key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedAppointment.class$Lca$openosp$openo$caisi_integrator$dao$CachedAppointment != null) ? CachedAppointment.class$Lca$openosp$openo$caisi_integrator$dao$CachedAppointment : (CachedAppointment.class$Lca$openosp$openo$caisi_integrator$dao$CachedAppointment = class$("ca.openosp.openo.caisi_integrator.dao.CachedAppointment")), (Object)this.facilityAppointmentPk); } @@ -890,7 +1394,14 @@ private static final void pcSetupdateDatetime(final CachedAppointment cachedAppo } cachedAppointment.pcStateManager.settingObjectField((PersistenceCapable)cachedAppointment, CachedAppointment.pcInheritedFieldCount + 15, (Object)cachedAppointment.updateDatetime, (Object)updateDatetime, 0); } - + + /** + * Checks whether this entity is in a detached state. + * A detached entity has been previously managed but is no longer associated with + * a persistence context. Returns null if the detached state cannot be definitively determined. + * + * @return Boolean TRUE if detached, FALSE if attached, null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -911,19 +1422,48 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Determines if the detached state can be definitively determined. + * This entity always returns false, indicating that the detached state + * may be indeterminate in some cases. + * + * @return boolean always returns false for this entity + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * The detached state tracks information about the entity's previous attachment + * to a persistence context, used during merge and reattachment operations. + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * This method is called by OpenJPA when the entity is detached from a persistence + * context or during deserialization to track the entity's detachment state. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method called during entity serialization. + * Ensures proper handling of the entity's state during serialization by clearing + * the detached state if the entity is being serialized by the persistence framework. + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -931,7 +1471,16 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method called during entity deserialization. + * Marks the entity as deserialized by setting the detached state to the DESERIALIZED + * constant, then performs default deserialization of the object's fields. + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedBillingOnItem.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedBillingOnItem.java index f9f56052a13..edb280cdf20 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedBillingOnItem.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedBillingOnItem.java @@ -20,6 +20,32 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing a cached Ontario billing item within the CAISI Integrator system. + * + * This entity is part of OpenO EMR's multi-facility integration framework, specifically designed + * to cache Ontario-specific billing data (ON billing items) across integrated healthcare facilities. + * The CAISI Integrator allows multiple OpenO EMR installations to share patient data, appointments, + * and billing information in a federated healthcare network. + * + *

    The cached billing items include essential billing information such as service codes, diagnostic + * codes (dx, dx1, dx2), provider identifiers, appointment references, and billing status. This caching + * mechanism improves performance when accessing billing data across multiple facilities and provides + * a local copy for integrator queries.

    + * + *

    Healthcare Context: Ontario billing uses province-specific service codes (OHIP Schedule of + * Benefits) and diagnostic codes (ICD-9/ICD-10). This entity captures billing submissions including + * the primary service provider (caisiProviderId), appointment provider (apptProviderId), and assistant + * provider (asstProviderId) for procedures requiring multiple healthcare professionals.

    + * + *

    OpenJPA Enhancement: This class implements {@link PersistenceCapable} and contains + * bytecode-enhanced methods (prefixed with "pc") auto-generated by OpenJPA for persistence operations. + * These methods handle field access tracking, state management, and object identity for JPA operations.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @since 2026-01-24 + */ @Entity public class CachedBillingOnItem extends AbstractModel implements Comparable, PersistenceCapable { @@ -62,7 +88,13 @@ public class CachedBillingOnItem extends AbstractModelThis entity contains Protected Health Information (PHI) including: + *
      + *
    • Patient identification (name, date of birth, gender)
    • + *
    • Health Insurance Number (HIN) with validity periods
    • + *
    • Social Insurance Number (SIN)
    • + *
    • Contact information (address, phone numbers)
    • + *
    • Geographic location (province, city)
    • + *
    + * + *

    The entity is enhanced by Apache OpenJPA for persistence management, implementing the {@link PersistenceCapable} + * interface which provides automatic field-level tracking, lazy loading, and state management. The enhancement + * process generates additional methods (prefixed with "pc") that handle low-level persistence operations. + * + *

    Security Considerations: + *

      + *
    • All access to this entity must be authorized through {@code SecurityInfoManager}
    • + *
    • PHI data must never be logged or exposed in error messages
    • + *
    • HIN and SIN values are stored in lowercase for consistent matching
    • + *
    • Audit trail maintained via {@code lastUpdateUser} and {@code lastUpdateDate}
    • + *
    + * + *

    Data Normalization: + * Several fields are automatically normalized on input: + *

      + *
    • HIN, SIN, province, city: converted to lowercase and trimmed
    • + *
    • String fields: trimmed with null conversion for empty strings
    • + *
    • Dates: stored as temporal types (DATE or TIMESTAMP)
    • + *
    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedDemographic extends AbstractModel implements Comparable, PersistenceCapable { @@ -77,7 +118,13 @@ public class CachedDemographic extends AbstractModelNote: SIN collection should be limited to cases where legally required. + * + * @return String the patient's SIN in lowercase, or null if not set + */ public String getSin() { return pcGetsin(this); } - + + /** + * Sets the patient's Social Insurance Number (SIN). + * + * The value is automatically converted to lowercase, trimmed, and set to null if empty. + * + * @param sin String the patient's SIN (will be normalized to lowercase) + */ public void setSin(final String sin) { pcSetsin(this, MiscUtils.trimToNullLowerCase(sin)); } - + + /** + * Retrieves the patient's province or territory code. + * + * Typically a 2-character provincial code (e.g., "on", "bc", "ab"). Maximum length is 4 characters. + * Stored in lowercase for consistent matching. + * + * @return String the province/territory code in lowercase, or null if not set + */ public String getProvince() { return pcGetprovince(this); } - + + /** + * Sets the patient's province or territory code. + * + * The value is automatically converted to lowercase, trimmed, and set to null if empty. + * + * @param province String the province/territory code (will be normalized to lowercase) + */ public void setProvince(final String province) { pcSetprovince(this, MiscUtils.trimToNullLowerCase(province)); } - + + /** + * Retrieves the patient's city of residence. + * + * Maximum length is 128 characters. Stored in lowercase for consistent matching. + * + * @return String the city name in lowercase, or null if not set + */ public String getCity() { return pcGetcity(this); } - + + /** + * Sets the patient's city of residence. + * + * The value is automatically converted to lowercase, trimmed, and set to null if empty. + * + * @param city String the city name (will be normalized to lowercase) + */ public void setCity(final String city) { pcSetcity(this, MiscUtils.trimToNullLowerCase(city)); } - + + /** + * Retrieves the HIN type indicator. + * + * Different provinces may use different HIN types or categories. Maximum length is 32 characters. + * + * @return String the HIN type, or null if not applicable + */ public String getHinType() { return pcGethinType(this); } - + + /** + * Sets the HIN type indicator. + * + * The value is automatically trimmed and converted to null if empty or whitespace-only. + * + * @param hinType String the HIN type + */ public void setHinType(final String hinType) { pcSethinType(this, StringUtils.trimToNull(hinType)); } - + + /** + * Retrieves the CAISI provider identifier. + * + * This is the provider ID from the CAISI system associated with this demographic record. + * Maximum length is 16 characters. + * + * @return String the CAISI provider ID, or null if not set + */ public String getCaisiProviderId() { return pcGetcaisiProviderId(this); } - + + /** + * Sets the CAISI provider identifier. + * + * The value is automatically trimmed and converted to null if empty or whitespace-only. + * + * @param caisiProviderId String the CAISI provider ID + */ public void setCaisiProviderId(final String caisiProviderId) { pcSetcaisiProviderId(this, StringUtils.trimToNull(caisiProviderId)); } - + + /** + * Retrieves the identifier hash for privacy-preserving record matching. + * + * This hash may be used for matching records across facilities without exposing actual identifiers. + * Maximum length is 32 characters. + * + * @return String the ID hash, or null if not set + */ public String getIdHash() { return pcGetidHash(this); } - + + /** + * Sets the identifier hash for privacy-preserving record matching. + * + * The value is automatically trimmed and converted to null if empty or whitespace-only. + * + * @param idHash String the ID hash value + */ public void setIdHash(final String idHash) { pcSetidHash(this, StringUtils.trimToNull(idHash)); } - + + /** + * Retrieves the patient's street address. + * + * Maximum length is 128 characters. This field is not normalized to lowercase. + * + * @return String the street address, or null if not set + */ public String getStreetAddress() { return pcGetstreetAddress(this); } - + + /** + * Sets the patient's street address. + * + * @param streetAddress String the street address + */ public void setStreetAddress(final String streetAddress) { pcSetstreetAddress(this, streetAddress); } - + + /** + * Retrieves the patient's primary phone number. + * + * Maximum length is 64 characters. No specific format is enforced. + * + * @return String the primary phone number, or null if not set + */ public String getPhone1() { return pcGetphone1(this); } - + + /** + * Sets the patient's primary phone number. + * + * @param phone1 String the primary phone number + */ public void setPhone1(final String phone1) { pcSetphone1(this, phone1); } - + + /** + * Retrieves the patient's secondary phone number. + * + * Maximum length is 64 characters. No specific format is enforced. + * + * @return String the secondary phone number, or null if not set + */ public String getPhone2() { return pcGetphone2(this); } - + + /** + * Sets the patient's secondary phone number. + * + * @param phone2 String the secondary phone number + */ public void setPhone2(final String phone2) { pcSetphone2(this, phone2); } - + + /** + * Retrieves the HIN validity start date. + * + * Indicates when the patient's health insurance coverage begins or when the current HIN became valid. + * + * @return Date the HIN validity start date, or null if not set + */ public Date getHinValidStart() { return pcGethinValidStart(this); } - + + /** + * Sets the HIN validity start date. + * + * @param hinValidStart Date the HIN validity start date + */ public void setHinValidStart(final Date hinValidStart) { pcSethinValidStart(this, hinValidStart); } - + + /** + * Retrieves the HIN validity end date. + * + * Indicates when the patient's health insurance coverage expires or when the current HIN expires. + * + * @return Date the HIN validity end date, or null if not set + */ public Date getHinValidEnd() { return pcGethinValidEnd(this); } - + + /** + * Sets the HIN validity end date. + * + * @param hinValidEnd Date the HIN validity end date + */ public void setHinValidEnd(final Date hinValidEnd) { pcSethinValidEnd(this, hinValidEnd); } - + + /** + * Compares this cached demographic to another based on CAISI item ID. + * + * The comparison is performed using the numeric CAISI item ID from the composite primary key. + * This provides a natural ordering for cached demographic records. + * + * @param o CachedDemographic the other cached demographic to compare to + * @return int negative if this record's ID is less, zero if equal, positive if greater + */ @Override public int compareTo(final CachedDemographic o) { return pcGetfacilityDemographicPk(this).getCaisiItemId() - pcGetfacilityDemographicPk(o).getCaisiItemId(); } - + + /** + * Retrieves the entity's primary key identifier. + * + * This is an alias for {@link #getFacilityIdIntegerCompositePk()} required by the + * AbstractModel base class. + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityDemographicPk(this); } - + + /** + * Retrieves the username of the user who last updated this record. + * + * This field is part of the audit trail for PHI access and modifications. + * Maximum length is 16 characters. + * + * @return String the username of the last updating user, or null if not set + */ public String getLastUpdateUser() { return pcGetlastUpdateUser(this); } - + + /** + * Sets the username of the user who last updated this record. + * + * @param lastUpdateUser String the username of the updating user + */ public void setLastUpdateUser(final String lastUpdateUser) { pcSetlastUpdateUser(this, lastUpdateUser); } - + + /** + * Retrieves the timestamp of the last update to this record. + * + * This field is part of the audit trail for PHI access and modifications. + * Stored with TIMESTAMP temporal type (includes date and time). + * + * @return Date the last update timestamp, or null if not set + */ public Date getLastUpdateDate() { return pcGetlastUpdateDate(this); } - + + /** + * Sets the timestamp of the last update to this record. + * + * @param lastUpdateDate Date the last update timestamp + */ public void setLastUpdateDate(final Date lastUpdateDate) { pcSetlastUpdateDate(this, lastUpdateDate); } - + + /** + * Returns the OpenJPA enhancement contract version. + * + * This method is part of the PersistenceCapable contract and indicates which version + * of the OpenJPA enhancement specification this class implements. + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -1091,13 +1432,39 @@ private void readObject(final ObjectInputStream objectInputStream) throws IOExce this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); } - + + /** + * Enumeration representing patient gender identity options. + * + * This enum provides standardized gender values for demographic records in compliance + * with Canadian healthcare privacy and human rights requirements. The values support + * both traditional binary gender categories and inclusive options for diverse gender identities. + * + *

    Values: + *

      + *
    • M - Male
    • + *
    • F - Female
    • + *
    • T - Transgender/Trans
    • + *
    • O - Other/Non-binary
    • + *
    • U - Undisclosed/Unknown/Prefer not to answer
    • + *
    + * + *

    The gender field is stored as a single character in the database and should be handled + * with appropriate privacy and respect for patient identity. + * + * @since 2026-01-24 + */ public enum Gender { - M, - F, - T, - O, + /** Male */ + M, + /** Female */ + F, + /** Transgender/Trans */ + T, + /** Other/Non-binary */ + O, + /** Undisclosed/Unknown/Prefer not to answer */ U; } } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicAllergy.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicAllergy.java index f5731272c71..34b6b9367ab 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicAllergy.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicAllergy.java @@ -20,6 +20,32 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing a cached demographic allergy record from the CAISI integrator. + * + * This class stores patient allergy information synchronized from remote healthcare facilities + * through the CAISI (Client Access to Integrated Services and Information) integrator system. + * It maintains a local cache of allergy data to enable efficient cross-facility patient care + * and continuity of care across multiple healthcare organizations. + * + * The entity is enhanced by Apache OpenJPA for persistence capabilities and implements the + * PersistenceCapable interface to support advanced JPA features including detachment, + * change tracking, and state management. + * + * Key healthcare data captured includes: + *

      + *
    • Allergy description and reaction details
    • + *
    • Severity codes and onset information
    • + *
    • Hierarchical classification codes (HIC, HICL)
    • + *
    • Regional identifiers for cross-jurisdictional care
    • + *
    • Temporal information (entry date, start date, life stage)
    • + *
    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedDemographicAllergy extends AbstractModel implements PersistenceCapable { @@ -57,152 +83,343 @@ public class CachedDemographicAllergy extends AbstractModelThis entity manages patient consent information for sharing demographic and clinical data + * across multiple healthcare facilities within the integrated care network. It supports + * facility-specific consent preferences, mental health data exclusion, consent expiration, + * and various consent status states (GIVEN, REVOKED).

    + * + *

    The class is enhanced by OpenJPA for persistence capability, providing automatic + * state management and field-level access tracking. All persistence operations are + * delegated to the OpenJPA StateManager for transaction consistency.

    + * + *

    Healthcare Context: In multi-facility integrated care environments, + * patient consent must be tracked per facility to comply with privacy regulations (PIPEDA/HIPAA). + * This entity caches consent decisions to minimize database lookups during patient data + * retrieval operations.

    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see ConsentStatus + * @since 2026-01-24 + */ @Entity public class CachedDemographicConsent extends AbstractModel implements PersistenceCapable { @@ -56,7 +78,14 @@ public class CachedDemographicConsent extends AbstractModelInitializes the consent data map, sets default exclusion flags, and prepares + * the entity for persistence. All date fields and consent status are initialized + * to null, requiring explicit setting before persistence.

    + */ public CachedDemographicConsent() { this.createdDate = null; this.consentToShareData = new HashMap(); @@ -64,36 +93,101 @@ public CachedDemographicConsent() { this.clientConsentStatus = null; this.expiry = null; } - + + /** + * Retrieves the composite primary key for this consent record. + * + *

    The primary key combines the facility ID and demographic ID, + * uniquely identifying a patient's consent record within a specific facility.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key containing facility and demographic identifiers + */ public FacilityIdIntegerCompositePk getFacilityDemographicPk() { return pcGetfacilityDemographicPk(this); } - + + /** + * Sets the composite primary key for this consent record. + * + *

    This method should be called when creating a new consent record to establish + * the association between a patient (demographic) and a facility.

    + * + * @param facilityDemographicPk FacilityIdIntegerCompositePk the composite key to assign + */ public void setFacilityDemographicPk(final FacilityIdIntegerCompositePk facilityDemographicPk) { pcSetfacilityDemographicPk(this, facilityDemographicPk); } - + + /** + * Retrieves the timestamp when this consent record was created. + * + * @return Date the creation timestamp, or null if not yet set + */ public Date getCreatedDate() { return pcGetcreatedDate(this); } - + + /** + * Sets the creation timestamp for this consent record. + * + * @param createdDate Date the timestamp to set + */ public void setCreatedDate(final Date createdDate) { pcSetcreatedDate(this, createdDate); } - + + /** + * Retrieves the entity identifier. + * + *

    This method overrides the parent AbstractModel getId() method to return + * the composite primary key as the entity identifier.

    + * + * @return FacilityIdIntegerCompositePk the entity's composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityDemographicPk(this); } - + + /** + * Retrieves the facility-specific consent preferences map. + * + *

    This map contains consent decisions for each integrator facility, + * where the key is the integrator facility ID and the value indicates + * whether the patient consents to share data with that facility.

    + * + * @return Map<Integer, Boolean> map of facility IDs to consent decisions + */ public Map getConsentToShareData() { return pcGetconsentToShareData(this); } - + + /** + * Sets the facility-specific consent preferences map. + * + * @param consentToShareData Map<Integer, Boolean> map of facility IDs to consent decisions + */ public void setConsentToShareData(final Map consentToShareData) { pcSetconsentToShareData(this, consentToShareData); } - + + /** + * Determines whether patient data can be shared with a specific facility. + * + *

    This method evaluates multiple criteria to determine data sharing permission:

    + *
      + *
    • Consent status must be GIVEN (not REVOKED)
    • + *
    • Consent must not be expired (expiry date must be in the future or null)
    • + *
    • Facility-specific consent must be true or unspecified (defaults to true)
    • + *
    + * + *

    Privacy Compliance: This method implements PIPEDA/HIPAA-compliant + * consent verification, ensuring patient data is only shared when explicitly permitted + * and within valid time bounds.

    + * + * @param integratorFacilityId Integer the integrator facility ID to check consent for + * @return boolean true if data sharing is allowed, false otherwise + */ public boolean allowedToShareData(final Integer integratorFacilityId) { if (pcGetclientConsentStatus(this) != ConsentStatus.GIVEN) { return false; @@ -104,31 +198,75 @@ public boolean allowedToShareData(final Integer integratorFacilityId) { final Boolean result = (Boolean)((Map)pcGetconsentToShareData(this)).get(integratorFacilityId); return result == null || result; } - + + /** + * Checks whether mental health data should be excluded from sharing. + * + *

    Patients may consent to general data sharing while excluding sensitive + * mental health information due to stigma or privacy concerns.

    + * + * @return boolean true if mental health data should be excluded, false otherwise + */ public boolean isExcludeMentalHealthData() { return pcGetexcludeMentalHealthData(this); } - + + /** + * Sets whether mental health data should be excluded from sharing. + * + * @param excludeMentalHealthData boolean true to exclude mental health data, false to include + */ public void setExcludeMentalHealthData(final boolean excludeMentalHealthData) { pcSetexcludeMentalHealthData(this, excludeMentalHealthData); } - + + /** + * Retrieves the current consent status. + * + * @return ConsentStatus the consent status (GIVEN or REVOKED), or null if not set + */ public ConsentStatus getClientConsentStatus() { return pcGetclientConsentStatus(this); } - + + /** + * Sets the consent status. + * + * @param clientConsentStatus ConsentStatus the status to set (GIVEN or REVOKED) + */ public void setClientConsentStatus(final ConsentStatus clientConsentStatus) { pcSetclientConsentStatus(this, clientConsentStatus); } - + + /** + * Retrieves the consent expiry date. + * + *

    If null, the consent does not expire. If set, consent is only valid + * until the specified date.

    + * + * @return Date the expiry date, or null if no expiration is set + */ public Date getExpiry() { return pcGetexpiry(this); } - + + /** + * Sets the consent expiry date. + * + * @param expiry Date the expiry date to set, or null for no expiration + */ public void setExpiry(final Date expiry) { pcSetexpiry(this, expiry); } - + + /** + * Returns the OpenJPA enhancement contract version. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and + * indicates the version of the bytecode enhancement applied to this class.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -158,7 +296,19 @@ protected void pcClearFields() { this.expiry = null; this.facilityDemographicPk = null; } - + + /** + * Creates a new instance of this persistent class with a StateManager and object ID. + * + *

    This method is called by OpenJPA during entity instantiation when an object ID + * is available. It creates a new instance, optionally clears fields, assigns the + * StateManager, and copies key fields from the object ID.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param o Object the object ID containing key field values + * @param b boolean true to clear all fields after instantiation + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicConsent cachedDemographicConsent = new CachedDemographicConsent(); if (b) { @@ -168,7 +318,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicConsent.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicConsent; } - + + /** + * Creates a new instance of this persistent class with a StateManager. + * + *

    This method is called by OpenJPA during entity instantiation when no object ID + * is available. It creates a new instance, optionally clears fields, and assigns + * the StateManager.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param b boolean true to clear all fields after instantiation + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicConsent cachedDemographicConsent = new CachedDemographicConsent(); if (b) { @@ -181,7 +342,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final protected static int pcGetManagedFieldCount() { return 6; } - + + /** + * Replaces a single field value using the StateManager. + * + *

    This method is called by OpenJPA to replace field values during merge, + * refresh, or other state management operations. The field index is adjusted + * for inheritance and mapped to the appropriate field.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicConsent.pcInheritedFieldCount; if (n2 < 0) { @@ -217,13 +388,28 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values using the StateManager. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the StateManager. + * + *

    This method is called by OpenJPA to read field values during persistence + * operations. The field index is adjusted for inheritance and the appropriate + * field value is provided to the StateManager.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicConsent.pcInheritedFieldCount; if (n2 < 0) { @@ -259,7 +445,12 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the StateManager. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -301,7 +492,19 @@ protected void pcCopyField(final CachedDemographicConsent cachedDemographicConse } } } - + + /** + * Copies field values from another instance. + * + *

    This method is called by OpenJPA to copy field values between instances + * during merge or clone operations. Both instances must be managed by the + * same StateManager.

    + * + * @param o Object the source instance to copy from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the instances have different StateManagers + * @throws IllegalStateException if this instance has no StateManager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicConsent cachedDemographicConsent = (CachedDemographicConsent)o; if (cachedDemographicConsent.pcStateManager != this.pcStateManager) { @@ -314,25 +517,45 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicConsent, array[i]); } } - + + /** + * Retrieves the generic context from the StateManager. + * + * @return Object the generic context, or null if no StateManager is present + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID from the StateManager. + * + * @return Object the object ID, or null if no StateManager is present + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this instance has been deleted. + * + * @return boolean true if deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this instance has been modified. + * + * @return boolean true if modified since last persistence operation, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -341,41 +564,82 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this instance is newly created and not yet persisted. + * + * @return boolean true if new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this instance is persistent (managed by the persistence context). + * + * @return boolean true if persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this instance is transactional. + * + * @return boolean true if participating in a transaction, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this instance is currently being serialized. + * + * @return boolean true if serializing, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty (modified). + * + * @param s String the field name to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the StateManager for this instance. + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version object for optimistic locking. + * + * @return Object the version, or null if no StateManager is present + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the StateManager for this instance. + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if the operation violates security constraints + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -383,27 +647,70 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a FieldSupplier. + * + *

    This operation is not supported for this entity type.

    + * + * @param fieldSupplier FieldSupplier the field supplier + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + *

    This operation is not supported for this entity type.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a FieldConsumer. + * + * @param fieldConsumer FieldConsumer the field consumer to store field values + * @param o Object the source object ID + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(5 + CachedDemographicConsent.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from an object ID. + * + * @param o Object the source object ID containing the facility demographic primary key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityDemographicPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string. + * + *

    This operation is not supported for this entity type as ObjectId + * does not have a String constructor.

    + * + * @param o Object the string representation + * @return Object never returns (always throws exception) + * @throws IllegalArgumentException always thrown as this operation is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicConsent\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance from the current key field values. + * + * @return Object the newly created ObjectId containing this instance's primary key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicConsent.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicConsent != null) ? CachedDemographicConsent.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicConsent : (CachedDemographicConsent.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicConsent = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicConsent")), (Object)this.facilityDemographicPk); } @@ -503,7 +810,12 @@ private static final void pcSetfacilityDemographicPk(final CachedDemographicCons } cachedDemographicConsent.pcStateManager.settingObjectField((PersistenceCapable)cachedDemographicConsent, CachedDemographicConsent.pcInheritedFieldCount + 5, (Object)cachedDemographicConsent.facilityDemographicPk, (Object)facilityDemographicPk, 0); } - + + /** + * Checks if this instance is detached from the persistence context. + * + * @return Boolean true if detached, false if attached, null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -528,11 +840,21 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object. + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } @@ -549,10 +871,23 @@ private void readObject(final ObjectInputStream objectInputStream) throws IOExce this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); } - + + /** + * Represents the consent status for patient data sharing. + * + *

    This enum defines the possible states of patient consent for sharing + * demographic and clinical data across integrated care facilities.

    + */ public enum ConsentStatus { - GIVEN, + /** + * Patient has given consent to share data. + */ + GIVEN, + + /** + * Patient has revoked previously given consent. + */ REVOKED; } } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocument.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocument.java index ace67370f84..e7391376027 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocument.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocument.java @@ -18,6 +18,41 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Represents a cached demographic document entity in the CAISI Integrator system. + * + *

    This entity stores document metadata and content associated with patient demographics + * in a multi-facility healthcare environment. It is used by the CAISI (Collaborative + * Application for Integrated Systems Information) Integrator to cache and manage patient + * documents across different healthcare facilities.

    + * + *

    This class is enhanced by Apache OpenJPA for persistence management, implementing the + * {@link PersistenceCapable} interface to support advanced ORM features including lazy loading, + * dirty state tracking, and detachment/reattachment of entities. The OpenJPA enhancement adds + * specialized getter/setter methods (prefixed with 'pc') that integrate with the JPA state + * management system.

    + * + *

    Key Features:

    + *
      + *
    • Multi-facility support through composite primary key ({@link FacilityIdIntegerCompositePk})
    • + *
    • Document metadata tracking (type, creator, filename, content type)
    • + *
    • Document content storage (XML and binary formats)
    • + *
    • Review workflow support (reviewer, review date/time)
    • + *
    • Program association for care management integration
    • + *
    • Appointment linkage for contextual document access
    • + *
    + * + *

    Healthcare Context:

    + *

    In a healthcare EMR system, documents can include lab results, imaging reports, consultation + * notes, consent forms, and other clinical documents. This cached representation allows the + * integrator to provide fast access to documents from multiple facilities without repeated + * remote data fetches.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedDemographicDocument extends AbstractModel implements PersistenceCapable { @@ -56,168 +91,453 @@ public class CachedDemographicDocument extends AbstractModelInitializes the caisiDemographicId to 0. All other fields are set to their + * default values (null for objects, 0 for primitives).

    + */ public CachedDemographicDocument() { this.caisiDemographicId = 0; } - + + /** + * Gets the composite primary key identifier for this document. + * + *

    This method is part of the {@link AbstractModel} contract and returns the + * composite key consisting of facility ID and an integer document identifier.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key for this entity + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityIntegerPk(this); } - + + /** + * Gets the facility-scoped composite primary key. + * + *

    The composite key uniquely identifies this document within a specific healthcare + * facility in a multi-facility environment.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key combining facility ID and document ID + */ public FacilityIdIntegerCompositePk getFacilityIntegerPk() { return pcGetfacilityIntegerPk(this); } - + + /** + * Sets the facility-scoped composite primary key. + * + * @param facilityIntegerPk FacilityIdIntegerCompositePk the composite primary key to set + */ public void setFacilityIntegerPk(final FacilityIdIntegerCompositePk facilityIntegerPk) { pcSetfacilityIntegerPk(this, facilityIntegerPk); } - + + /** + * Gets the CAISI demographic identifier. + * + *

    This ID links the document to a specific patient demographic record in the + * CAISI system. It is indexed for efficient queries.

    + * + * @return int the CAISI demographic identifier + */ public int getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier. + * + * @param caisiDemographicId int the CAISI demographic identifier to set + */ public void setCaisiDemographicId(final int caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Gets the document type classification. + * + *

    Common document types in healthcare EMR systems include lab results, imaging reports, + * consultation notes, referral letters, consent forms, and administrative documents.

    + * + * @return String the document type, or null if not set + */ public String getDocType() { return pcGetdocType(this); } - + + /** + * Sets the document type classification. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param docType String the document type to set + */ public void setDocType(final String docType) { pcSetdocType(this, StringUtils.trimToNull(docType)); } - + + /** + * Gets the document content in XML format. + * + *

    This field stores the document data as XML, which may include structured clinical + * data, HL7 messages, or other XML-based healthcare document formats.

    + * + * @return String the XML document content, or null if not set + */ public String getDocXml() { return pcGetdocXml(this); } - + + /** + * Sets the document content in XML format. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param docXml String the XML document content to set + */ public void setDocXml(final String docXml) { pcSetdocXml(this, StringUtils.trimToNull(docXml)); } - + + /** + * Gets the document description. + * + *

    Provides a human-readable description or summary of the document content.

    + * + * @return String the document description, or null if not set + */ public String getDescription() { return pcGetdescription(this); } - + + /** + * Sets the document description. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param description String the document description to set + */ public void setDescription(final String description) { pcSetdescription(this, StringUtils.trimToNull(description)); } - + + /** + * Gets the original filename of the document. + * + *

    Preserves the original filename when documents are uploaded or imported into the system.

    + * + * @return String the document filename, or null if not set + */ public String getDocFilename() { return pcGetdocFilename(this); } - + + /** + * Sets the original filename of the document. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param docFilename String the document filename to set + */ public void setDocFilename(final String docFilename) { pcSetdocFilename(this, StringUtils.trimToNull(docFilename)); } - + + /** + * Gets the document creator identifier. + * + *

    Identifies the healthcare provider or user who created or uploaded the document.

    + * + * @return String the document creator identifier, or null if not set + */ public String getDocCreator() { return pcGetdocCreator(this); } - + + /** + * Sets the document creator identifier. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param docCreator String the document creator identifier to set + */ public void setDocCreator(final String docCreator) { pcSetdocCreator(this, StringUtils.trimToNull(docCreator)); } - + + /** + * Gets the identifier of the healthcare provider responsible for this document. + * + *

    This may differ from the creator if the document has been reassigned or if + * responsibility has been transferred to another provider.

    + * + * @return String the responsible provider identifier, or null if not set + */ public String getResponsible() { return pcGetresponsible(this); } - + + /** + * Sets the identifier of the healthcare provider responsible for this document. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param responsible String the responsible provider identifier to set + */ public void setResponsible(final String responsible) { pcSetresponsible(this, StringUtils.trimToNull(responsible)); } - + + /** + * Gets the source system or origin of the document. + * + *

    Identifies where the document came from, such as a specific facility, external + * system, or integration source in a multi-facility healthcare network.

    + * + * @return String the document source identifier, or null if not set + */ public String getSource() { return pcGetsource(this); } - + + /** + * Sets the source system or origin of the document. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param source String the document source identifier to set + */ public void setSource(final String source) { pcSetsource(this, StringUtils.trimToNull(source)); } - + + /** + * Gets the program identifier for care management association. + * + *

    Links this document to a specific care program (e.g., diabetes management, + * mental health services, chronic disease management) in the CAISI system.

    + * + * @return Integer the program ID, or null if not associated with a program + */ public Integer getProgramId() { return pcGetprogramId(this); } - + + /** + * Sets the program identifier for care management association. + * + * @param programId Integer the program ID to set, or null to remove association + */ public void setProgramId(final Integer programId) { pcSetprogramId(this, programId); } - + + /** + * Gets the last update timestamp for this document. + * + *

    Tracks when the document metadata or content was last modified.

    + * + * @return Date the last update date and time, or null if never updated + */ public Date getUpdateDateTime() { return pcGetupdateDateTime(this); } - + + /** + * Sets the last update timestamp for this document. + * + * @param updateDateTime Date the last update date and time to set + */ public void setUpdateDateTime(final Date updateDateTime) { pcSetupdateDateTime(this, updateDateTime); } - + + /** + * Gets the document status. + * + *

    Common statuses include active, archived, deleted, pending review, or approved. + * Status values control document visibility and workflow processing.

    + * + * @return String the document status, or null if not set + */ public String getStatus() { return pcGetstatus(this); } - + + /** + * Sets the document status. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param status String the document status to set + */ public void setStatus(final String status) { pcSetstatus(this, StringUtils.trimToNull(status)); } - + + /** + * Gets the MIME content type of the document. + * + *

    Examples include application/pdf, image/jpeg, text/html, or application/xml. + * This helps determine how to display or process the document content.

    + * + * @return String the MIME content type, or null if not set + */ public String getContentType() { return pcGetcontentType(this); } - + + /** + * Sets the MIME content type of the document. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param contentType String the MIME content type to set + */ public void setContentType(final String contentType) { pcSetcontentType(this, StringUtils.trimToNull(contentType)); } - + + /** + * Gets the public visibility flag. + * + *

    Controls whether the document is visible to the patient or restricted to + * healthcare providers only. Typically 1 for public/patient-visible, 0 for private.

    + * + * @return int the public visibility flag + */ public int getPublic1() { return pcGetpublic1(this); } - + + /** + * Sets the public visibility flag. + * + * @param public1 int the public visibility flag to set (typically 0 or 1) + */ public void setPublic1(final int public1) { pcSetpublic1(this, public1); } - + + /** + * Gets the clinical observation date for the document. + * + *

    For lab results or diagnostic reports, this is the date the test was performed + * or the observation was made, which may differ from the document creation date.

    + * + * @return Date the observation date, or null if not applicable + */ public Date getObservationDate() { return pcGetobservationDate(this); } - + + /** + * Sets the clinical observation date for the document. + * + * @param observationDate Date the observation date to set + */ public void setObservationDate(final Date observationDate) { pcSetobservationDate(this, observationDate); } - + + /** + * Gets the identifier of the healthcare provider who reviewed this document. + * + *

    Part of the document review workflow to track which provider has reviewed + * and acknowledged the document, particularly important for lab results and + * diagnostic reports requiring clinical review.

    + * + * @return String the reviewer identifier, or null if not yet reviewed + */ public String getReviewer() { return pcGetreviewer(this); } - + + /** + * Sets the identifier of the healthcare provider who reviewed this document. + * + *

    The value is trimmed and null-safe using {@link StringUtils#trimToNull(String)}.

    + * + * @param reviewer String the reviewer identifier to set + */ public void setReviewer(final String reviewer) { pcSetreviewer(this, StringUtils.trimToNull(reviewer)); } - + + /** + * Gets the timestamp when this document was reviewed. + * + *

    Records when a healthcare provider reviewed and acknowledged the document.

    + * + * @return Date the review date and time, or null if not yet reviewed + */ public Date getReviewDateTime() { return pcGetreviewDateTime(this); } - + + /** + * Sets the timestamp when this document was reviewed. + * + * @param reviewDateTime Date the review date and time to set + */ public void setReviewDateTime(final Date reviewDateTime) { pcSetreviewDateTime(this, reviewDateTime); } - + + /** + * Gets the number of pages in the document. + * + *

    For multi-page documents such as PDFs or scanned images, tracks the total + * page count for display and navigation purposes.

    + * + * @return int the number of pages (0 if not applicable or not set) + */ public int getNumberOfPages() { return pcGetnumberOfPages(this); } - + + /** + * Sets the number of pages in the document. + * + * @param numberOfPages int the number of pages to set + */ public void setNumberOfPages(final int numberOfPages) { pcSetnumberOfPages(this, numberOfPages); } - + + /** + * Gets the appointment number associated with this document. + * + *

    Links the document to a specific patient appointment, providing clinical context + * for documents generated or received during an appointment visit.

    + * + * @return int the appointment number (0 if not associated with an appointment) + */ public int getAppointmentNo() { return pcGetappointmentNo(this); } - + + /** + * Sets the appointment number associated with this document. + * + * @param appointmentNo int the appointment number to set + */ public void setAppointmentNo(final int appointmentNo) { pcSetappointmentNo(this, appointmentNo); } - + + /** + * Gets the OpenJPA enhancement contract version. + * + *

    This method is part of the {@link PersistenceCapable} interface and returns + * the version of the bytecode enhancement contract implemented by this class.

    + * + * @return int the enhancement contract version (currently 2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -230,6 +550,16 @@ public int pcGetEnhancementContractVersion() { PCRegistry.register((CachedDemographicDocument.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicDocument != null) ? CachedDemographicDocument.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicDocument : (CachedDemographicDocument.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicDocument = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicDocument")), CachedDemographicDocument.pcFieldNames, CachedDemographicDocument.pcFieldTypes, CachedDemographicDocument.pcFieldFlags, CachedDemographicDocument.pcPCSuperclass, "CachedDemographicDocument", (PersistenceCapable)new CachedDemographicDocument()); } + /** + * Helper method to load a class by name. + * + *

    This synthetic method is generated by the compiler to support class literal + * loading in the static initializer block.

    + * + * @param className String the fully qualified class name to load + * @return Class the loaded class + * @throws NoClassDefFoundError if the class cannot be found + */ static /* synthetic */ Class class$(final String className) { try { return Class.forName(className); @@ -238,7 +568,13 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default values. + * + *

    This method is part of the OpenJPA persistence lifecycle and is called during + * entity initialization and state management operations.

    + */ protected void pcClearFields() { this.appointmentNo = 0; this.caisiDemographicId = 0; @@ -260,7 +596,18 @@ protected void pcClearFields() { this.status = null; this.updateDateTime = null; } - + + /** + * Creates a new instance with state manager and object ID. + * + *

    This method is part of the {@link PersistenceCapable} interface and is used by + * OpenJPA to create new instances during entity lifecycle management operations.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID containing key field values + * @param b boolean whether to clear all fields after initialization + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicDocument cachedDemographicDocument = new CachedDemographicDocument(); if (b) { @@ -270,7 +617,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicDocument.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicDocument; } - + + /** + * Creates a new instance with state manager. + * + *

    This method is part of the {@link PersistenceCapable} interface and is used by + * OpenJPA to create new instances during entity lifecycle management operations.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean whether to clear all fields after initialization + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicDocument cachedDemographicDocument = new CachedDemographicDocument(); if (b) { @@ -279,11 +636,28 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicDocument.pcStateManager = pcStateManager; return (PersistenceCapable)cachedDemographicDocument; } - + + /** + * Gets the count of managed persistent fields. + * + *

    This entity has 19 managed fields tracked by the OpenJPA state manager.

    + * + * @return int the number of managed fields (19) + */ protected static int pcGetManagedFieldCount() { return 19; } - + + /** + * Replaces a single field value from the state manager. + * + *

    This method is part of the {@link PersistenceCapable} interface and is called by + * OpenJPA to restore field values during state management operations such as rollback, + * refresh, or detachment/reattachment.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicDocument.pcInheritedFieldCount; if (n2 < 0) { @@ -371,13 +745,31 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values from the state manager. + * + *

    This method is part of the {@link PersistenceCapable} interface and is called by + * OpenJPA to restore multiple field values efficiently during state management operations.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the state manager. + * + *

    This method is part of the {@link PersistenceCapable} interface and is called by + * OpenJPA to read field values during state management operations such as flush, + * detachment, or serialization.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicDocument.pcInheritedFieldCount; if (n2 < 0) { @@ -465,13 +857,31 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This method is part of the {@link PersistenceCapable} interface and is called by + * OpenJPA to read multiple field values efficiently during state management operations.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another instance. + * + *

    This method is used during entity merge and copy operations to transfer field + * values between instances of the same entity type.

    + * + * @param cachedDemographicDocument CachedDemographicDocument the source instance to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedDemographicDocument cachedDemographicDocument, final int n) { final int n2 = n - CachedDemographicDocument.pcInheritedFieldCount; if (n2 < 0) { @@ -559,7 +969,18 @@ protected void pcCopyField(final CachedDemographicDocument cachedDemographicDocu } } } - + + /** + * Copies multiple field values from another instance. + * + *

    This method is part of the {@link PersistenceCapable} interface and is used during + * entity merge and copy operations to efficiently transfer multiple field values.

    + * + * @param o Object the source instance to copy from (must be CachedDemographicDocument) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source instance has a different state manager + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicDocument cachedDemographicDocument = (CachedDemographicDocument)o; if (cachedDemographicDocument.pcStateManager != this.pcStateManager) { @@ -572,25 +993,48 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicDocument, array[i]); } } - + + /** + * Gets the generic context from the state manager. + * + * @return Object the generic context, or null if no state manager is assigned + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID from the state manager. + * + * @return Object the object ID, or null if no state manager is assigned + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this instance has been deleted. + * + * @return boolean true if the instance is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this instance has been modified. + * + *

    Performs a dirty check to determine if any field values have changed since + * the instance was loaded or last persisted.

    + * + * @return boolean true if the instance has uncommitted changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -599,41 +1043,88 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this instance is newly created and not yet persisted. + * + * @return boolean true if the instance is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this instance is managed by the persistence context. + * + * @return boolean true if the instance is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this instance is transactional. + * + * @return boolean true if the instance participates in a transaction, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this instance is currently being serialized. + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty. + * + *

    Notifies the state manager that the specified field has been modified and + * should be included in the next database update.

    + * + * @param s String the field name that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Gets the OpenJPA state manager for this instance. + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Gets the version information for optimistic locking. + * + * @return Object the version object, or null if no state manager or versioning is not used + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager with a new one. + * + *

    This method is used during entity state transitions and detachment/reattachment + * operations.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if the state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -641,27 +1132,77 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to object ID using field supplier. + * + *

    This operation is not supported for this entity type.

    + * + * @param fieldSupplier FieldSupplier the field supplier + * @param o Object the object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to object ID. + * + *

    This operation is not supported for this entity type.

    + * + * @param o Object the object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from object ID using field consumer. + * + *

    Extracts the composite primary key from the object ID and stores it in the + * field consumer for persistence operations.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key field + * @param o Object the object ID containing the key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(8 + CachedDemographicDocument.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from object ID. + * + *

    Extracts the composite primary key from the object ID and assigns it to the + * facilityIntegerPk field.

    + * + * @param o Object the object ID containing the key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityIntegerPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This operation is not supported for this entity type as it uses a composite key.

    + * + * @param o Object the string representation + * @return Object the new object ID + * @throws IllegalArgumentException always thrown as this operation is not supported for composite keys + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicDocument\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity. + * + *

    Constructs an OpenJPA {@link ObjectId} using the current composite primary key.

    + * + * @return Object the new object ID wrapping the facilityIntegerPk + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicDocument.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicDocument != null) ? CachedDemographicDocument.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicDocument : (CachedDemographicDocument.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicDocument = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicDocument")), (Object)this.facilityIntegerPk); } @@ -969,7 +1510,16 @@ private static final void pcSetupdateDateTime(final CachedDemographicDocument ca } cachedDemographicDocument.pcStateManager.settingObjectField((PersistenceCapable)cachedDemographicDocument, CachedDemographicDocument.pcInheritedFieldCount + 18, (Object)cachedDemographicDocument.updateDateTime, (Object)updateDateTime, 0); } - + + /** + * Checks if this instance is detached from the persistence context. + * + *

    A detached entity is one that was previously managed but is no longer associated + * with an active persistence context. This can occur after serialization, transaction + * completion with detach-on-close, or explicit detachment.

    + * + * @return Boolean true if definitely detached, false if definitely attached, or null if uncertain + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -990,19 +1540,49 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive. + * + *

    Returns false to indicate that detached state detection may not be completely + * reliable without a state manager present.

    + * + * @return boolean false indicating detached state is not definitive + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Gets the detached state information. + * + *

    The detached state is used by OpenJPA to track entity version and change information + * when the entity is not actively managed by a persistence context.

    + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state information. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method. + * + *

    Handles proper serialization of the entity, clearing the detached state if + * serialization is happening within a managed context.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -1010,7 +1590,17 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method. + * + *

    Handles proper deserialization of the entity, marking it as deserialized to + * indicate it needs to be reattached to a persistence context before use.

    + * + * @param objectInputStream ObjectInputStream the stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if a required class cannot be found during deserialization + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocumentContents.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocumentContents.java index 3780d3a086e..e9ee9bfb648 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocumentContents.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicDocumentContents.java @@ -15,6 +15,27 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing cached demographic document binary contents for the CAISI Integrator system. + * + * This class stores the binary file contents of demographic documents cached from integrated facilities + * in the OpenO EMR CAISI Integrator. The integrator allows multiple OpenO EMR installations to share + * patient demographic data across healthcare facilities. This entity caches document files (such as + * scanned identification, consent forms, or demographic attachments) to improve performance and reduce + * network load when accessing documents from remote facilities. + * + * The class uses OpenJPA persistence enhancement to provide transparent persistence capabilities, + * including state management, field access tracking, and detached entity support. The document contents + * are stored as a LONGBLOB in the database to accommodate large file sizes. + * + * This is an OpenJPA-enhanced entity with bytecode instrumentation that adds persistence capability + * methods prefixed with "pc" for state management, field tracking, and serialization support. + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2024-01-24 + */ @Entity public class CachedDemographicDocumentContents extends AbstractModel implements PersistenceCapable { @@ -34,27 +55,79 @@ public class CachedDemographicDocumentContents extends AbstractModel + *
  • Comprehensive medication tracking including brand name, generic name, and ATC (Anatomical Therapeutic Chemical) codes
  • + *
  • Detailed dosing information with min/max dosage ranges and administration frequencies
  • + *
  • Prescription metadata including prescriber ID, prescription date, duration, and refill tracking
  • + *
  • Support for custom instructions, special notes, and PRN (pro re nata - as needed) medications
  • + *
  • Archival capabilities with reason tracking and timestamps
  • + *
  • Regional identifier support for provincial/jurisdictional medication tracking
  • + *
  • Patient compliance and medication history indicators
  • + * + * + * This class is automatically enhanced by OpenJPA's bytecode enhancement process, which adds the extensive + * persistence capability methods (pcGet*, pcSet*, pcProvide*, pcReplace*, etc.) visible in this file. These + * methods should not be called directly by application code; instead, use the standard getter and setter methods. + * + * Healthcare Context: + * This entity supports Canadian healthcare workflows including medication reconciliation, prescription history + * tracking, and cross-facility drug profile synchronization. The ATC code field enables standardized medication + * classification following WHO guidelines, while regional identifiers support province-specific drug identification + * numbers (DINs) used in Canadian formularies. + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedDemographicDrug extends AbstractModel implements PersistenceCapable { @@ -105,7 +144,14 @@ public class CachedDemographicDrug extends AbstractModelThe entity uses OpenJPA enhancement for persistence capability, which provides transparent + * state management, lazy loading, and change tracking through bytecode instrumentation. The enhancement + * process generates additional methods (prefixed with 'pc') that handle communication with the + * OpenJPA StateManager for all field access operations.

    + * + *

    Key features:

    + *
      + *
    • Composite primary key using facility ID and integer ID for multi-facility support
    • + *
    • Form data stored as medium blob to accommodate large healthcare documents
    • + *
    • Edit date tracking for synchronization and audit purposes
    • + *
    • Provider and demographic associations for access control
    • + *
    • OpenJPA detachment support for serialization across tiers
    • + *
    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see org.apache.openjpa.enhance.PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedDemographicForm extends AbstractModel implements PersistenceCapable { @@ -48,66 +75,186 @@ public class CachedDemographicForm extends AbstractModelThis JPA entity represents laboratory results received in HL7 format (Health Level 7 messaging standard) + * that have been cached from remote healthcare facilities through the OpenO integrator. The entity stores + * HL7 lab result data along with the associated patient demographic identifier and facility information, + * enabling efficient retrieval and synchronization of laboratory data across integrated healthcare systems.

    + * + *

    The entity uses a composite primary key consisting of the integrator facility ID and lab result ID, + * allowing unique identification of lab results across multiple integrated healthcare facilities. The HL7 + * data is stored as a MEDIUMBLOB in the database to accommodate the potentially large size of HL7 messages + * containing detailed laboratory results, observations, and associated metadata.

    + * + *

    Healthcare Context: HL7 v2.x messages are the industry standard for transmitting + * clinical laboratory results between systems. These messages typically contain patient demographics (PID segment), + * order information (OBR segment), and individual result observations (OBX segments) with values, units, + * reference ranges, and result flags. This cached entity enables the integrator to maintain a local copy + * of remote lab results for improved performance and offline access.

    + * + *

    OpenJPA Enhancement: This class is enhanced at runtime by Apache OpenJPA for + * persistence capabilities, implementing transparent field access tracking and state management. The + * enhancement process adds persistence-aware field accessors and state management methods automatically.

    + * + * @see FacilityIdLabResultCompositePk + * @see AbstractModel + * @see CachedDemographicLabResult + * @since 2026-01-24 + */ @Entity public class CachedDemographicHL7LabResult extends AbstractModel implements PersistenceCapable { @@ -39,48 +67,146 @@ public class CachedDemographicHL7LabResult extends AbstractModelInitializes the CAISI demographic ID to 0. This no-argument constructor is required + * by JPA for entity instantiation during database retrieval operations and by OpenJPA + * for persistence capability enhancement.

    + */ public CachedDemographicHL7LabResult() { this.caisiDemographicId = 0; } - + + /** + * Retrieves the composite primary key identifier for this cached HL7 lab result. + * + *

    Returns the embedded composite key that uniquely identifies this lab result across + * the integrator system, combining the facility ID and lab result ID.

    + * + * @return FacilityIdLabResultCompositePk the composite primary key containing facility and lab result identifiers + */ @Override public FacilityIdLabResultCompositePk getId() { return pcGetfacilityIdLabResultCompositePk(this); } - + + /** + * Retrieves the composite primary key for this cached HL7 lab result. + * + *

    Returns the embedded ID containing both the integrator facility identifier and the + * lab result identifier, which together uniquely identify this lab result in the cache.

    + * + * @return FacilityIdLabResultCompositePk the composite key containing facility and lab result IDs + */ public FacilityIdLabResultCompositePk getFacilityIdLabResultCompositePk() { return pcGetfacilityIdLabResultCompositePk(this); } - + + /** + * Sets the composite primary key for this cached HL7 lab result. + * + *

    Assigns the embedded ID that uniquely identifies this lab result within the integrator + * system. This should typically only be set during initial entity creation.

    + * + * @param facilityIdLabResultCompositePk FacilityIdLabResultCompositePk the composite key to assign + */ public void setFacilityIdLabResultCompositePk(final FacilityIdLabResultCompositePk facilityIdLabResultCompositePk) { pcSetfacilityIdLabResultCompositePk(this, facilityIdLabResultCompositePk); } - + + /** + * Retrieves the CAISI demographic identifier associated with this lab result. + * + *

    Returns the local demographic ID that links this cached lab result to a patient + * record in the CAISI system. This identifier enables correlation between remotely + * obtained lab results and local patient demographics.

    + * + * @return int the CAISI demographic identifier + */ public int getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier for this lab result. + * + *

    Assigns the local patient demographic ID that this lab result should be associated with, + * establishing the link between the remotely cached HL7 lab data and the local patient record.

    + * + * @param caisiDemographicId int the CAISI demographic identifier to associate with this lab result + */ public void setCaisiDemographicId(final int caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the type classification of this HL7 lab result. + * + *

    Returns a string value indicating the category or classification of this laboratory + * result. The type field may be used to distinguish between different kinds of lab results, + * such as chemistry panels, hematology, microbiology, or other laboratory disciplines.

    + * + * @return String the type classification, maximum 64 characters, or null if not set + */ public String getType() { return pcGettype(this); } - + + /** + * Sets the type classification for this HL7 lab result. + * + *

    Assigns a categorization or classification to this laboratory result. The type value + * is limited to 64 characters by the database column definition.

    + * + * @param type String the type classification to assign, maximum 64 characters + */ public void setType(final String type) { pcSettype(this, type); } - + + /** + * Retrieves the HL7-formatted laboratory result data. + * + *

    Returns the complete HL7 message containing the laboratory result information. This + * typically includes the HL7 message segments such as MSH (Message Header), PID (Patient + * Identification), OBR (Observation Request), and OBX (Observation Result) segments along + * with all associated laboratory values, units, reference ranges, and result flags.

    + * + *

    The data is stored as a MEDIUMBLOB in the database to accommodate potentially large + * HL7 messages that may contain multiple test results, extensive notes, and embedded + * documents or images.

    + * + * @return String the HL7-formatted lab result message, or null if not set + */ public String getData() { return pcGetdata(this); } - + + /** + * Sets the HL7-formatted laboratory result data. + * + *

    Stores the complete HL7 message containing the laboratory result. The message should + * be a properly formatted HL7 v2.x message with appropriate segments for transmitting + * clinical laboratory data. The data is stored as a MEDIUMBLOB, supporting messages up + * to approximately 16MB in size.

    + * + * @param data String the HL7-formatted lab result message to store + */ public void setData(final String data) { pcSetdata(this, data); } - + + /** + * Returns the OpenJPA enhancement contract version for this persistent class. + * + *

    This method is part of the OpenJPA persistence capability infrastructure and indicates + * the version of the enhancement contract that this class implements. Version 2 represents + * the current OpenJPA enhancement specification.

    + * + * @return int the enhancement contract version number (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -101,14 +227,33 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default values. + * + *

    This OpenJPA infrastructure method resets all persistent fields to their initial state: + * numeric fields to 0 or null, and reference fields to null. Used during entity lifecycle + * management and persistence operations.

    + */ protected void pcClearFields() { this.caisiDemographicId = 0; this.data = null; this.facilityIdLabResultCompositePk = null; this.type = null; } - + + /** + * Creates a new instance managed by the specified state manager with key fields from object ID. + * + *

    This OpenJPA infrastructure method creates a new entity instance, optionally clears its fields, + * assigns the provided state manager, and copies key field values from the given object ID. Used + * during entity retrieval and detachment operations.

    + * + * @param pcStateManager StateManager the state manager to manage this instance + * @param o Object the object ID containing key field values to copy + * @param b boolean true to clear fields after creation, false to retain default values + * @return PersistenceCapable the newly created managed instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicHL7LabResult cachedDemographicHL7LabResult = new CachedDemographicHL7LabResult(); if (b) { @@ -118,7 +263,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicHL7LabResult.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicHL7LabResult; } - + + /** + * Creates a new instance managed by the specified state manager. + * + *

    This OpenJPA infrastructure method creates a new entity instance, optionally clears its fields, + * and assigns the provided state manager. Used during entity instantiation and persistence operations.

    + * + * @param pcStateManager StateManager the state manager to manage this instance + * @param b boolean true to clear fields after creation, false to retain default values + * @return PersistenceCapable the newly created managed instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicHL7LabResult cachedDemographicHL7LabResult = new CachedDemographicHL7LabResult(); if (b) { @@ -127,11 +282,29 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicHL7LabResult.pcStateManager = pcStateManager; return (PersistenceCapable)cachedDemographicHL7LabResult; } - + + /** + * Returns the number of persistent fields managed by OpenJPA for this entity. + * + *

    This OpenJPA infrastructure method reports the count of persistent fields that are + * tracked and managed for change detection and persistence operations. This entity has + * 4 managed fields: caisiDemographicId, data, facilityIdLabResultCompositePk, and type.

    + * + * @return int the number of managed persistent fields (4) + */ protected static int pcGetManagedFieldCount() { return 4; } - + + /** + * Replaces the value of a single persistent field from the state manager. + * + *

    This OpenJPA infrastructure method updates a specific field's value by retrieving + * the replacement value from the state manager. Used during entity refresh and merge operations.

    + * + * @param n int the field index to replace (0=caisiDemographicId, 1=data, 2=facilityIdLabResultCompositePk, 3=type) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicHL7LabResult.pcInheritedFieldCount; if (n2 < 0) { @@ -159,13 +332,31 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces the values of multiple persistent fields from the state manager. + * + *

    This OpenJPA infrastructure method updates multiple fields by retrieving replacement + * values from the state manager for each field index in the provided array. Used during + * entity refresh and merge operations.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides the current value of a single persistent field to the state manager. + * + *

    This OpenJPA infrastructure method supplies the current field value to the state manager + * for change detection, persistence, and serialization operations.

    + * + * @param n int the field index to provide (0=caisiDemographicId, 1=data, 2=facilityIdLabResultCompositePk, 3=type) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicHL7LabResult.pcInheritedFieldCount; if (n2 < 0) { @@ -193,7 +384,16 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides the current values of multiple persistent fields to the state manager. + * + *

    This OpenJPA infrastructure method supplies current field values to the state manager + * for each field index in the provided array. Used during change detection, persistence, + * and serialization operations.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -227,7 +427,19 @@ protected void pcCopyField(final CachedDemographicHL7LabResult cachedDemographic } } } - + + /** + * Copies specified field values from another instance of this entity. + * + *

    This OpenJPA infrastructure method copies field values from the source object to this instance + * for the field indices specified in the array. Both instances must be managed by the same state + * manager. Used during entity merging and detachment operations.

    + * + * @param o Object the source CachedDemographicHL7LabResult instance to copy from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicHL7LabResult cachedDemographicHL7LabResult = (CachedDemographicHL7LabResult)o; if (cachedDemographicHL7LabResult.pcStateManager != this.pcStateManager) { @@ -240,25 +452,58 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicHL7LabResult, array[i]); } } - + + /** + * Retrieves the generic context from the state manager. + * + *

    This OpenJPA infrastructure method returns the generic context object from the state manager, + * if one exists. The generic context may contain additional metadata or configuration used during + * persistence operations.

    + * + * @return Object the generic context, or null if no state manager is present + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object identifier for this persistent instance. + * + *

    This OpenJPA infrastructure method retrieves the object ID that uniquely identifies this + * entity within the persistence context.

    + * + * @return Object the object identifier, or null if no state manager is present + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this entity has been marked for deletion. + * + *

    This OpenJPA infrastructure method determines if this entity is in a deleted state within + * the current persistence context.

    + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this entity has been modified since being loaded or last persisted. + * + *

    This OpenJPA infrastructure method performs change detection to determine if any persistent + * fields have been modified. Returns false if no state manager is present.

    + * + * @return boolean true if the entity has pending changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -267,41 +512,108 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this entity is newly created and not yet persisted. + * + *

    This OpenJPA infrastructure method determines if this entity is in a transient state, + * newly created but not yet saved to the database.

    + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this entity is managed by a persistence context. + * + *

    This OpenJPA infrastructure method determines if this entity is in a persistent state, + * managed by the persistence provider.

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this entity is enrolled in a transaction. + * + *

    This OpenJPA infrastructure method determines if this entity is participating in an + * active transaction context.

    + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this entity is currently being serialized. + * + *

    This OpenJPA infrastructure method determines if serialization is in progress for this + * entity. Used to control behavior during serialization operations.

    + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty for change tracking. + * + *

    This OpenJPA infrastructure method notifies the state manager that the specified field + * has been modified, triggering change detection and potentially requiring persistence on + * transaction commit.

    + * + * @param s String the name of the field that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager managing this persistent instance. + * + *

    This OpenJPA infrastructure method returns the state manager responsible for tracking + * this entity's lifecycle and field changes.

    + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for this entity. + * + *

    This OpenJPA infrastructure method returns version metadata used for optimistic locking + * and concurrency control.

    + * + * @return Object the version information, or null if no state manager is present + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This OpenJPA infrastructure method changes the state manager responsible for managing this + * entity. If a state manager already exists, it delegates the replacement operation to that + * manager; otherwise, the new manager is assigned directly.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if the replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -309,27 +621,81 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This OpenJPA infrastructure method is not supported for this entity type and will + * throw an InternalException if called.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values to an object ID. + * + *

    This OpenJPA infrastructure method is not supported for this entity type and will + * throw an InternalException if called.

    + * + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    This OpenJPA infrastructure method extracts the composite key from the provided object ID + * and stores it in the field consumer at the appropriate field index.

    + * + * @param fieldConsumer FieldConsumer the field consumer to store the key value + * @param o Object the source ObjectId containing the composite key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(2 + CachedDemographicHL7LabResult.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key field values from an object ID to this entity. + * + *

    This OpenJPA infrastructure method extracts the composite key from the provided object ID + * and assigns it to this entity's facilityIdLabResultCompositePk field.

    + * + * @param o Object the source ObjectId containing the composite key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityIdLabResultCompositePk = (FacilityIdLabResultCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This OpenJPA infrastructure method is not supported for this entity type because the + * composite key class does not support string-based construction.

    + * + * @param o Object the string representation (not used) + * @return Object never returns + * @throws IllegalArgumentException always, as string-based object ID construction is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicHL7LabResult\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity. + * + *

    This OpenJPA infrastructure method constructs an ObjectId wrapping this entity's + * composite key, which can be used for identity comparisons and caching.

    + * + * @return Object a new ObjectId containing this entity's composite key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicHL7LabResult.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicHL7LabResult != null) ? CachedDemographicHL7LabResult.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicHL7LabResult : (CachedDemographicHL7LabResult.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicHL7LabResult = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicHL7LabResult")), (Object)this.facilityIdLabResultCompositePk); } @@ -397,7 +763,16 @@ private static final void pcSettype(final CachedDemographicHL7LabResult cachedDe } cachedDemographicHL7LabResult.pcStateManager.settingStringField((PersistenceCapable)cachedDemographicHL7LabResult, CachedDemographicHL7LabResult.pcInheritedFieldCount + 3, cachedDemographicHL7LabResult.type, type, 0); } - + + /** + * Checks whether this entity is in a detached state. + * + *

    This OpenJPA infrastructure method determines if the entity has been detached from its + * persistence context. Returns TRUE if detached, FALSE if attached, or null if the state + * cannot be definitively determined.

    + * + * @return Boolean TRUE if detached, FALSE if attached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -418,19 +793,55 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks whether the detached state is definitive for this entity. + * + *

    This OpenJPA infrastructure method indicates whether the detached state can be + * determined conclusively. Always returns false for this entity type.

    + * + * @return boolean false, indicating detached state is not definitive + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * + *

    This OpenJPA infrastructure method returns the object representing the detached state, + * which may be null, DESERIALIZED, or contain version/timestamp information.

    + * + * @return Object the detached state object, or null if not set + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + *

    This OpenJPA infrastructure method assigns the detached state, which tracks whether + * and how this entity has been detached from its persistence context. Used during + * serialization and detachment operations.

    + * + * @param pcDetachedState Object the detached state to assign + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method for writing this entity to an object stream. + * + *

    This method handles the serialization of the entity, performing default serialization + * and then clearing the detached state if serialization is in progress. This ensures proper + * state management when the entity is transmitted across process boundaries or persisted + * to storage.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -438,7 +849,18 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method for reading this entity from an object stream. + * + *

    This method handles the deserialization of the entity, setting the detached state to + * DESERIALIZED before performing default deserialization. This marks the entity as having + * been deserialized and potentially detached from its original persistence context.

    + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicImage.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicImage.java index 64304a7b17f..534d68006f3 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicImage.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicImage.java @@ -19,6 +19,32 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing cached demographic patient images in the CAISI Integrator system. + * + *

    This entity stores scaled-down patient photographs for use in the EMR's integrator functionality, + * which facilitates data sharing across multiple OpenO EMR installations. Images are automatically + * scaled to 200x200 pixels on upload to optimize storage and network transfer while maintaining + * adequate visual quality for patient identification.

    + * + *

    The entity uses a composite primary key combining facility ID and demographic ID, allowing + * the same patient to have different images across different healthcare facilities. Images are + * stored as JPEG format in a MEDIUMBLOB column (up to 16MB), though actual storage is typically + * much smaller due to automatic scaling and compression.

    + * + *

    Security Note: Patient photographs are Protected Health Information (PHI) + * and must be handled according to PIPEDA/HIPAA requirements. Access should be restricted to + * authorized healthcare providers with appropriate security privileges.

    + * + *

    This class is enhanced by OpenJPA for persistence management, implementing the + * {@link PersistenceCapable} interface to support advanced JPA features including detached + * entity state tracking, field-level dirty checking, and transparent lazy loading.

    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see ImageIoUtils + * @since 2026-01-24 + */ @Entity public class CachedDemographicImage extends AbstractModel implements PersistenceCapable { @@ -40,41 +66,126 @@ public class CachedDemographicImage extends AbstractModelThis constructor creates an empty image cache entry. The {@code updateDate} and + * {@code image} fields are explicitly set to null. The composite primary key + * ({@code facilityDemographicPk}) must be set separately using + * {@link #setFacilityIdIntegerCompositePk(FacilityIdIntegerCompositePk)} before persisting.

    + * + *

    OpenJPA also uses this constructor during entity instantiation and enhancement.

    + */ public CachedDemographicImage() { this.updateDate = null; this.image = null; } - + + /** + * Retrieves the composite primary key identifying this cached image. + * + *

    The composite key combines the facility ID (identifying the healthcare facility) and + * the demographic ID (identifying the patient). This allows the same patient to have + * different cached images at different facilities.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key, or null if not yet set + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityDemographicPk(this); } - + + /** + * Sets the composite primary key for this cached image. + * + *

    This method must be called before persisting a new cached image entity. The composite + * key uniquely identifies the cached image by combining facility and patient identifiers.

    + * + * @param facilityDemographicPk FacilityIdIntegerCompositePk the composite key containing + * facility ID and demographic ID + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityDemographicPk) { pcSetfacilityDemographicPk(this, facilityDemographicPk); } - + + /** + * Retrieves the timestamp when this cached image was last updated. + * + *

    This timestamp tracks when the patient's photograph was last modified in the cache, + * which is useful for cache invalidation and synchronization across multiple facilities + * in the CAISI Integrator network.

    + * + * @return Date the last update timestamp, or null if never updated + */ public Date getUpdateDate() { return pcGetupdateDate(this); } - + + /** + * Sets the timestamp when this cached image was updated. + * + *

    This should be set whenever the patient's photograph is modified or refreshed in the + * cache. The timestamp is used for cache management and synchronization logic.

    + * + * @param updateDate Date the timestamp to record for this update + */ public void setUpdateDate(final Date updateDate) { pcSetupdateDate(this, updateDate); } - + + /** + * Retrieves the patient's photograph as a JPEG byte array. + * + *

    The returned image is the scaled version (200x200 pixels maximum) that was stored + * when {@link #setImage(byte[])} was called. The image data is in JPEG format with + * 90% quality compression.

    + * + * @return byte[] the JPEG image data, or null if no image has been set + */ public byte[] getImage() { return pcGetimage(this); } - + + /** + * Sets the patient's photograph, automatically scaling it to optimize storage. + * + *

    The original image is automatically scaled to fit within a 200x200 pixel bounding box + * while maintaining aspect ratio, then compressed as JPEG at 90% quality. This reduces + * storage requirements and network bandwidth for image synchronization across facilities + * while maintaining adequate quality for patient identification.

    + * + *

    The scaling is performed by {@link ImageIoUtils#scaleJpgSmallerProportionally(byte[], int, int, float)} + * which handles various input image formats and ensures consistent JPEG output.

    + * + * @param original byte[] the original patient photograph in any image format supported by + * Java ImageIO (typically JPEG, PNG, GIF, BMP) + */ public void setImage(final byte[] original) { pcSetimage(this, ImageIoUtils.scaleJpgSmallerProportionally(original, 200, 200, 0.9f)); } - + + /** + * Retrieves the primary key identifier for this entity. + * + *

    This method overrides {@link AbstractModel#getId()} to return the composite primary key + * that uniquely identifies this cached image across facility and demographic dimensions.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityDemographicPk(this); } - + + /** + * Returns the OpenJPA enhancement contract version for this persistent class. + * + *

    This method is part of the OpenJPA bytecode enhancement contract and indicates + * the version of enhancement applied to this class. Version 2 is the current contract + * version for OpenJPA's persistence capabilities.

    + * + * @return int the enhancement contract version (always 2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -87,6 +198,17 @@ public int pcGetEnhancementContractVersion() { PCRegistry.register((CachedDemographicImage.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicImage != null) ? CachedDemographicImage.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicImage : (CachedDemographicImage.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicImage = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicImage")), CachedDemographicImage.pcFieldNames, CachedDemographicImage.pcFieldTypes, CachedDemographicImage.pcFieldFlags, CachedDemographicImage.pcPCSuperclass, "CachedDemographicImage", (PersistenceCapable)new CachedDemographicImage()); } + /** + * Internal helper method to load a class by name during bytecode enhancement. + * + *

    This synthetic method is generated by the Java compiler to support class literal + * references in the static initializer block. It wraps {@link Class#forName(String)} + * and converts checked {@link ClassNotFoundException} to unchecked {@link NoClassDefFoundError}.

    + * + * @param className String the fully-qualified class name to load + * @return Class the loaded class object + * @throws NoClassDefFoundError if the class cannot be found + */ static /* synthetic */ Class class$(final String className) { try { return Class.forName(className); @@ -95,13 +217,32 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default null values. + * + *

    This method is used by OpenJPA during entity lifecycle management, particularly + * when creating new instances or detaching entities. It resets the composite primary key, + * image data, and update timestamp.

    + */ protected void pcClearFields() { this.facilityDemographicPk = null; this.image = null; this.updateDate = null; } - + + /** + * Creates a new instance of this entity with the specified state manager and object ID. + * + *

    This method is part of the OpenJPA persistence capability contract and is used to + * instantiate entities during database queries and object retrieval. The new instance is + * initialized with the provided state manager and primary key.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to attach to this instance + * @param o Object the object ID containing the primary key values + * @param b boolean whether to clear all fields before copying key fields + * @return PersistenceCapable a new instance configured with the specified state manager and ID + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicImage cachedDemographicImage = new CachedDemographicImage(); if (b) { @@ -111,7 +252,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicImage.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicImage; } - + + /** + * Creates a new instance of this entity with the specified state manager. + * + *

    This overloaded variant creates a new entity instance without initializing primary key + * fields from an object ID. It is used by OpenJPA when the key will be set separately.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to attach to this instance + * @param b boolean whether to clear all fields after instantiation + * @return PersistenceCapable a new instance configured with the specified state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicImage cachedDemographicImage = new CachedDemographicImage(); if (b) { @@ -120,11 +271,28 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicImage.pcStateManager = pcStateManager; return (PersistenceCapable)cachedDemographicImage; } - + + /** + * Returns the number of persistent fields managed by OpenJPA for this entity. + * + *

    This entity has 3 managed fields: facilityDemographicPk, image, and updateDate.

    + * + * @return int the count of managed fields (always 3) + */ protected static int pcGetManagedFieldCount() { return 3; } + /** + * Replaces a single persistent field value using the state manager. + * + *

    This method is part of OpenJPA's field interception mechanism. When a field is accessed + * or modified, OpenJPA uses this method to replace the field value with a managed version, + * enabling lazy loading and dirty checking.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicImage.pcInheritedFieldCount; if (n2 < 0) { @@ -148,13 +316,31 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple persistent field values using the state manager. + * + *

    This is a batch version of {@link #pcReplaceField(int)} that processes multiple + * fields in sequence, used by OpenJPA to efficiently manage field state.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the state manager. + * + *

    This method is part of OpenJPA's field interception mechanism. When OpenJPA needs + * to read a field value (for dirty checking, persistence, or serialization), it calls + * this method to retrieve the current value and pass it to the state manager.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicImage.pcInheritedFieldCount; if (n2 < 0) { @@ -178,13 +364,31 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This is a batch version of {@link #pcProvideField(int)} that processes multiple + * fields in sequence, used by OpenJPA for efficient state management operations.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } + /** + * Copies a single field value from another entity instance. + * + *

    This method is used by OpenJPA when copying state between entity instances, + * such as during merge operations or detachment/attachment cycles.

    + * + * @param cachedDemographicImage CachedDemographicImage the source entity to copy from + * @param n int the absolute field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedDemographicImage cachedDemographicImage, final int n) { final int n2 = n - CachedDemographicImage.pcInheritedFieldCount; if (n2 < 0) { @@ -208,7 +412,18 @@ protected void pcCopyField(final CachedDemographicImage cachedDemographicImage, } } } - + + /** + * Copies multiple field values from another entity instance. + * + *

    This is a batch version of {@link #pcCopyField(CachedDemographicImage, int)} that + * validates both entities are managed by the same state manager before copying fields.

    + * + * @param o Object the source entity to copy from (must be a CachedDemographicImage) + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source has a different state manager + * @throws IllegalStateException if this entity has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicImage cachedDemographicImage = (CachedDemographicImage)o; if (cachedDemographicImage.pcStateManager != this.pcStateManager) { @@ -222,24 +437,47 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Retrieves the generic persistence context associated with this entity. + * + * @return Object the generic context from the state manager, or null if not managed + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity. + * + * @return Object the object ID representing the primary key, or null if not managed + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been marked for deletion. + * + * @return boolean true if the entity is scheduled for deletion in the current transaction + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since it was loaded. + * + *

    This method performs a dirty check to determine if any persistent fields have + * changed. OpenJPA uses this for optimizing database writes during transaction commit.

    + * + * @return boolean true if the entity has uncommitted changes + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -248,41 +486,91 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted to the database. + * + * @return boolean true if the entity has been created but not yet flushed to the database + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is currently managed by a persistence context. + * + * @return boolean true if the entity is persistent (managed by OpenJPA) + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is enrolled in an active transaction. + * + * @return boolean true if the entity is participating in a transaction + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if serialization is in progress + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty to trigger persistence on transaction commit. + * + *

    This method notifies the state manager that a field has been modified, ensuring + * OpenJPA will include it in the next database write operation.

    + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager managing this entity's persistence lifecycle. + * + * @return StateManager the state manager, or null if the entity is detached + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version number for optimistic locking. + * + *

    OpenJPA uses this version to detect concurrent modifications and prevent + * lost updates in multi-user scenarios.

    + * + * @return Object the version object, or null if not versioned or detached + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is used during entity lifecycle transitions such as attachment, + * detachment, or when transferring management between persistence contexts.

    + * + * @param pcStateManager StateManager the new state manager to install + * @throws SecurityException if the replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -291,26 +579,78 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies primary key fields to an object ID using a field supplier. + * + *

    This operation is not supported for this entity type and will throw an exception.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies primary key fields to an object ID. + * + *

    This operation is not supported for this entity type and will throw an exception.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies primary key fields from an object ID using a field consumer. + * + *

    This method extracts the composite primary key from an OpenJPA ObjectId and + * stores it using the provided field consumer.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key fields + * @param o Object the source object ID (must be an OpenJPA ObjectId) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(0 + CachedDemographicImage.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies primary key fields from an object ID into this entity. + * + *

    This method extracts the composite primary key from an OpenJPA ObjectId and + * sets it as this entity's primary key.

    + * + * @param o Object the source object ID (must be an OpenJPA ObjectId) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityDemographicPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This operation is not supported as the ObjectId class does not have the required + * string-based constructor.

    + * + * @param o Object the string representation of the object ID + * @return Object never returns; always throws exception + * @throws IllegalArgumentException always thrown as this operation is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicImage\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance from this entity's primary key. + * + *

    This method generates an OpenJPA ObjectId wrapper around this entity's + * composite primary key for use in identity operations and caching.

    + * + * @return Object a new ObjectId containing this entity's primary key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicImage.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicImage != null) ? CachedDemographicImage.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicImage : (CachedDemographicImage.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicImage = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicImage")), (Object)this.facilityDemographicPk); } @@ -363,6 +703,19 @@ private static final void pcSetupdateDate(final CachedDemographicImage cachedDem cachedDemographicImage.pcStateManager.settingObjectField((PersistenceCapable)cachedDemographicImage, CachedDemographicImage.pcInheritedFieldCount + 2, (Object)cachedDemographicImage.updateDate, (Object)updateDate, 0); } + /** + * Checks if this entity is currently detached from its persistence context. + * + *

    An entity is detached when it is no longer managed by OpenJPA but may still + * carry state information. This method returns a tri-state Boolean:

    + *
      + *
    • TRUE - Definitely detached
    • + *
    • FALSE - Definitely not detached (managed or never persisted)
    • + *
    • null - Detachment state is indeterminate
    • + *
    + * + * @return Boolean the detachment state, or null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -383,19 +736,47 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Determines if the detached state is definitive. + * + *

    This implementation always returns false, indicating that the detached state + * cannot be definitively determined without a state manager.

    + * + * @return boolean always false for this entity + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state marker for this entity. + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state marker for this entity. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method to handle OpenJPA state during object serialization. + * + *

    This method ensures that the detached state is properly cleared when an entity + * is being serialized by OpenJPA, preventing serialization of internal persistence + * state that should not be transmitted.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -403,7 +784,17 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method to handle OpenJPA state during object deserialization. + * + *

    This method marks the entity as deserialized, indicating it was reconstituted + * from a serialized form and may need to be reattached to a persistence context.

    + * + * @param objectInputStream ObjectInputStream the stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicIssue.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicIssue.java index 98c1d343dd3..5fdcdd613a5 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicIssue.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicIssue.java @@ -19,6 +19,28 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Represents a cached demographic issue (health concern or diagnosis) within the CAISI integrator system. + * + *

    This entity stores patient health issues that are cached from integrated facilities, enabling + * efficient retrieval of patient health concerns across multiple healthcare facilities. The integrator + * system synchronizes demographic issues from remote facilities to provide a unified view of patient + * health problems.

    + * + *

    This class implements OpenJPA's {@link PersistenceCapable} interface, which provides enhanced + * persistence capabilities including field-level change tracking, lazy loading, and detachment support. + * The OpenJPA bytecode enhancement process generates the necessary persistence methods at build time.

    + * + *

    Healthcare Context: Demographic issues represent clinical problems, diagnoses, + * or health concerns documented in a patient's medical record. These issues can be acute or chronic, + * certain or uncertain, major or minor, and may be resolved or ongoing. The role field indicates which + * healthcare provider or team role documented the issue.

    + * + * @see FacilityIdDemographicIssueCompositePk + * @see AbstractModel + * @see Role + * @since 2026-01-24 + */ @Entity public class CachedDemographicIssue extends AbstractModel implements PersistenceCapable { @@ -50,7 +72,14 @@ public class CachedDemographicIssue extends AbstractModelThis constructor creates a new instance with all health issue attributes + * uninitialized, ready to be populated with demographic issue data from an + * integrated facility.

    + */ public CachedDemographicIssue() { this.issueDescription = null; this.issueRole = null; @@ -59,68 +88,171 @@ public CachedDemographicIssue() { this.major = null; this.resolved = null; } - + + /** + * Retrieves the composite primary key for this cached demographic issue. + * + * @return FacilityIdDemographicIssueCompositePk the composite primary key containing + * facility ID and demographic issue information + */ public FacilityIdDemographicIssueCompositePk getFacilityDemographicIssuePk() { return pcGetfacilityDemographicIssuePk(this); } - + + /** + * Sets the composite primary key for this cached demographic issue. + * + * @param facilityDemographicIssuePk FacilityIdDemographicIssueCompositePk the composite + * primary key to assign + */ public void setFacilityDemographicIssuePk(final FacilityIdDemographicIssueCompositePk facilityDemographicIssuePk) { pcSetfacilityDemographicIssuePk(this, facilityDemographicIssuePk); } - + + /** + * Retrieves the textual description of the health issue. + * + * @return String the issue description (e.g., "Type 2 Diabetes", "Hypertension") + */ public String getIssueDescription() { return pcGetissueDescription(this); } - + + /** + * Sets the textual description of the health issue. + * + *

    The description is automatically trimmed and null values are preserved. + * Whitespace-only strings are converted to null.

    + * + * @param issueDescription String the issue description to set + */ public void setIssueDescription(final String issueDescription) { pcSetissueDescription(this, StringUtils.trimToNull(issueDescription)); } - + + /** + * Retrieves whether this health issue is classified as acute. + * + *

    An acute issue has a sudden onset and typically short duration, as opposed + * to chronic conditions that persist over time.

    + * + * @return Boolean true if the issue is acute, false if chronic, null if unspecified + */ public Boolean getAcute() { return pcGetacute(this); } - + + /** + * Sets whether this health issue is classified as acute. + * + * @param acute Boolean true for acute issues, false for chronic, null if unspecified + */ public void setAcute(final Boolean acute) { pcSetacute(this, acute); } - + + /** + * Retrieves the healthcare role that documented this issue. + * + * @return Role the role (e.g., physician, nurse) that documented the issue + */ public Role getIssueRole() { return pcGetissueRole(this); } - + + /** + * Sets the healthcare role that documented this issue. + * + * @param issueRole Role the documenting role to assign + */ public void setIssueRole(final Role issueRole) { pcSetissueRole(this, issueRole); } - + + /** + * Retrieves whether the diagnosis or issue is certain or probable. + * + *

    A certain diagnosis has been confirmed through clinical evidence, while an + * uncertain diagnosis is suspected or provisional pending further investigation.

    + * + * @return Boolean true if diagnosis is certain, false if probable/suspected, null if unspecified + */ public Boolean getCertain() { return pcGetcertain(this); } - + + /** + * Sets whether the diagnosis or issue is certain or probable. + * + * @param certain Boolean true for confirmed diagnosis, false for suspected, null if unspecified + */ public void setCertain(final Boolean certain) { pcSetcertain(this, certain); } - + + /** + * Retrieves whether this is considered a major health issue. + * + *

    Major issues typically have significant impact on patient health, require ongoing + * management, or affect treatment decisions.

    + * + * @return Boolean true if major issue, false if minor, null if unspecified + */ public Boolean getMajor() { return pcGetmajor(this); } - + + /** + * Sets whether this is considered a major health issue. + * + * @param major Boolean true for major issues, false for minor, null if unspecified + */ public void setMajor(final Boolean major) { pcSetmajor(this, major); } - + + /** + * Retrieves whether this health issue has been resolved. + * + *

    Resolved issues are no longer active concerns but remain in the patient's + * medical history for clinical reference.

    + * + * @return Boolean true if issue is resolved, false if ongoing, null if unspecified + */ public Boolean getResolved() { return pcGetresolved(this); } - + + /** + * Sets whether this health issue has been resolved. + * + * @param resolved Boolean true for resolved issues, false for ongoing, null if unspecified + */ public void setResolved(final Boolean resolved) { pcSetresolved(this, resolved); } - + + /** + * Retrieves the entity identifier. + * + *

    This method overrides the abstract method from {@link AbstractModel} and returns + * the composite primary key.

    + * + * @return FacilityIdDemographicIssueCompositePk the entity's composite primary key + */ @Override public FacilityIdDemographicIssueCompositePk getId() { return pcGetfacilityDemographicIssuePk(this); } - + + /** + * Retrieves the OpenJPA enhancement contract version. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * indicates the version of the bytecode enhancement contract implemented.

    + * + * @return int the enhancement contract version (currently 2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -133,6 +265,16 @@ public int pcGetEnhancementContractVersion() { PCRegistry.register((CachedDemographicIssue.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicIssue != null) ? CachedDemographicIssue.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicIssue : (CachedDemographicIssue.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicIssue = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicIssue")), CachedDemographicIssue.pcFieldNames, CachedDemographicIssue.pcFieldTypes, CachedDemographicIssue.pcFieldFlags, CachedDemographicIssue.pcPCSuperclass, "CachedDemographicIssue", (PersistenceCapable)new CachedDemographicIssue()); } + /** + * Internal utility method to load a class by name. + * + *

    This synthetic method is generated by the compiler to support class literal + * operations in bytecode for compatibility with older Java versions.

    + * + * @param className String the fully qualified class name to load + * @return Class the loaded class object + * @throws NoClassDefFoundError if the class cannot be found + */ static /* synthetic */ Class class$(final String className) { try { return Class.forName(className); @@ -141,7 +283,13 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default null values. + * + *

    This method is part of the OpenJPA persistence enhancement framework and is + * used during object lifecycle management to reset field values.

    + */ protected void pcClearFields() { this.acute = null; this.certain = null; @@ -151,7 +299,18 @@ protected void pcClearFields() { this.major = null; this.resolved = null; } - + + /** + * Creates a new persistence-capable instance with an object ID. + * + *

    This method is part of the OpenJPA persistence enhancement framework and is + * used to instantiate managed entities with identity.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean true to clear all fields after creation + * @return PersistenceCapable the newly created managed instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicIssue cachedDemographicIssue = new CachedDemographicIssue(); if (b) { @@ -161,7 +320,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicIssue.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicIssue; } - + + /** + * Creates a new persistence-capable instance without an object ID. + * + *

    This method is part of the OpenJPA persistence enhancement framework and is + * used to instantiate managed entities without initial identity.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean true to clear all fields after creation + * @return PersistenceCapable the newly created managed instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicIssue cachedDemographicIssue = new CachedDemographicIssue(); if (b) { @@ -170,11 +339,27 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicIssue.pcStateManager = pcStateManager; return (PersistenceCapable)cachedDemographicIssue; } - + + /** + * Returns the total number of managed persistent fields in this entity. + * + *

    This method is part of the OpenJPA persistence enhancement framework.

    + * + * @return int the count of managed fields (currently 7) + */ protected static int pcGetManagedFieldCount() { return 7; } - + + /** + * Replaces a single field value using the state manager. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * enables field-level change tracking and lazy loading.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicIssue.pcInheritedFieldCount; if (n2 < 0) { @@ -214,13 +399,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values using the state manager. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * enables batch field replacement for performance optimization.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the state manager. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * enables field-level state management for persistence operations.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicIssue.pcInheritedFieldCount; if (n2 < 0) { @@ -260,13 +462,31 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * enables batch field state management for performance optimization.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another instance. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * supports entity cloning and state transfer operations.

    + * + * @param cachedDemographicIssue CachedDemographicIssue the source instance to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedDemographicIssue cachedDemographicIssue, final int n) { final int n2 = n - CachedDemographicIssue.pcInheritedFieldCount; if (n2 < 0) { @@ -306,7 +526,18 @@ protected void pcCopyField(final CachedDemographicIssue cachedDemographicIssue, } } } - + + /** + * Copies multiple field values from another instance. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * enables batch field copying for entity cloning operations.

    + * + * @param o Object the source instance to copy from (must be a CachedDemographicIssue) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicIssue cachedDemographicIssue = (CachedDemographicIssue)o; if (cachedDemographicIssue.pcStateManager != this.pcStateManager) { @@ -319,25 +550,48 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicIssue, array[i]); } } - + + /** + * Retrieves the generic context from the state manager. + * + * @return Object the generic context, or null if no state manager is present + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID from the state manager. + * + * @return Object the object ID, or null if no state manager is present + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been deleted. + * + * @return boolean true if the entity is marked for deletion, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since loading. + * + *

    The dirty state indicates that field values have changed and require + * persistence to the database.

    + * + * @return boolean true if any fields have been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -346,41 +600,91 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + * @return boolean true if the entity is new (transient), false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is in a persistent state. + * + *

    Persistent entities are managed by the persistence context and have + * database representation.

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is participating in a transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty by field name. + * + *

    This method notifies the persistence framework that the specified field + * has been modified and requires persistence.

    + * + * @param s String the name of the field that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the associated state manager. + * + * @return StateManager the state manager managing this entity's persistence + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version identifier for optimistic locking. + * + * @return Object the version value, or null if no state manager is present + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is used during entity state transitions within the persistence + * lifecycle.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -388,27 +692,78 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This operation is not supported for this entity type.

    + * + * @param fieldSupplier FieldSupplier the field supplier (not used) + * @param o Object the target object ID (not used) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values to an object ID. + * + *

    This operation is not supported for this entity type.

    + * + * @param o Object the target object ID (not used) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * extracts the composite primary key from an object ID.

    + * + * @param fieldConsumer FieldConsumer the field consumer to store the key field + * @param o Object the source object ID containing the key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(2 + CachedDemographicIssue.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key field values from an object ID. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * extracts the composite primary key from an object ID.

    + * + * @param o Object the source object ID containing the key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityDemographicIssuePk = (FacilityIdDemographicIssueCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This operation is not supported for composite primary keys.

    + * + * @param o Object the string representation (not used) + * @return Object not applicable + * @throws IllegalArgumentException always thrown as this operation is not supported for composite keys + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicIssue\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * creates an object ID wrapper around the composite primary key.

    + * + * @return Object the newly created object ID + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicIssue.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicIssue != null) ? CachedDemographicIssue.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicIssue : (CachedDemographicIssue.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicIssue = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicIssue")), (Object)this.facilityDemographicIssuePk); } @@ -525,6 +880,15 @@ private static final void pcSetresolved(final CachedDemographicIssue cachedDemog cachedDemographicIssue.pcStateManager.settingObjectField((PersistenceCapable)cachedDemographicIssue, CachedDemographicIssue.pcInheritedFieldCount + 6, (Object)cachedDemographicIssue.resolved, (Object)resolved, 0); } + /** + * Checks if this entity is in a detached state. + * + *

    A detached entity was previously managed by a persistence context but is + * no longer associated with one. Detached entities can be modified and later + * reattached (merged) to a persistence context.

    + * + * @return Boolean true if detached, false if not detached, null if state cannot be determined + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -545,19 +909,52 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive. + * + *

    This method is part of the OpenJPA persistence enhancement framework.

    + * + * @return boolean always returns false for this entity type + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state marker. + * + *

    The detached state tracks whether this entity has been serialized or + * explicitly detached from a persistence context.

    + * + * @return Object the detached state marker, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state marker. + * + *

    This method is part of the OpenJPA persistence enhancement framework and + * is used during serialization and detachment operations.

    + * + * @param pcDetachedState Object the detached state marker to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method to handle persistent state during object serialization. + * + *

    This method is invoked during Java serialization and ensures proper handling + * of persistence-related state. If the entity is being serialized by the persistence + * framework, the detached state is cleared.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -565,7 +962,17 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method to handle persistent state during object deserialization. + * + *

    This method is invoked during Java deserialization and marks the entity as + * deserialized to enable proper persistence framework handling.

    + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicLabResult.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicLabResult.java index 62cdc1b84c1..505530367f3 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicLabResult.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicLabResult.java @@ -16,6 +16,26 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Cached laboratory result entity for the CAISI Integrator system. + * + * This entity represents cached laboratory results associated with patients (demographics) in the + * OpenO EMR CAISI Integrator module. The CAISI Integrator enables data sharing across multiple + * healthcare facilities, and this cache improves performance by storing frequently accessed lab + * results locally instead of repeatedly querying remote facilities. + * + * The cache stores lab result data along with metadata including the patient's local demographic ID, + * the facility identifier, the lab result identifier, and the result type. The actual lab result + * data is stored as a medium blob to accommodate various lab result formats (HL7 messages, XML, etc.). + * + * This class is enhanced by Apache OpenJPA for persistence management, implementing the + * PersistenceCapable interface which provides field-level access tracking, state management, + * and detachment capabilities for distributed healthcare environments. + * + * @see FacilityIdLabResultCompositePk + * @see AbstractModel + * @since 2026-01-24 + */ @Entity public class CachedDemographicLabResult extends AbstractModel implements PersistenceCapable { @@ -40,47 +60,106 @@ public class CachedDemographicLabResult extends AbstractModel implements PersistenceCapable { @@ -78,7 +109,14 @@ public class CachedDemographicNote extends AbstractModel(); this.issues = new HashSet(); } - + + /** + * Constructs a new cached demographic note with required identifying and clinical information. + * + * This constructor initializes the composite primary key and essential clinical observation data. + * It is used when creating new cached note entries from integrated facility data. Additional + * properties such as encounter type, signing provider, and note content should be set using + * the appropriate setter methods after construction. + * + * @param integratedFacilityId Integer the unique identifier of the integrated facility providing this data + * @param uuid String the universally unique identifier for this note across the distributed system + * @param caisiDemographicId int the demographic (patient) identifier in the CAISI system + * @param caisiProgramId int the program identifier this note is associated with + * @param observationCaisiProviderId String the provider identifier who made the clinical observation (max 16 chars) + * @param observationDate Date the timestamp when the clinical observation was made + * @param role String the role classification for this note (max 64 chars) + */ public CachedDemographicNote(final Integer integratedFacilityId, final String uuid, final int caisiDemographicId, final int caisiProgramId, final String observationCaisiProviderId, final Date observationDate, final String role) { this.updateDate = null; this.observationDate = null; @@ -112,109 +166,254 @@ public CachedDemographicNote(final Integer integratedFacilityId, final String uu this.observationDate = observationDate; this.role = role; } - + + /** + * Sets the composite primary key for this cached demographic note. + * + * @param cachedDemographicNoteCompositePk CachedDemographicNoteCompositePk the composite key containing facility ID and UUID + */ public void setCachedDemographicNoteCompositePk(final CachedDemographicNoteCompositePk cachedDemographicNoteCompositePk) { pcSetcachedDemographicNoteCompositePk(this, cachedDemographicNoteCompositePk); } - + + /** + * Gets the composite primary key for this cached demographic note. + * + * @return CachedDemographicNoteCompositePk the composite key containing facility ID and UUID + */ public CachedDemographicNoteCompositePk getCachedDemographicNoteCompositePk() { return pcGetcachedDemographicNoteCompositePk(this); } - + + /** + * Gets the entity identifier (composite primary key). + * + * This method overrides the AbstractModel getId() method to provide type-specific access + * to the composite key. + * + * @return CachedDemographicNoteCompositePk the composite primary key + */ @Override public CachedDemographicNoteCompositePk getId() { return pcGetcachedDemographicNoteCompositePk(this); } - + + /** + * Gets the timestamp when this cached note record was last updated. + * + * @return Date the last update timestamp, used for cache synchronization and audit trails + */ public Date getUpdateDate() { return pcGetupdateDate(this); } - + + /** + * Sets the timestamp when this cached note record was last updated. + * + * @param updateDate Date the last update timestamp + */ public void setUpdateDate(final Date updateDate) { pcSetupdateDate(this, updateDate); } - + + /** + * Gets the clinical observation date when this note was originally created. + * + * @return Date the timestamp when the clinical observation was made + */ public Date getObservationDate() { return pcGetobservationDate(this); } - + + /** + * Sets the clinical observation date when this note was originally created. + * + * @param observationDate Date the timestamp when the clinical observation was made + */ public void setObservationDate(final Date observationDate) { pcSetobservationDate(this, observationDate); } - + + /** + * Gets the CAISI demographic (patient) identifier this note is associated with. + * + * @return int the demographic identifier in the CAISI system + */ public int getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic (patient) identifier this note is associated with. + * + * @param caisiDemographicId int the demographic identifier in the CAISI system + */ public void setCaisiDemographicId(final int caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Gets the provider identifier who made the clinical observation. + * + * @return String the CAISI provider identifier (max 16 characters) + */ public String getObservationCaisiProviderId() { return pcGetobservationCaisiProviderId(this); } - + + /** + * Sets the provider identifier who made the clinical observation. + * + * @param observationCaisiProviderId String the CAISI provider identifier (max 16 characters) + */ public void setObservationCaisiProviderId(final String observationCaisiProviderId) { pcSetobservationCaisiProviderId(this, observationCaisiProviderId); } - + + /** + * Gets the CAISI program identifier this note is associated with. + * + * @return int the program identifier for community health program organization + */ public int getCaisiProgramId() { return pcGetcaisiProgramId(this); } - + + /** + * Sets the CAISI program identifier this note is associated with. + * + * @param caisiProgramId int the program identifier for community health program organization + */ public void setCaisiProgramId(final int caisiProgramId) { pcSetcaisiProgramId(this, caisiProgramId); } - + + /** + * Gets the role classification for this clinical note. + * + * @return String the role identifier (max 64 characters) + */ public String getRole() { return pcGetrole(this); } - + + /** + * Sets the role classification for this clinical note. + * + * @param role String the role identifier (max 64 characters) + */ public void setRole(final String role) { pcSetrole(this, role); } - + + /** + * Gets the clinical note text content. + * + * @return String the note content, stored as medium text (up to ~16MB) + */ public String getNote() { return pcGetnote(this); } - + + /** + * Sets the clinical note text content. + * + * @param note String the note content, stored as medium text (up to ~16MB) + */ public void setNote(final String note) { pcSetnote(this, note); } - + + /** + * Gets the provider identifier who signed off on this clinical note. + * + * @return String the CAISI provider identifier of the signing provider (max 16 characters), may be null if unsigned + */ public String getSigningCaisiProviderId() { return pcGetsigningCaisiProviderId(this); } - + + /** + * Sets the provider identifier who signed off on this clinical note. + * + * @param signingCaisiProviderId String the CAISI provider identifier of the signing provider (max 16 characters) + */ public void setSigningCaisiProviderId(final String signingCaisiProviderId) { pcSetsigningCaisiProviderId(this, signingCaisiProviderId); } - + + /** + * Gets the encounter type classification for this clinical note. + * + * @return String the encounter type identifier (max 100 characters) + */ public String getEncounterType() { return pcGetencounterType(this); } - + + /** + * Sets the encounter type classification for this clinical note. + * + * @param encounterType String the encounter type identifier (max 100 characters) + */ public void setEncounterType(final String encounterType) { pcSetencounterType(this, encounterType); } - + + /** + * Gets the transient set of clinical issues associated with this note. + * + * This is a transient field populated from the persisted noteIssues string collection + * during the PostLoad lifecycle event. It provides type-safe access to NoteIssue enums. + * + * @return Set<NoteIssue> the set of clinical issues, converted from string representations + */ public Set getIssues() { return this.issues; } - + + /** + * Sets the transient set of clinical issues associated with this note. + * + * Changes to this field are persisted to the database through the noteIssues collection + * during the PrePersist and PreUpdate lifecycle events. + * + * @param issues Set<NoteIssue> the set of clinical issues to associate with this note + */ public void setIssues(final Set issues) { this.issues = issues; } - + + /** + * Gets the persisted string collection of note issues. + * + * This field stores the string representations of NoteIssue enums for database persistence. + * The @XmlTransient annotation excludes this field from XML serialization to prevent duplication + * with the issues field in XML representations. + * + * @return Set<String> the set of note issue string identifiers + */ @XmlTransient public Set getNoteIssues() { return pcGetnoteIssues(this); } - + + /** + * Sets the persisted string collection of note issues. + * + * @param noteIssues Set<String> the set of note issue string identifiers + */ public void setNoteIssues(final Set noteIssues) { pcSetnoteIssues(this, noteIssues); } - + + /** + * JPA PostLoad lifecycle callback that converts persisted string issue codes to NoteIssue enums. + * + * This method is automatically invoked by the JPA provider after an entity is loaded from the database. + * It populates the transient issues collection by converting each string in noteIssues to its + * corresponding NoteIssue enum value, providing type-safe access to clinical issue coding. + */ @PostLoad protected void logRead() { for (final Object obj : pcGetnoteIssues(this)) { @@ -222,7 +421,14 @@ protected void logRead() { this.getIssues().add(NoteIssue.valueOf(noteIssue)); } } - + + /** + * JPA PrePersist and PreUpdate lifecycle callback that converts NoteIssue enums to strings for persistence. + * + * This method is automatically invoked by the JPA provider before an entity is inserted or updated + * in the database. It synchronizes the transient issues collection to the persisted noteIssues + * collection by converting each NoteIssue enum to its string representation. + */ @PreUpdate @PrePersist protected void logWrite() { @@ -244,11 +450,30 @@ public int compare(final CachedDemographicNote o1, final CachedDemographicNote o CachedDemographicNote.pcFieldFlags = new byte[] { 26, 26, 26, 26, 26, 10, 26, 26, 26, 26, 26 }; PCRegistry.register((CachedDemographicNote.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNote != null) ? CachedDemographicNote.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNote : (CachedDemographicNote.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNote = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicNote")), CachedDemographicNote.pcFieldNames, CachedDemographicNote.pcFieldTypes, CachedDemographicNote.pcFieldFlags, CachedDemographicNote.pcPCSuperclass, "CachedDemographicNote", (PersistenceCapable)new CachedDemographicNote()); } - + + /** + * Gets the OpenJPA enhancement contract version number. + * + * This method is part of the PersistenceCapable contract and returns the version number + * of the enhancement specification that this class complies with. This is used internally + * by OpenJPA to ensure compatibility between enhanced classes and the persistence framework. + * + * @return int the enhancement contract version (2 for current OpenJPA version) + */ public int pcGetEnhancementContractVersion() { return 2; } + /** + * Utility method to load a class by name (synthetic method generated during compilation). + * + * This is a compiler-generated synthetic method used to optimize class literal references + * in the static initializer block. It should not be called directly by application code. + * + * @param className String the fully qualified name of the class to load + * @return Class the loaded class object + * @throws NoClassDefFoundError if the class cannot be found + */ static /* synthetic */ Class class$(final String className) { try { return Class.forName(className); @@ -257,7 +482,14 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent field values to their default states. + * + * This method is part of the OpenJPA PersistenceCapable contract and is used internally + * by the persistence framework during entity lifecycle management. It should not be called + * directly by application code. + */ protected void pcClearFields() { this.cachedDemographicNoteCompositePk = null; this.caisiDemographicId = 0; @@ -271,7 +503,18 @@ protected void pcClearFields() { this.signingCaisiProviderId = null; this.updateDate = null; } - + + /** + * Creates a new instance of this entity with a state manager and object ID. + * + * This method is part of the PersistenceCapable contract and is used by OpenJPA to create + * new entity instances during query results processing and entity lifecycle operations. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID containing the entity's primary key values + * @param b boolean if true, clears all field values to defaults after creation + * @return PersistenceCapable the newly created entity instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicNote cachedDemographicNote = new CachedDemographicNote(); if (b) { @@ -281,7 +524,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicNote.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicNote; } - + + /** + * Creates a new instance of this entity with a state manager. + * + * This method is part of the PersistenceCapable contract and is used by OpenJPA to create + * new entity instances without pre-populating the primary key values. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all field values to defaults after creation + * @return PersistenceCapable the newly created entity instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicNote cachedDemographicNote = new CachedDemographicNote(); if (b) { @@ -290,11 +543,30 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicNote.pcStateManager = pcStateManager; return (PersistenceCapable)cachedDemographicNote; } - + + /** + * Gets the count of managed persistent fields in this entity. + * + * This method is part of the PersistenceCapable contract and returns the number of fields + * that are managed by the OpenJPA persistence framework. This count is used internally + * for field indexing and state management operations. + * + * @return int the number of managed fields (11 for this entity) + */ protected static int pcGetManagedFieldCount() { return 11; } - + + /** + * Replaces a single persistent field value with the value from the state manager. + * + * This method is part of the PersistenceCapable contract and is called by OpenJPA during + * entity state restoration operations (e.g., rollback, refresh). It replaces the field + * at the specified index with the value stored in the state manager. + * + * @param n int the field index (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicNote.pcInheritedFieldCount; if (n2 < 0) { @@ -350,13 +622,31 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple persistent field values with values from the state manager. + * + * This is a convenience method that calls pcReplaceField for each field index in the array. + * Part of the PersistenceCapable contract for batch field restoration operations. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides the current value of a single persistent field to the state manager. + * + * This method is part of the PersistenceCapable contract and is called by OpenJPA to + * read field values from the entity and provide them to the state manager for tracking, + * persistence, or detachment operations. + * + * @param n int the field index (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicNote.pcInheritedFieldCount; if (n2 < 0) { @@ -412,13 +702,32 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides the current values of multiple persistent fields to the state manager. + * + * This is a convenience method that calls pcProvideField for each field index in the array. + * Part of the PersistenceCapable contract for batch field access operations. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another instance of this entity. + * + * This method is part of the PersistenceCapable contract and is used by OpenJPA for + * entity cloning and merging operations. It copies the field value at the specified + * index from the source entity to this entity. + * + * @param cachedDemographicNote CachedDemographicNote the source entity to copy from + * @param n int the field index (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedDemographicNote cachedDemographicNote, final int n) { final int n2 = n - CachedDemographicNote.pcInheritedFieldCount; if (n2 < 0) { @@ -474,7 +783,18 @@ protected void pcCopyField(final CachedDemographicNote cachedDemographicNote, fi } } } - + + /** + * Copies multiple field values from another instance of this entity. + * + * This method is part of the PersistenceCapable contract and validates that both entities + * share the same state manager before performing the copy operation. + * + * @param o Object the source entity to copy from (must be CachedDemographicNote) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source entity has a different state manager + * @throws IllegalStateException if this entity has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicNote cachedDemographicNote = (CachedDemographicNote)o; if (cachedDemographicNote.pcStateManager != this.pcStateManager) { @@ -487,25 +807,57 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicNote, array[i]); } } - + + /** + * Gets the generic context object from the state manager. + * + * Part of the PersistenceCapable contract. Returns the generic context associated with + * this entity's state manager, or null if the entity is not managed. + * + * @return Object the generic context, or null if no state manager is attached + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the JPA object identifier for this entity. + * + * Part of the PersistenceCapable contract. Returns the object ID used by the persistence + * framework to uniquely identify this entity instance. + * + * @return Object the object identifier, or null if the entity is not managed + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been marked for deletion. + * + * Part of the PersistenceCapable contract. Returns true if the entity has been deleted + * in the current transaction but not yet flushed to the database. + * + * @return boolean true if the entity is marked for deletion, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since it was loaded. + * + * Part of the PersistenceCapable contract. Returns true if any persistent fields have + * been changed and the changes have not yet been flushed to the database. + * + * @return boolean true if the entity has pending changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -514,41 +866,107 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + * Part of the PersistenceCapable contract. Returns true if the entity has been created + * in the current transaction but not yet flushed to the database. + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is managed by the persistence context. + * + * Part of the PersistenceCapable contract. Returns true if the entity is associated + * with a persistence context and its lifecycle is being tracked by the JPA provider. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is part of an active transaction. + * + * Part of the PersistenceCapable contract. Returns true if the entity is enlisted + * in the current transaction context. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * Part of the PersistenceCapable contract. Returns true during serialization operations + * to allow special handling of persistent state. + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty (modified) by name. + * + * Part of the PersistenceCapable contract. Notifies the state manager that a field + * has been modified, triggering change tracking and update detection. + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Gets the OpenJPA state manager attached to this entity. + * + * Part of the PersistenceCapable contract. Returns the state manager responsible + * for tracking this entity's lifecycle and persistent state. + * + * @return StateManager the state manager, or null if the entity is not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Gets the version object for optimistic locking. + * + * Part of the PersistenceCapable contract. Returns the version value used for + * optimistic locking to detect concurrent modifications. + * + * @return Object the version value, or null if the entity is not managed + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager attached to this entity. + * + * Part of the PersistenceCapable contract. This method is used by OpenJPA to transfer + * entity management from one state manager to another, such as when transferring entities + * between persistence contexts. + * + * @param pcStateManager StateManager the new state manager to attach + * @throws SecurityException if the state manager replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -556,27 +974,81 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies primary key field values to an object ID using a field supplier. + * + * Part of the PersistenceCapable contract. This method is not supported for this entity + * type and throws an InternalException if called. + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies primary key field values to an object ID. + * + * Part of the PersistenceCapable contract. This method is not supported for this entity + * type and throws an InternalException if called. + * + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies primary key field values from an object ID using a field consumer. + * + * Part of the PersistenceCapable contract. This method extracts the composite primary + * key from the provided ObjectId and stores it using the field consumer. + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key values + * @param o Object the source object ID containing the primary key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(0 + CachedDemographicNote.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies primary key field values from an object ID to this entity. + * + * Part of the PersistenceCapable contract. This method extracts the composite primary + * key from the provided ObjectId and assigns it to this entity's primary key field. + * + * @param o Object the source object ID containing the primary key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.cachedDemographicNoteCompositePk = (CachedDemographicNoteCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + * Part of the PersistenceCapable contract. This method is not supported for this entity + * type because ObjectId does not have a suitable string constructor. + * + * @param o Object the string representation of the object ID + * @return Object never returns (always throws exception) + * @throws IllegalArgumentException always, as string-based object ID construction is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicNote\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance based on this entity's current primary key values. + * + * Part of the PersistenceCapable contract. This method constructs an ObjectId wrapper + * around the entity's composite primary key for use in JPA operations. + * + * @return Object a new ObjectId containing this entity's primary key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicNote.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNote != null) ? CachedDemographicNote.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNote : (CachedDemographicNote.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNote = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicNote")), (Object)this.cachedDemographicNoteCompositePk); } @@ -756,7 +1228,18 @@ private static final void pcSetupdateDate(final CachedDemographicNote cachedDemo } cachedDemographicNote.pcStateManager.settingObjectField((PersistenceCapable)cachedDemographicNote, CachedDemographicNote.pcInheritedFieldCount + 10, (Object)cachedDemographicNote.updateDate, (Object)updateDate, 0); } - + + /** + * Checks if this entity is in a detached state. + * + * Part of the PersistenceCapable contract. A detached entity is one that was previously + * managed by a persistence context but is no longer associated with it. This method returns: + * - Boolean.TRUE if the entity is definitely detached + * - Boolean.FALSE if the entity is definitely not detached + * - null if the detachment state cannot be determined definitively + * + * @return Boolean the detachment state, or null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -777,15 +1260,39 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state determination is definitive. + * + * Internal helper method for pcIsDetached(). Returns false to indicate that detachment + * state determination requires additional context beyond the detached state field. + * + * @return boolean always returns false for this entity type + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Gets the detached state marker object. + * + * Part of the PersistenceCapable contract. The detached state object is used to track + * whether an entity instance has been detached from its persistence context. + * + * @return Object the detached state marker, or null if never detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state marker object. + * + * Part of the PersistenceCapable contract. Used by the JPA provider to mark an entity + * as detached or to clear the detachment state. + * + * @param pcDetachedState Object the detached state marker to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicNoteCompositePk.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicNoteCompositePk.java index 0519582108f..e2b8e5d7ada 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicNoteCompositePk.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicNoteCompositePk.java @@ -15,6 +15,27 @@ import org.apache.openjpa.enhance.PersistenceCapable; import java.io.Serializable; +/** + * Composite primary key for the CachedDemographicNote entity in the CAISI Integrator system. + * + *

    This embeddable class represents a composite primary key that uniquely identifies cached + * demographic notes across multiple integrated healthcare facilities. The key combines the + * integrator facility identifier with a universally unique identifier (UUID) to ensure uniqueness + * across distributed healthcare systems.

    + * + *

    The class is enhanced by OpenJPA for persistence management and implements both + * {@link Serializable} for Java serialization and {@link PersistenceCapable} for JPA persistence + * operations. OpenJPA byte-code enhancement provides automatic field-level change tracking and + * lazy loading capabilities.

    + * + *

    Healthcare Context: The CAISI Integrator facilitates data sharing between + * multiple OpenO EMR installations. This composite key ensures that demographic notes from + * different facilities can be cached and retrieved without key conflicts, supporting multi-site + * healthcare delivery and patient record integration.

    + * + * @see CachedDemographicNote + * @since 2026-01-24 + */ @Embeddable public class CachedDemographicNoteCompositePk implements Serializable, PersistenceCapable { @@ -34,45 +55,121 @@ public class CachedDemographicNoteCompositePk implements Serializable, Persisten static /* synthetic */ Class class$Ljava$lang$String; static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicNoteCompositePk; private transient Object pcDetachedState; - + + /** + * Default constructor that initializes a new composite primary key with null values. + * + *

    This no-argument constructor is required by JPA for entity instantiation and + * deserialization. It initializes both the integrator facility ID and UUID to null.

    + */ public CachedDemographicNoteCompositePk() { this.integratorFacilityId = null; this.uuid = null; } - + + /** + * Parameterized constructor that creates a composite primary key with specified values. + * + *

    This constructor is used to create a new composite key instance with both components + * of the primary key populated. The facility ID identifies the specific healthcare facility + * in the integrator network, while the UUID provides a unique identifier for the cached note.

    + * + * @param integratorFacilityId Integer the unique identifier for the integrator facility + * @param uuid String the universally unique identifier for the cached demographic note + */ public CachedDemographicNoteCompositePk(final Integer integratorFacilityId, final String uuid) { this.integratorFacilityId = null; this.uuid = null; this.integratorFacilityId = integratorFacilityId; this.uuid = uuid; } - + + /** + * Retrieves the integrator facility identifier component of this composite key. + * + *

    The integrator facility ID identifies the specific healthcare facility within the + * CAISI Integrator network from which this cached demographic note originated.

    + * + * @return Integer the integrator facility identifier, or null if not set + */ public Integer getIntegratorFacilityId() { return pcGetintegratorFacilityId(this); } - + + /** + * Sets the integrator facility identifier component of this composite key. + * + *

    This method updates the facility identifier portion of the composite key. The value + * is managed through OpenJPA's persistence-capable field tracking mechanism.

    + * + * @param integratorFacilityId Integer the integrator facility identifier to set + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { pcSetintegratorFacilityId(this, integratorFacilityId); } - + + /** + * Retrieves the UUID component of this composite key. + * + *

    The UUID provides a universally unique identifier for the cached demographic note, + * ensuring uniqueness across all facilities in the integrator network.

    + * + * @return String the UUID of the cached demographic note, or null if not set + */ public String getUuid() { return pcGetuuid(this); } - + + /** + * Sets the UUID component of this composite key. + * + *

    This method updates the UUID portion of the composite key. The input value is + * automatically trimmed and null values are preserved using Apache Commons StringUtils. + * The value is managed through OpenJPA's persistence-capable field tracking mechanism.

    + * + * @param uuid String the UUID to set, will be trimmed to null if empty or whitespace + */ public void setUuid(final String uuid) { pcSetuuid(this, StringUtils.trimToNull(uuid)); } - + + /** + * Returns a string representation of this composite primary key. + * + *

    The string format is "integratorFacilityId:uuid", providing a human-readable + * representation of both components of the composite key separated by a colon.

    + * + * @return String a colon-separated string representation of the facility ID and UUID + */ @Override public String toString() { return "" + pcGetintegratorFacilityId(this) + ':' + pcGetuuid(this); } - + + /** + * Generates a hash code for this composite primary key based on the UUID component. + * + *

    The hash code is derived solely from the UUID field. This implementation assumes + * that the UUID alone provides sufficient uniqueness for hash-based collections.

    + * + * @return int the hash code value for this composite key + */ @Override public int hashCode() { return pcGetuuid(this).hashCode(); } - + + /** + * Compares this composite primary key with another object for equality. + * + *

    Two composite keys are considered equal if both the integrator facility ID and + * UUID components are equal. The comparison uses the equals method of both Integer + * and String classes. Any runtime exceptions during comparison (such as null pointer + * or class cast exceptions) result in a false return value.

    + * + * @param o Object the object to compare with this composite key + * @return boolean true if both components are equal, false otherwise or on exception + */ @Override public boolean equals(final Object o) { try { @@ -83,7 +180,16 @@ public boolean equals(final Object o) { return false; } } - + + /** + * Returns the OpenJPA byte-code enhancement contract version for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and indicates + * the version of the byte-code enhancement specification this class implements. + * Version 2 represents the current enhancement contract version.

    + * + * @return int the enhancement contract version, currently 2 + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -103,12 +209,32 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all managed fields to their default null values. + * + *

    This protected method is part of the OpenJPA persistence infrastructure and is + * used to reset the entity state during persistence operations such as instance creation + * or state transitions.

    + */ protected void pcClearFields() { this.integratorFacilityId = null; this.uuid = null; } - + + /** + * Creates a new PersistenceCapable instance with the specified state manager and object ID. + * + *

    This factory method is part of the OpenJPA PersistenceCapable contract and is used + * by the persistence framework to create new instances during database operations. The + * method creates a new instance, optionally clears its fields, assigns the state manager, + * and copies key fields from the provided object ID.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param o Object the object ID from which to copy key field values + * @param b boolean if true, clears all fields before copying key fields + * @return PersistenceCapable a new instance configured with the provided parameters + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicNoteCompositePk cachedDemographicNoteCompositePk = new CachedDemographicNoteCompositePk(); if (b) { @@ -118,7 +244,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicNoteCompositePk.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicNoteCompositePk; } - + + /** + * Creates a new PersistenceCapable instance with the specified state manager. + * + *

    This factory method is part of the OpenJPA PersistenceCapable contract and is used + * by the persistence framework to create new instances. Unlike the three-parameter version, + * this method does not initialize key fields from an object ID.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param b boolean if true, clears all fields after instance creation + * @return PersistenceCapable a new instance configured with the provided state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicNoteCompositePk cachedDemographicNoteCompositePk = new CachedDemographicNoteCompositePk(); if (b) { @@ -127,11 +264,30 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicNoteCompositePk.pcStateManager = pcStateManager; return (PersistenceCapable)cachedDemographicNoteCompositePk; } - + + /** + * Returns the number of managed fields in this entity class. + * + *

    This static method is part of the OpenJPA persistence metadata and indicates + * the total number of fields that are managed by the persistence framework. This + * class has two managed fields: integratorFacilityId and uuid.

    + * + * @return int the number of managed fields, currently 2 + */ protected static int pcGetManagedFieldCount() { return 2; } - + + /** + * Replaces the value of a single managed field at the specified index. + * + *

    This method is part of the OpenJPA field replacement infrastructure and is called + * by the persistence framework to update field values during state management operations + * such as refresh, merge, or detach. The field index is relative to inherited fields.

    + * + * @param n int the field index to replace (0 for integratorFacilityId, 1 for uuid) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicNoteCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -151,13 +307,33 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces the values of multiple managed fields at the specified indices. + * + *

    This method is part of the OpenJPA field replacement infrastructure and provides + * batch field replacement by iterating through the provided array of field indices + * and calling pcReplaceField for each one.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides the value of a single managed field to the state manager. + * + *

    This method is part of the OpenJPA field access infrastructure and is called + * by the persistence framework to read field values during operations such as flush, + * detach, or serialization. The field value is passed to the state manager's + * providedObjectField or providedStringField method.

    + * + * @param n int the field index to provide (0 for integratorFacilityId, 1 for uuid) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicNoteCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -177,13 +353,33 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides the values of multiple managed fields to the state manager. + * + *

    This method is part of the OpenJPA field access infrastructure and provides + * batch field provision by iterating through the provided array of field indices + * and calling pcProvideField for each one.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies the value of a single field from another instance of this class. + * + *

    This protected method is part of the OpenJPA field copy infrastructure and is + * used during merge or refresh operations to transfer field values from one instance + * to another. The field index is relative to inherited fields.

    + * + * @param cachedDemographicNoteCompositePk CachedDemographicNoteCompositePk the source instance + * @param n int the field index to copy (0 for integratorFacilityId, 1 for uuid) + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedDemographicNoteCompositePk cachedDemographicNoteCompositePk, final int n) { final int n2 = n - CachedDemographicNoteCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -203,7 +399,20 @@ protected void pcCopyField(final CachedDemographicNoteCompositePk cachedDemograp } } } - + + /** + * Copies multiple field values from another instance of this class. + * + *

    This method is part of the OpenJPA field copy infrastructure and provides batch + * field copying by iterating through the provided array of field indices. Both instances + * must share the same state manager, and a state manager must be present for the + * operation to succeed.

    + * + * @param o Object the source instance to copy from (must be CachedDemographicNoteCompositePk) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source has a different state manager + * @throws IllegalStateException if no state manager is present + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicNoteCompositePk cachedDemographicNoteCompositePk = (CachedDemographicNoteCompositePk)o; if (cachedDemographicNoteCompositePk.pcStateManager != this.pcStateManager) { @@ -216,25 +425,61 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicNoteCompositePk, array[i]); } } - + + /** + * Returns the generic context object from the persistence state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and provides + * access to the generic context associated with the state manager. Returns null + * if no state manager is assigned.

    + * + * @return Object the generic context from the state manager, or null if no state manager + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this persistence-capable instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and retrieves + * the unique object identifier assigned by the persistence framework. Returns null + * if no state manager is assigned.

    + * + * @return Object the object ID for this instance, or null if no state manager + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this instance has been marked for deletion. + * + *

    This method is part of the OpenJPA state checking infrastructure and returns + * true if the instance is managed and has been marked for deletion in the current + * transaction.

    + * + * @return boolean true if marked for deletion, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this instance has been modified since being loaded. + * + *

    This method is part of the OpenJPA dirty checking infrastructure and returns + * true if any managed fields have been modified. The method performs a dirty check + * operation before querying the dirty state.

    + * + * @return boolean true if the instance has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -243,41 +488,112 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this instance is newly created and not yet persisted. + * + *

    This method is part of the OpenJPA state checking infrastructure and returns + * true if the instance is managed and represents a new object that has not yet + * been saved to the database.

    + * + * @return boolean true if newly created, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this instance is managed by the persistence context. + * + *

    This method is part of the OpenJPA state checking infrastructure and returns + * true if the instance is currently managed by a persistence context and represents + * a persistent entity in the database.

    + * + * @return boolean true if persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this instance is participating in a transaction. + * + *

    This method is part of the OpenJPA state checking infrastructure and returns + * true if the instance is managed and is participating in an active transaction.

    + * + * @return boolean true if transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this instance is currently being serialized. + * + *

    This method is part of the OpenJPA serialization infrastructure and returns + * true if the instance is currently undergoing serialization. This is used to + * control special behavior during the serialization process.

    + * + * @return boolean true if currently serializing, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks this instance as dirty, indicating that the specified field has been modified. + * + *

    This method is part of the OpenJPA change tracking infrastructure and notifies + * the state manager that a field has been modified, triggering dirty checking and + * eventual persistence of the change.

    + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Returns the state manager currently assigned to this instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and provides + * access to the StateManager that manages the persistence state of this instance.

    + * + * @return StateManager the current state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Returns the version object for this managed instance. + * + *

    This method is part of the OpenJPA versioning infrastructure and retrieves + * the version identifier used for optimistic locking. Returns null if no state + * manager is assigned.

    + * + * @return Object the version object, or null if no state manager + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is part of the OpenJPA state manager lifecycle and allows the + * persistence framework to reassign or update the state manager. If a state manager + * is already present, it delegates to that manager's replaceStateManager method.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if the replacement is not permitted by security policy + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -285,23 +601,80 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This method is part of the OpenJPA object ID management infrastructure. For this + * embeddable composite key class, the implementation is empty as the key fields are + * managed directly within the object itself.

    + * + * @param fieldSupplier FieldSupplier the field supplier providing field values + * @param o Object the target object ID + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { } - + + /** + * Copies key field values to an object ID. + * + *

    This method is part of the OpenJPA object ID management infrastructure. For this + * embeddable composite key class, the implementation is empty as the key fields are + * managed directly within the object itself.

    + * + * @param o Object the target object ID + */ public void pcCopyKeyFieldsToObjectId(final Object o) { } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    This method is part of the OpenJPA object ID management infrastructure. For this + * embeddable composite key class, the implementation is empty as the key fields are + * managed directly within the object itself.

    + * + * @param fieldConsumer FieldConsumer the field consumer receiving field values + * @param o Object the source object ID + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { } - + + /** + * Copies key field values from an object ID. + * + *

    This method is part of the OpenJPA object ID management infrastructure. For this + * embeddable composite key class, the implementation is empty as the key fields are + * managed directly within the object itself.

    + * + * @param o Object the source object ID + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { } - + + /** + * Creates a new object ID instance for this entity type. + * + *

    This method is part of the OpenJPA object ID infrastructure. For this embeddable + * composite key class, it returns null as the composite key itself serves as the + * object identifier.

    + * + * @return Object always returns null for this embeddable key class + */ public Object pcNewObjectIdInstance() { return null; } - + + /** + * Creates a new object ID instance initialized from the provided object. + * + *

    This method is part of the OpenJPA object ID infrastructure. For this embeddable + * composite key class, it returns null as the composite key itself serves as the + * object identifier.

    + * + * @param o Object the source object for initializing the ID + * @return Object always returns null for this embeddable key class + */ public Object pcNewObjectIdInstance(final Object o) { return null; } @@ -337,7 +710,20 @@ private static final void pcSetuuid(final CachedDemographicNoteCompositePk cache } cachedDemographicNoteCompositePk.pcStateManager.settingStringField((PersistenceCapable)cachedDemographicNoteCompositePk, CachedDemographicNoteCompositePk.pcInheritedFieldCount + 1, cachedDemographicNoteCompositePk.uuid, uuid, 0); } - + + /** + * Checks whether this instance is in a detached state. + * + *

    This method is part of the OpenJPA detachment infrastructure and determines if + * the instance has been detached from its persistence context. The method returns:

    + *
      + *
    • Boolean.TRUE if definitely detached
    • + *
    • Boolean.FALSE if definitely not detached
    • + *
    • null if the detachment state cannot be determined definitively
    • + *
    + * + * @return Boolean TRUE if detached, FALSE if attached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -358,19 +744,56 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Determines if the detached state can be definitively determined. + * + *

    This private method is part of the OpenJPA detachment infrastructure and is + * used internally by pcIsDetached() to determine if the detachment status can be + * conclusively determined from available information.

    + * + * @return boolean always returns false, indicating the state is not definitive + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Returns the current detached state object for this instance. + * + *

    This method is part of the OpenJPA detachment infrastructure and retrieves + * the detached state marker. The value may be null (not detached), DESERIALIZED + * (recently deserialized), or another object indicating detached status.

    + * + * @return Object the detached state object, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state for this instance. + * + *

    This method is part of the OpenJPA detachment infrastructure and is used + * by the persistence framework to mark the instance's detachment status during + * detach operations or deserialization.

    + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method that handles persistence state during serialization. + * + *

    This private method is part of Java's serialization infrastructure and is called + * automatically during object serialization. If the instance is being serialized by + * the persistence framework, it clears the detached state after writing the object.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -378,7 +801,19 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method that handles persistence state during deserialization. + * + *

    This private method is part of Java's serialization infrastructure and is called + * automatically during object deserialization. It marks the instance as DESERIALIZED + * before reading the object state, indicating that the instance was created through + * deserialization rather than normal persistence operations.

    + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if a required class cannot be found during deserialization + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicPrevention.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicPrevention.java index 1517598e7a8..b6d0c653c7c 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicPrevention.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDemographicPrevention.java @@ -19,6 +19,43 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing cached demographic prevention data in the CAISI integrator system. + * + *

    This class stores prevention and immunization records for patients across multiple healthcare + * facilities in a federated environment. It enables the CAISI (Client Access to Integrated Services + * and Information) integrator to cache and synchronize prevention data from different OpenO EMR + * installations, providing a unified view of patient preventive care history.

    + * + *

    The entity tracks various aspects of preventive healthcare including:

    + *
      + *
    • Immunization records and vaccination schedules
    • + *
    • Preventive health screenings and tests
    • + *
    • Patient refusal of recommended preventions
    • + *
    • Provider-documented "never" indications for specific preventions
    • + *
    • Scheduled next prevention dates for follow-up care
    • + *
    + * + *

    This class is enhanced by Apache OpenJPA for persistence capabilities. The OpenJPA enhancement + * process adds bytecode instrumentation to support transparent field access tracking, lazy loading, + * and state management. All methods beginning with "pc" are part of the OpenJPA PersistenceCapable + * interface and are used internally by the persistence framework.

    + * + *

    Healthcare Context: Prevention tracking is a critical component of population + * health management and quality improvement initiatives. This cached data supports:

    + *
      + *
    • Real-time access to patient prevention history across facilities
    • + *
    • Clinical decision support for preventive care recommendations
    • + *
    • Regulatory compliance reporting for immunization registries
    • + *
    • Quality measure calculations for preventive care metrics
    • + *
    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * + * @since 2026-01-24 + */ @Entity public class CachedDemographicPrevention extends AbstractModel implements PersistenceCapable { @@ -55,7 +92,21 @@ public class CachedDemographicPrevention extends AbstractModelInitializes all fields to their default states:

    + *
      + *
    • Object references are set to null
    • + *
    • Boolean flags (refused, never) are set to false
    • + *
    • Dates are set to null and must be provided before persistence
    • + *
    + * + *

    This no-argument constructor is required by JPA for entity instantiation + * and should not be used directly in application code. Use the setter methods + * to populate required fields before persisting the entity.

    + */ public CachedDemographicPrevention() { this.facilityPreventionPk = null; this.caisiDemographicId = null; @@ -68,83 +119,263 @@ public CachedDemographicPrevention() { this.attributes = null; } + /** + * Retrieves the composite primary key for this cached prevention record. + * + *

    This method overrides the getId method from AbstractModel to provide + * the facility-specific prevention identifier.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key containing + * the facility ID and prevention record ID + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityPreventionPk(this); } - + + /** + * Retrieves the composite primary key for this prevention record. + * + *

    The composite key uniquely identifies a prevention record within a specific + * facility in the federated CAISI integrator environment.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key, or null if not yet set + */ public FacilityIdIntegerCompositePk getFacilityPreventionPk() { return pcGetfacilityPreventionPk(this); } - + + /** + * Sets the composite primary key for this prevention record. + * + *

    This should only be set once during entity creation and should not be modified + * after the entity has been persisted.

    + * + * @param facilityPreventionPk FacilityIdIntegerCompositePk the composite primary key + * containing the facility ID and prevention record ID + */ public void setFacilityPreventionPk(final FacilityIdIntegerCompositePk facilityPreventionPk) { pcSetfacilityPreventionPk(this, facilityPreventionPk); } - + + /** + * Retrieves the CAISI demographic identifier for the patient. + * + *

    This ID links the prevention record to a specific patient (demographic) within + * the CAISI integrator system. It may differ from the patient's local demographic ID + * at individual facilities.

    + * + * @return Integer the CAISI demographic identifier, or null if not set + */ public Integer getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier for the patient. + * + *

    This field is required and must not be null for a valid prevention record.

    + * + * @param caisiDemographicId Integer the CAISI demographic identifier for the patient + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the date when the prevention or immunization was administered or performed. + * + *

    This is a required field representing when the preventive care activity occurred. + * For immunizations, this is the vaccination date. For screenings, this is the test date.

    + * + * @return Date the prevention administration date, or null if not set + */ public Date getPreventionDate() { return pcGetpreventionDate(this); } - + + /** + * Sets the date when the prevention or immunization was administered. + * + *

    This field is required and must not be null for a valid prevention record.

    + * + * @param preventionDate Date the date the prevention was performed + */ public void setPreventionDate(final Date preventionDate) { pcSetpreventionDate(this, preventionDate); } - + + /** + * Retrieves the CAISI provider identifier for the healthcare provider who administered + * or documented the prevention. + * + *

    This ID identifies the provider within the CAISI integrator system and may differ + * from local provider identifiers at individual facilities.

    + * + * @return String the CAISI provider identifier (maximum 16 characters), or null if not set + */ public String getCaisiProviderId() { return pcGetcaisiProviderId(this); } - + + /** + * Sets the CAISI provider identifier for the healthcare provider. + * + *

    This field is required and must not be null. The value must not exceed 16 characters.

    + * + * @param caisiProviderId String the CAISI provider identifier + */ public void setCaisiProviderId(final String caisiProviderId) { pcSetcaisiProviderId(this, caisiProviderId); } - + + /** + * Retrieves the prevention type code. + * + *

    This code identifies the specific type of prevention or immunization, such as:

    + *
      + *
    • Immunization codes (e.g., "FLU", "MMR", "TDAP")
    • + *
    • Screening codes (e.g., "PAP", "MAMMO", "COLONOSCOPY")
    • + *
    • Other preventive care codes defined in the system
    • + *
    + * + * @return String the prevention type code (maximum 32 characters), or null if not set + */ public String getPreventionType() { return pcGetpreventionType(this); } - + + /** + * Sets the prevention type code. + * + *

    This field is required and must not be null. The value must not exceed 32 characters + * and should match a valid prevention type code in the system.

    + * + * @param preventionType String the prevention type code + */ public void setPreventionType(final String preventionType) { pcSetpreventionType(this, preventionType); } - + + /** + * Retrieves the scheduled date for the next prevention or follow-up. + * + *

    This optional field indicates when the patient should receive the next dose + * of a series (for immunizations) or when the next screening is due.

    + * + * @return Date the next scheduled prevention date, or null if not applicable or not set + */ public Date getNextDate() { return pcGetnextDate(this); } - + + /** + * Sets the scheduled date for the next prevention or follow-up. + * + *

    This field is optional and may be null if no follow-up is scheduled or required.

    + * + * @param nextDate Date the next scheduled prevention date, or null if not applicable + */ public void setNextDate(final Date nextDate) { pcSetnextDate(this, nextDate); } - + + /** + * Retrieves the attributes blob containing additional prevention metadata. + * + *

    This field stores serialized or encoded additional information about the prevention + * that doesn't fit in the standard fields, such as:

    + *
      + *
    • Lot numbers for vaccines
    • + *
    • Manufacturer information
    • + *
    • Site and route of administration
    • + *
    • Additional clinical notes
    • + *
    + * + * @return String the encoded attributes data, or null if no additional attributes + */ public String getAttributes() { return pcGetattributes(this); } - + + /** + * Sets the attributes blob for additional prevention metadata. + * + *

    This field is stored as a MEDIUMBLOB in the database and can contain + * substantial amounts of encoded data.

    + * + * @param attributes String the encoded attributes data, or null if no additional attributes + */ public void setAttributes(final String attributes) { pcSetattributes(this, attributes); } - + + /** + * Checks if the patient refused the recommended prevention. + * + *

    This flag indicates that the prevention was offered to the patient but they + * declined to receive it. This is important for clinical decision support and + * documentation of informed patient choice.

    + * + * @return boolean true if the patient refused the prevention, false otherwise + */ public boolean isRefused() { return pcGetrefused(this); } - + + /** + * Sets whether the patient refused the recommended prevention. + * + *

    When set to true, indicates that the prevention was offered but declined + * by the patient. This affects clinical decision support and quality measure + * calculations.

    + * + * @param refused boolean true if the patient refused, false otherwise + */ public void setRefused(final boolean refused) { pcSetrefused(this, refused); } - + + /** + * Checks if the prevention should never be given to this patient. + * + *

    This flag indicates a clinical contraindication or provider-documented + * reason why this prevention should never be administered to the patient. + * Common reasons include:

    + *
      + *
    • Severe allergic reactions to previous doses
    • + *
    • Medical contraindications
    • + *
    • Patient has completed lifetime series
    • + *
    + * + * @return boolean true if the prevention should never be given, false otherwise + */ public boolean isNever() { return pcGetnever(this); } - + + /** + * Sets whether the prevention should never be given to this patient. + * + *

    When set to true, clinical decision support systems should not recommend + * this prevention for the patient. This flag should only be set by healthcare + * providers with appropriate clinical justification.

    + * + * @param never boolean true if the prevention should never be given, false otherwise + */ public void setNever(final boolean never) { pcSetnever(this, never); } + /** + * Returns the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the PersistenceCapable interface and is used by + * OpenJPA to verify bytecode enhancement compatibility. The version number + * indicates which enhancement features are supported by this entity class.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -178,6 +409,18 @@ protected void pcClearFields() { this.refused = false; } + /** + * Creates a new instance of this entity with the specified StateManager and object ID. + * + *

    This method is called by OpenJPA when creating instances from the database or + * during entity lifecycle operations. It initializes the entity with the provided + * StateManager for persistence tracking.

    + * + * @param pcStateManager StateManager the OpenJPA state manager for this instance + * @param o Object the object ID to copy key fields from + * @param b boolean if true, clears all non-key fields to default values + * @return PersistenceCapable a new entity instance with the specified configuration + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedDemographicPrevention cachedDemographicPrevention = new CachedDemographicPrevention(); if (b) { @@ -187,7 +430,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedDemographicPrevention.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedDemographicPrevention; } - + + /** + * Creates a new instance of this entity with the specified StateManager. + * + *

    This overloaded method is called by OpenJPA when creating new instances + * without a predefined object ID.

    + * + * @param pcStateManager StateManager the OpenJPA state manager for this instance + * @param b boolean if true, clears all fields to default values + * @return PersistenceCapable a new entity instance with the specified configuration + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedDemographicPrevention cachedDemographicPrevention = new CachedDemographicPrevention(); if (b) { @@ -201,6 +454,15 @@ protected static int pcGetManagedFieldCount() { return 9; } + /** + * Replaces a single field value from the OpenJPA StateManager. + * + *

    This method is called by OpenJPA during entity refresh operations to update + * field values from the database. The field to replace is identified by its index.

    + * + * @param n int the field index to replace (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedDemographicPrevention.pcInheritedFieldCount; if (n2 < 0) { @@ -249,12 +511,29 @@ public void pcReplaceField(final int n) { } } + /** + * Replaces multiple field values from the OpenJPA StateManager. + * + *

    This method is an optimized version of pcReplaceField that updates multiple + * fields in a single call during entity refresh operations.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the OpenJPA StateManager. + * + *

    This method is called by OpenJPA during entity flush operations to read + * field values for persistence to the database.

    + * + * @param n int the field index to provide (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedDemographicPrevention.pcInheritedFieldCount; if (n2 < 0) { @@ -303,6 +582,14 @@ public void pcProvideField(final int n) { } } + /** + * Provides multiple field values to the OpenJPA StateManager. + * + *

    This method is an optimized version of pcProvideField that reads multiple + * fields in a single call during entity flush operations.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -357,6 +644,17 @@ protected void pcCopyField(final CachedDemographicPrevention cachedDemographicPr } } + /** + * Copies multiple field values from another entity instance. + * + *

    This method is used by OpenJPA during entity merge and refresh operations + * to copy field values between instances managed by the same StateManager.

    + * + * @param o Object the source entity to copy fields from (must be CachedDemographicPrevention) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source entity has a different StateManager + * @throws IllegalStateException if this entity has no StateManager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedDemographicPrevention cachedDemographicPrevention = (CachedDemographicPrevention)o; if (cachedDemographicPrevention.pcStateManager != this.pcStateManager) { @@ -369,7 +667,15 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedDemographicPrevention, array[i]); } } - + + /** + * Retrieves the generic context object from the OpenJPA StateManager. + * + *

    The generic context provides access to the persistence context and + * EntityManager for advanced operations.

    + * + * @return Object the generic context, or null if no StateManager is attached + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; @@ -377,17 +683,41 @@ public Object pcGetGenericContext() { return this.pcStateManager.getGenericContext(); } + /** + * Retrieves the object ID for this entity. + * + *

    The object ID uniquely identifies this entity instance within the + * persistence context and database.

    + * + * @return Object the object ID, or null if no StateManager is attached + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been deleted. + * + *

    An entity is considered deleted if it has been marked for removal + * in the current transaction but not yet flushed to the database.

    + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since being loaded. + * + *

    This method triggers a dirty check through the StateManager to determine + * if any fields have been changed and need to be persisted.

    + * + * @return boolean true if the entity has unsaved changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -396,41 +726,107 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + *

    An entity is considered new if it has been instantiated but not yet + * flushed to the database.

    + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is managed by a persistence context. + * + *

    A persistent entity is one that has a database representation and is + * being tracked by the EntityManager.

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is participating in a transaction. + * + *

    A transactional entity is one that will be included in the current + * transaction's flush and commit operations.

    + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + *

    This method is used internally during serialization to ensure proper + * handling of transient fields and detached state.

    + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty, requiring persistence on next flush. + * + *

    This method is typically called by field setters to notify the StateManager + * that a field has been modified and needs to be updated in the database.

    + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA StateManager managing this entity. + * + *

    The StateManager tracks the entity's lifecycle, manages field access, + * and coordinates persistence operations.

    + * + * @return StateManager the state manager, or null if the entity is not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version identifier for optimistic locking. + * + *

    The version is used to detect concurrent modifications and prevent + * lost updates in multi-user environments.

    + * + * @return Object the version identifier, or null if no StateManager is attached + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces or sets the StateManager for this entity. + * + *

    This method is called by OpenJPA during entity attachment, detachment, + * and state transitions. If a StateManager is already attached, it delegates + * to that manager to handle the replacement.

    + * + * @param pcStateManager StateManager the new state manager to attach + * @throws SecurityException if the StateManager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -439,26 +835,82 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key fields to an object ID using a FieldSupplier. + * + *

    This method is not supported for this entity type and will always throw + * an InternalException. Key field copying is handled through the alternate + * method signatures.

    + * + * @param fieldSupplier FieldSupplier the field supplier (not used) + * @param o Object the object ID (not used) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + *

    This method is not supported for this entity type and will always throw + * an InternalException. This entity uses embedded composite keys which are + * handled differently by OpenJPA.

    + * + * @param o Object the object ID (not used) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a FieldConsumer. + * + *

    This method extracts the composite primary key from the provided ObjectId + * and stores it into the entity using the FieldConsumer interface.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key field + * @param o Object the ObjectId containing the composite key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(3 + CachedDemographicPrevention.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from an object ID directly to this entity. + * + *

    This method extracts the composite primary key from the provided ObjectId + * and sets it as this entity's facilityPreventionPk field.

    + * + * @param o Object the ObjectId containing the composite key (FacilityIdIntegerCompositePk) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityPreventionPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This method is not supported for this entity type because the composite key + * type does not have a string constructor. Use the no-argument variant instead.

    + * + * @param o Object the string representation of the ID (not used) + * @return Object never returns + * @throws IllegalArgumentException always thrown as this operation is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedDemographicPrevention\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance from this entity's current key fields. + * + *

    This method constructs an OpenJPA ObjectId containing the current + * facilityPreventionPk composite key value.

    + * + * @return Object a new ObjectId for this entity + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedDemographicPrevention.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicPrevention != null) ? CachedDemographicPrevention.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicPrevention : (CachedDemographicPrevention.class$Lca$openosp$openo$caisi_integrator$dao$CachedDemographicPrevention = class$("ca.openosp.openo.caisi_integrator.dao.CachedDemographicPrevention")), (Object)this.facilityPreventionPk); } @@ -607,6 +1059,22 @@ private static final void pcSetrefused(final CachedDemographicPrevention cachedD cachedDemographicPrevention.pcStateManager.settingBooleanField((PersistenceCapable)cachedDemographicPrevention, CachedDemographicPrevention.pcInheritedFieldCount + 8, cachedDemographicPrevention.refused, refused, 0); } + /** + * Checks if this entity is in a detached state. + * + *

    A detached entity is one that was previously managed by a persistence context + * but is no longer associated with an active EntityManager. Detached entities can + * be modified and later reattached (merged) into a new persistence context.

    + * + *

    This method returns a Boolean object (not primitive) to allow for three states:

    + *
      + *
    • TRUE - entity is definitively detached
    • + *
    • FALSE - entity is definitively not detached (attached or transient)
    • + *
    • null - detachment state cannot be determined
    • + *
    + * + * @return Boolean TRUE if detached, FALSE if attached/transient, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -632,10 +1100,27 @@ private boolean pcisDetachedStateDefinitive() { return false; } + /** + * Retrieves the detached state object for this entity. + * + *

    The detached state contains metadata about the entity when it was detached + * from its persistence context. This is used by OpenJPA to manage entity merging + * and version checking.

    + * + * @return Object the detached state, or null if the entity has never been detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + *

    This method is called by OpenJPA during detachment and serialization operations + * to store metadata needed for later reattachment.

    + * + * @param pcDetachedState Object the detached state to store + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDxresearch.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDxresearch.java index 4ee20e95cef..fb09b5cb8ff 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDxresearch.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedDxresearch.java @@ -20,6 +20,33 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Cached diagnosis research entity for the CAISI Integrator system. + * + * This JPA entity represents a cached diagnosis research record that is synchronized across + * multiple facilities in the CAISI (Community and Institutional System Integration) network. + * It stores diagnostic codes and research data for patient demographics, supporting cross-facility + * data sharing and integration in the OpenO EMR system. + * + * The class is enhanced by Apache OpenJPA bytecode enhancement for persistence management, + * implementing the PersistenceCapable interface to support JPA lifecycle operations, state + * management, and field-level tracking. The enhancement adds runtime persistence capabilities + * including dirty checking, lazy loading, and detached state management. + * + * Key features: + *
      + *
    • Cross-facility diagnosis research synchronization
    • + *
    • Support for multiple coding systems (ICD-9, ICD-10, SNOMED, etc.)
    • + *
    • Temporal tracking with start and update dates
    • + *
    • Status-based filtering for active/inactive records
    • + *
    • Composite primary key with facility identification
    • + *
    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedDxresearch extends AbstractModel implements Comparable, PersistenceCapable { @@ -51,7 +78,13 @@ public class CachedDxresearch extends AbstractModelKey Features:

    + *
      + *
    • Multi-facility support through composite primary key with facility identifier
    • + *
    • Patient association via CAISI demographic identifier
    • + *
    • Form metadata storage including name, provider, subject, and timestamps
    • + *
    • Large object (LOB) storage for complete form data content
    • + *
    • Active/inactive status tracking for form lifecycle management
    • + *
    • OpenJPA persistence capability for managed entity operations
    • + *
    + * + *

    Database Schema:

    + * The entity maps to a database table with indexed demographic lookups for efficient patient + * form queries. The composite primary key ensures unique forms per facility while supporting + * distributed healthcare data architecture. + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedEformData extends AbstractModel implements Comparable, PersistenceCapable { @@ -59,7 +95,15 @@ public class CachedEformData extends AbstractModel static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$CachedEformData; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor that initializes a new CachedEformData instance. + * + * All fields are initialized to null, allowing the persistence framework to manage + * field values through JPA lifecycle operations. This constructor is required by + * JPA specification and is used by the OpenJPA enhancement framework for entity + * instantiation during database query results and persistence operations. + */ public CachedEformData() { this.formId = null; this.caisiDemographicId = null; @@ -71,97 +115,306 @@ public CachedEformData() { this.formTime = null; this.formData = null; } - + + /** + * Retrieves the composite primary key containing facility and eForm identifiers. + * + * The composite key uniquely identifies this cached eForm data across multiple + * facilities in the CAISI integrator network. This key combines the facility ID + * with the CAISI item ID to support distributed healthcare data architecture. + * + * @return FacilityIdIntegerCompositePk the composite primary key for this entity + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityEformDataPk(this); } - + + /** + * Sets the composite primary key containing facility and eForm identifiers. + * + * This method assigns the unique identifier for this cached eForm data across + * the CAISI integrator network. Should be set during entity creation to establish + * the facility-specific eForm reference. + * + * @param facilityEformDataPk FacilityIdIntegerCompositePk the composite primary key to set + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityEformDataPk) { pcSetfacilityEformDataPk(this, facilityEformDataPk); } - + + /** + * Retrieves the identifier of the electronic form template. + * + * The form ID references the eForm template definition in the source OpenO EMR + * installation. This identifier links the cached data to the specific form + * structure and field definitions. + * + * @return Integer the unique identifier of the eForm template + */ public Integer getFormId() { return pcGetformId(this); } - + + /** + * Sets the identifier of the electronic form template. + * + * This method assigns the eForm template reference for this cached data instance. + * The form ID must correspond to a valid eForm definition in the OpenO EMR system. + * + * @param formId Integer the unique identifier of the eForm template + */ public void setFormId(final Integer formId) { pcSetformId(this, formId); } - + + /** + * Retrieves the CAISI demographic identifier for the patient associated with this eForm. + * + * This identifier links the cached eForm data to a specific patient record within + * the CAISI integrator framework. The demographic ID is indexed for efficient + * patient-based form queries across the integrated healthcare network. + * + * @return Integer the CAISI demographic identifier of the patient + */ public Integer getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier for the patient associated with this eForm. + * + * This method assigns the patient reference for the cached eForm data. The demographic + * ID must correspond to a valid patient record in the CAISI integrator system. + * + * @param caisiDemographicId Integer the CAISI demographic identifier of the patient + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the active status of this cached eForm data. + * + * The status indicates whether this eForm data is currently active and should be + * displayed in the integrator interface. Inactive forms may represent archived, + * deleted, or superseded form submissions. + * + * @return Boolean true if the eForm data is active, false if inactive, null if not set + */ public Boolean getStatus() { return pcGetstatus(this); } - + + /** + * Sets the active status of this cached eForm data. + * + * This method controls the visibility and lifecycle state of the eForm data in + * the integrator system. Setting to false effectively archives or soft-deletes + * the form without removing the data from the database. + * + * @param status Boolean true to mark active, false to mark inactive + */ public void setStatus(final Boolean status) { pcSetstatus(this, status); } - + + /** + * Retrieves the name of the electronic form. + * + * The form name provides a human-readable identifier for the eForm type or template. + * This value is typically displayed in user interfaces to help healthcare providers + * identify the form purpose (e.g., "Patient Intake Form", "Consultation Note"). + * + * @return String the name of the eForm, maximum 255 characters, trimmed to null if empty + */ public String getFormName() { return pcGetformName(this); } - + + /** + * Sets the name of the electronic form. + * + * This method assigns a descriptive name to the eForm for display and identification + * purposes. The value is automatically trimmed of leading and trailing whitespace, + * with empty strings converted to null. + * + * @param formName String the name of the eForm, maximum 255 characters + */ public void setFormName(final String formName) { pcSetformName(this, StringUtils.trimToNull(formName)); } - + + /** + * Retrieves the healthcare provider identifier associated with this eForm. + * + * The form provider represents the healthcare professional who created, submitted, + * or is responsible for this eForm submission. This may be a provider ID, name, + * or other identifier from the source EMR system. + * + * @return String the provider identifier, maximum 255 characters, trimmed to null if empty + */ public String getFormProvider() { return pcGetformProvider(this); } - + + /** + * Sets the healthcare provider identifier associated with this eForm. + * + * This method assigns the provider reference for audit trail and responsibility + * tracking purposes. The value is automatically trimmed with empty strings converted to null. + * + * @param formProvider String the provider identifier, maximum 255 characters + */ public void setFormProvider(final String formProvider) { pcSetformProvider(this, StringUtils.trimToNull(formProvider)); } - + + /** + * Retrieves the subject line or title of this eForm submission. + * + * The subject provides additional context or description for this specific form + * instance, similar to an email subject line. This helps differentiate multiple + * submissions of the same form type. + * + * @return String the subject text, maximum 255 characters, trimmed to null if empty + */ public String getSubject() { return pcGetsubject(this); } - + + /** + * Sets the subject line or title of this eForm submission. + * + * This method assigns a descriptive subject to this form instance for identification + * and context. The value is automatically trimmed with empty strings converted to null. + * + * @param subject String the subject text, maximum 255 characters + */ public void setSubject(final String subject) { pcSetsubject(this, StringUtils.trimToNull(subject)); } - + + /** + * Retrieves the date when this eForm was submitted or last modified. + * + * This temporal field stores only the date portion (year, month, day) without time + * information. It is used for chronological organization and date-based queries + * of eForm submissions. + * + * @return Date the form date (without time component) + */ public Date getFormDate() { return pcGetformDate(this); } - + + /** + * Sets the date when this eForm was submitted or last modified. + * + * This method assigns the date component for temporal tracking of the eForm. + * Only the date portion is stored; time information should be stored separately + * in the formTime field. + * + * @param formDate Date the form date (without time component) + */ public void setFormDate(final Date formDate) { pcSetformDate(this, formDate); } - + + /** + * Retrieves the time when this eForm was submitted or last modified. + * + * This temporal field stores only the time portion (hour, minute, second) without + * date information. Combined with formDate, it provides complete timestamp information + * for the eForm submission. + * + * @return Date the form time (without date component) + */ public Date getFormTime() { return pcGetformTime(this); } - + + /** + * Sets the time when this eForm was submitted or last modified. + * + * This method assigns the time component for temporal tracking of the eForm. + * Only the time portion is stored; date information should be stored separately + * in the formDate field. + * + * @param formTime Date the form time (without date component) + */ public void setFormTime(final Date formTime) { pcSetformTime(this, formTime); } - + + /** + * Retrieves the complete eForm data content. + * + * This large object (LOB) field contains the full form submission data, typically + * stored as XML, JSON, or serialized format. The content includes all field values, + * checkboxes, text areas, and other form elements captured during submission. + * + *

    Security Note: This field may contain Protected Health Information (PHI). + * Ensure proper access controls and audit logging when retrieving this data.

    + * + * @return String the complete eForm data content, trimmed to null if empty + */ public String getFormData() { return pcGetformData(this); } - + + /** + * Sets the complete eForm data content. + * + * This method assigns the full form submission data. The value is automatically + * trimmed with empty strings converted to null. Large content is supported through + * the LOB (Large Object) database column type. + * + *

    Security Note: This field typically contains Protected Health Information (PHI). + * Ensure data is properly sanitized and validated before storage.

    + * + * @param formData String the complete eForm data content + */ public void setFormData(final String formData) { pcSetformData(this, StringUtils.trimToNull(formData)); } - + + /** + * Compares this CachedEformData instance with another for ordering. + * + * Comparison is based on the CAISI item ID component of the composite primary key. + * This provides a natural ordering for eForm data based on their creation sequence + * within the integrator system. + * + * @param o CachedEformData the object to compare against + * @return int negative if this comes before o, zero if equal, positive if this comes after o + */ @Override public int compareTo(final CachedEformData o) { return pcGetfacilityEformDataPk(this).getCaisiItemId() - pcGetfacilityEformDataPk(o).getCaisiItemId(); } - + + /** + * Retrieves the unique identifier for this entity. + * + * This method provides access to the composite primary key as required by the + * AbstractModel parent class. It returns the same value as getFacilityIdIntegerCompositePk(). + * + * @return FacilityIdIntegerCompositePk the composite primary key uniquely identifying this entity + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityEformDataPk(this); } - + + /** + * Returns the OpenJPA enhancement contract version for this entity class. + * + * This method is part of the OpenJPA persistence capability contract. The version + * number indicates the level of bytecode enhancement applied to this class by the + * OpenJPA enhancement tool. Version 2 represents the current OpenJPA enhancement level. + * + * @return int the enhancement contract version (always 2 for current OpenJPA) + */ public int pcGetEnhancementContractVersion() { return 2; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedEformValue.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedEformValue.java index 828807caaed..ace8df7c363 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedEformValue.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedEformValue.java @@ -17,6 +17,32 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Represents a cached electronic form (eForm) field value in the CAISI integrator system. + * + *

    This entity caches individual form field values from electronic forms to support efficient + * cross-facility data sharing in the CAISI (Collaborative Application for Integrated Health Services Information) + * integrator. Each instance stores a single variable name-value pair from a specific form, along with references + * to the form, demographic, and facility context.

    + * + *

    The entity uses JPA/OpenJPA persistence with byte-code enhancement for field-level tracking and lazy loading. + * Form field values are stored as text and automatically trimmed during persistence. The entity supports comparison + * based on the CAISI item identifier for ordered collections.

    + * + *

    Key Features:

    + *
      + *
    • Composite primary key combining facility ID and item ID for multi-facility support
    • + *
    • Indexes on demographic ID for efficient patient-specific queries
    • + *
    • Automatic string trimming for variable names (to empty) and values (to null)
    • + *
    • OpenJPA bytecode enhancement for persistence state management
    • + *
    • Serialization support for distributed caching
    • + *
    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedEformValue extends AbstractModel implements Comparable, PersistenceCapable { @@ -43,7 +69,13 @@ public class CachedEformValue extends AbstractModelThis default constructor is required for JPA entity instantiation and creates + * an unpopulated instance ready for field assignment or ORM hydration.

    + */ public CachedEformValue() { this.formDataId = null; this.formId = null; @@ -51,65 +83,169 @@ public CachedEformValue() { this.varName = null; this.varValue = null; } - + + /** + * Retrieves the composite primary key containing facility and item identifiers. + * + * @return FacilityIdIntegerCompositePk the composite key identifying this cached form value + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityEformValuesPk(this); } - + + /** + * Sets the composite primary key containing facility and item identifiers. + * + * @param facilityEformValuesPk FacilityIdIntegerCompositePk the composite key to assign + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityEformValuesPk) { pcSetfacilityEformValuesPk(this, facilityEformValuesPk); } - + + /** + * Retrieves the form data identifier for the parent eForm submission. + * + * @return Integer the unique identifier of the form data record + */ public Integer getFormDataId() { return pcGetformDataId(this); } - + + /** + * Sets the form data identifier for the parent eForm submission. + * + * @param formDataId Integer the unique identifier of the form data record + */ public void setFormDataId(final Integer formDataId) { pcSetformDataId(this, formDataId); } - + + /** + * Retrieves the form template identifier. + * + * @return Integer the unique identifier of the eForm template + */ public Integer getFormId() { return pcGetformId(this); } - + + /** + * Sets the form template identifier. + * + * @param formId Integer the unique identifier of the eForm template + */ public void setFormId(final Integer formId) { pcSetformId(this, formId); } - + + /** + * Retrieves the CAISI demographic identifier for the patient associated with this form value. + * + *

    This indexed field enables efficient retrieval of all cached form values for a specific patient + * across multiple facilities in the CAISI integrator network.

    + * + * @return Integer the unique CAISI demographic identifier for the patient + */ public Integer getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier for the patient associated with this form value. + * + * @param caisiDemographicId Integer the unique CAISI demographic identifier for the patient + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the form field variable name. + * + *

    Variable names identify specific fields within an eForm template, such as "patient_weight", + * "blood_pressure_systolic", or "appointment_date". These names correspond to the field identifiers + * defined in the eForm template.

    + * + * @return String the field variable name (maximum 30 characters) + */ public String getVarName() { return pcGetvarName(this); } - + + /** + * Sets the form field variable name. + * + *

    The provided variable name is automatically trimmed to an empty string if null or whitespace-only. + * This ensures consistent handling of field names across the system.

    + * + * @param varName String the field variable name (maximum 30 characters, will be trimmed to empty if null) + */ public void setVarName(final String varName) { pcSetvarName(this, StringUtils.trimToEmpty(varName)); } - + + /** + * Retrieves the form field value. + * + *

    Form field values are stored as text and may contain patient-entered data, provider selections, + * calculated results, or other form content. The value is stored in a TEXT column to accommodate + * large content such as clinical notes or detailed responses.

    + * + * @return String the field value, or null if the field has no value + */ public String getVarValue() { return pcGetvarValue(this); } - + + /** + * Sets the form field value. + * + *

    The provided value is automatically trimmed to null if it contains only whitespace. + * This ensures that empty or whitespace-only values are stored consistently as null + * rather than as empty strings.

    + * + * @param varValue String the field value to store, or null (will be trimmed to null if whitespace-only) + */ public void setVarValue(final String varValue) { pcSetvarValue(this, StringUtils.trimToNull(varValue)); } - + + /** + * Compares this cached form value to another based on CAISI item identifiers. + * + *

    The comparison is performed by subtracting the other object's CAISI item ID from this object's + * CAISI item ID, providing a natural ordering for collections of cached form values.

    + * + * @param o CachedEformValue the cached form value to compare against + * @return int negative if this item ID is less, zero if equal, positive if greater + */ @Override public int compareTo(final CachedEformValue o) { return pcGetfacilityEformValuesPk(this).getCaisiItemId() - pcGetfacilityEformValuesPk(o).getCaisiItemId(); } - + + /** + * Retrieves the entity identifier (composite primary key). + * + *

    This method satisfies the AbstractModel contract by returning the composite key + * that uniquely identifies this cached form value across all facilities.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityEformValuesPk(this); } - + + /** + * Retrieves the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and indicates + * the version of bytecode enhancement applied to this class. The contract version + * ensures compatibility between the enhanced class and the OpenJPA runtime.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -139,7 +275,19 @@ protected void pcClearFields() { this.varName = null; this.varValue = null; } - + + /** + * Creates a new persistence-capable instance with the provided state manager and object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used by the ORM + * framework to create new instances during query result hydration and relationship loading. + * The boolean parameter controls whether fields should be cleared after instantiation.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to assign to the new instance + * @param o Object the object ID from which to copy key fields + * @param b boolean true to clear fields after copying key fields, false to leave them unchanged + * @return PersistenceCapable the newly created instance with assigned state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedEformValue cachedEformValue = new CachedEformValue(); if (b) { @@ -149,7 +297,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedEformValue.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedEformValue; } - + + /** + * Creates a new persistence-capable instance with the provided state manager. + * + *

    This overload of pcNewInstance creates a new instance without copying key fields from + * an object ID. It is used when creating new transient instances that will later be populated + * with data from other sources.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to assign to the new instance + * @param b boolean true to clear fields after instantiation, false to leave them unchanged + * @return PersistenceCapable the newly created instance with assigned state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedEformValue cachedEformValue = new CachedEformValue(); if (b) { @@ -282,7 +441,19 @@ protected void pcCopyField(final CachedEformValue cachedEformValue, final int n) } } } - + + /** + * Copies specified field values from another instance to this instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used during + * entity state synchronization. It validates that both instances share the same state manager + * before performing the copy operation.

    + * + * @param o Object the source CachedEformValue instance to copy field values from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedEformValue cachedEformValue = (CachedEformValue)o; if (cachedEformValue.pcStateManager != this.pcStateManager) { @@ -295,25 +466,54 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedEformValue, array[i]); } } - + + /** + * Retrieves the generic context object from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and provides access + * to framework-specific context information associated with this entity instance.

    + * + * @return Object the generic context from the state manager, or null if no state manager is assigned + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object identifier for this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and retrieves + * the object ID that uniquely identifies this entity within the persistence context.

    + * + * @return Object the object ID from the state manager, or null if no state manager is assigned + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity instance is marked as deleted in the current transaction. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity instance has been modified in the current transaction. + * + *

    This method triggers a dirty check via the RedefinitionHelper before querying + * the state manager to ensure accurate dirty state tracking.

    + * + * @return boolean true if the entity has pending changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -322,41 +522,85 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity instance is newly created and not yet persisted. + * + * @return boolean true if the entity is new (transient), false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity instance is persistent (managed by a persistence context). + * + * @return boolean true if the entity is persistent, false if transient + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity instance is enrolled in an active transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity instance is currently being serialized. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks the specified field as dirty to trigger update tracking. + * + * @param s String the field name to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager associated with this entity instance. + * + * @return StateManager the state manager, or null if the entity is not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version object for this entity instance, used for optimistic locking. + * + * @return Object the version object from the state manager, or null if no state manager is assigned + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method delegates to the existing state manager to handle the replacement, + * or directly assigns the new state manager if none is currently assigned.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if a security violation occurs during replacement + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -364,27 +608,78 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This operation is not supported for this entity type.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values to an object ID. + * + *

    This operation is not supported for this entity type.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    This method extracts the composite key from the provided object ID and stores it + * in the field consumer at the appropriate field index.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key field values + * @param o Object the source object ID containing the key + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(1 + CachedEformValue.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key field values from an object ID into this entity instance. + * + *

    This method extracts the composite primary key from the provided object ID + * and assigns it to this entity's facilityEformValuesPk field.

    + * + * @param o Object the source object ID containing the composite key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityEformValuesPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This operation is not supported for ObjectId-based identity.

    + * + * @param o Object the string representation of the object ID + * @return Object not applicable as method throws exception + * @throws IllegalArgumentException always thrown as string-based object ID construction is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedEformValue\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity using its current key field values. + * + *

    This method constructs an OpenJPA ObjectId containing the composite primary key + * from this entity's facilityEformValuesPk field.

    + * + * @return Object the newly created object ID containing this entity's composite key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedEformValue.class$Lca$openosp$openo$caisi_integrator$dao$CachedEformValue != null) ? CachedEformValue.class$Lca$openosp$openo$caisi_integrator$dao$CachedEformValue : (CachedEformValue.class$Lca$openosp$openo$caisi_integrator$dao$CachedEformValue = class$("ca.openosp.openo.caisi_integrator.dao.CachedEformValue")), (Object)this.facilityEformValuesPk); } @@ -484,7 +779,17 @@ private static final void pcSetvarValue(final CachedEformValue cachedEformValue, } cachedEformValue.pcStateManager.settingStringField((PersistenceCapable)cachedEformValue, CachedEformValue.pcInheritedFieldCount + 5, cachedEformValue.varValue, varValue, 0); } - + + /** + * Checks if this entity instance is in a detached state. + * + *

    A detached entity has been removed from its persistence context but retains + * its identity and state. This method returns a Boolean object rather than a primitive + * to support tri-state logic: true (definitely detached), false (definitely not detached), + * or null (detachment state is unknown).

    + * + * @return Boolean true if detached, false if attached, null if state cannot be determined + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -509,11 +814,28 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity instance. + * + *

    The detached state contains information about the entity's persistence state + * when it was detached from its persistence context, enabling reattachment and + * change detection.

    + * + * @return Object the detached state object, or null if the entity is not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity instance. + * + *

    This method is called by the OpenJPA framework during detachment to store + * the entity's persistence state information for later reattachment.

    + * + * @param pcDetachedState Object the detached state to assign + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedFacility.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedFacility.java index a3994d9d3ff..9ee1b99e0b0 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedFacility.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedFacility.java @@ -19,6 +19,23 @@ import javax.persistence.Id; import javax.persistence.Entity; +/** + * Represents a cached healthcare facility entity for the CAISI (Client Access to Integrated Services and Information) integrator system. + * + * This entity stores information about external healthcare facilities that participate in integrated referral and data sharing + * networks within the OpenO EMR system. The cache allows for efficient lookup and access to facility information without + * requiring repeated external system queries. It supports Health Information Custodian (HIC) designation, integrated referrals, + * and SIMS (System for Integrated Management of Services) connectivity for inter-facility healthcare coordination. + * + * The class implements JPA PersistenceCapable interface to enable OpenJPA byte-code enhancement for transparent persistence, + * automatic dirty tracking, and lazy loading capabilities. This implementation includes comprehensive state management methods + * required by the OpenJPA framework for entity lifecycle management. + * + * @see AbstractModel + * @see PersistenceCapable + * @see StateManager + * @since 2026-01-24 + */ @Entity public class CachedFacility extends AbstractModel implements PersistenceCapable { @@ -54,7 +71,14 @@ public class CachedFacility extends AbstractModel implements Persistenc static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Constructs a new CachedFacility instance with default values. + * + * Initializes all fields to their default values: null for reference types, false for boolean flags + * except for enableIntegratedReferrals and allowSims which default to true to enable inter-facility + * collaboration by default. + */ public CachedFacility() { this.integratorFacilityId = null; this.name = null; @@ -67,92 +91,227 @@ public CachedFacility() { this.allowSims = true; this.lastDataUpdate = null; } - + + /** + * Retrieves the unique integrator facility identifier. + * + * @return Integer the unique identifier for this facility in the integrator system + */ public Integer getIntegratorFacilityId() { return pcGetintegratorFacilityId(this); } - + + /** + * Sets the unique integrator facility identifier. + * + * @param integratorFacilityId Integer the unique identifier to assign to this facility + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { pcSetintegratorFacilityId(this, integratorFacilityId); } - + + /** + * Retrieves the facility name. + * + * @return String the name of the healthcare facility + */ public String getName() { return pcGetname(this); } - + + /** + * Sets the facility name. + * + * Input is automatically trimmed to null if blank to ensure data consistency. + * + * @param name String the name to assign to the healthcare facility + */ public void setName(final String name) { pcSetname(this, StringUtils.trimToNull(name)); } - + + /** + * Retrieves the facility description. + * + * @return String a detailed description of the healthcare facility + */ public String getDescription() { return pcGetdescription(this); } - + + /** + * Sets the facility description. + * + * Input is automatically trimmed to null if blank to ensure data consistency. + * + * @param description String a detailed description to assign to the healthcare facility + */ public void setDescription(final String description) { pcSetdescription(this, StringUtils.trimToNull(description)); } - + + /** + * Retrieves the contact person's name for this facility. + * + * @return String the name of the primary contact person at the healthcare facility + */ public String getContactName() { return pcGetcontactName(this); } - + + /** + * Sets the contact person's name for this facility. + * + * Input is automatically trimmed to null if blank to ensure data consistency. + * + * @param contactName String the name of the primary contact person to assign + */ public void setContactName(final String contactName) { pcSetcontactName(this, StringUtils.trimToNull(contactName)); } - + + /** + * Retrieves the contact email address for this facility. + * + * @return String the email address of the primary contact at the healthcare facility + */ public String getContactEmail() { return pcGetcontactEmail(this); } - + + /** + * Sets the contact email address for this facility. + * + * Input is automatically trimmed to null if blank to ensure data consistency. + * + * @param contactEmail String the email address of the primary contact to assign + */ public void setContactEmail(final String contactEmail) { pcSetcontactEmail(this, StringUtils.trimToNull(contactEmail)); } - + + /** + * Retrieves the contact phone number for this facility. + * + * @return String the phone number of the primary contact at the healthcare facility + */ public String getContactPhone() { return pcGetcontactPhone(this); } - + + /** + * Sets the contact phone number for this facility. + * + * Input is automatically trimmed to null if blank to ensure data consistency. + * + * @param contactPhone String the phone number of the primary contact to assign + */ public void setContactPhone(final String contactPhone) { pcSetcontactPhone(this, StringUtils.trimToNull(contactPhone)); } - + + /** + * Retrieves the timestamp of the last data update for this facility. + * + * @return Date the timestamp indicating when this facility's cached data was last synchronized + */ public Date getLastDataUpdate() { return pcGetlastDataUpdate(this); } - + + /** + * Sets the timestamp of the last data update for this facility. + * + * @param lastDataUpdate Date the timestamp to record when this facility's cached data was synchronized + */ public void setLastDataUpdate(final Date lastDataUpdate) { pcSetlastDataUpdate(this, lastDataUpdate); } - + + /** + * Checks if this facility is designated as a Health Information Custodian (HIC). + * + * A Health Information Custodian has legal responsibility for maintaining and protecting patient health information + * under Canadian healthcare privacy regulations (PIPEDA/provincial equivalents). + * + * @return boolean true if the facility is a Health Information Custodian, false otherwise + */ public boolean isHic() { return pcGethic(this); } - + + /** + * Sets whether this facility is designated as a Health Information Custodian (HIC). + * + * @param hic boolean true to designate the facility as a Health Information Custodian, false otherwise + */ public void setHic(final boolean hic) { pcSethic(this, hic); } - + + /** + * Checks if integrated referrals are enabled for this facility. + * + * When enabled, this facility can participate in the integrated referral system, allowing electronic + * transmission of patient referrals between healthcare providers and facilities. + * + * @return boolean true if integrated referrals are enabled, false otherwise + */ public boolean isEnableIntegratedReferrals() { return pcGetenableIntegratedReferrals(this); } - + + /** + * Checks if SIMS (System for Integrated Management of Services) connectivity is allowed for this facility. + * + * When enabled, this facility can connect to and share data through the SIMS platform for coordinated + * healthcare service delivery and case management across multiple providers. + * + * @return boolean true if SIMS connectivity is allowed, false otherwise + */ public boolean isAllowSims() { return pcGetallowSims(this); } - + + /** + * Sets whether SIMS (System for Integrated Management of Services) connectivity is allowed for this facility. + * + * @param allowSims boolean true to allow SIMS connectivity, false to disable it + */ public void setAllowSims(final boolean allowSims) { pcSetallowSims(this, allowSims); } - + + /** + * Sets whether integrated referrals are enabled for this facility. + * + * @param enableIntegratedReferrals boolean true to enable integrated referrals, false to disable them + */ public void setEnableIntegratedReferrals(final boolean enableIntegratedReferrals) { pcSetenableIntegratedReferrals(this, enableIntegratedReferrals); } - + + /** + * Retrieves the entity identifier. + * + * This method overrides the AbstractModel getId() method to return the integrator facility ID + * as the primary identifier for this entity. + * + * @return Integer the unique identifier for this facility in the integrator system + */ @Override public Integer getId() { return pcGetintegratorFacilityId(this); } - + + /** + * Retrieves the OpenJPA byte-code enhancement contract version. + * + * This method is part of the PersistenceCapable interface and indicates which version of the + * OpenJPA enhancement contract this class implements. + * + * @return int the enhancement contract version (2 for current OpenJPA implementation) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -186,7 +345,18 @@ protected void pcClearFields() { this.lastDataUpdate = null; this.name = null; } - + + /** + * Creates a new PersistenceCapable instance with the specified StateManager and object ID. + * + * This method is part of the PersistenceCapable interface and is used by OpenJPA to create new instances + * during entity loading and reconstruction from the database. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID from which to copy key fields + * @param b boolean true to clear all fields to default values, false to retain initialized values + * @return PersistenceCapable a new CachedFacility instance configured with the specified state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedFacility cachedFacility = new CachedFacility(); if (b) { @@ -196,7 +366,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedFacility.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedFacility; } - + + /** + * Creates a new PersistenceCapable instance with the specified StateManager. + * + * This method is part of the PersistenceCapable interface and is used by OpenJPA to create new instances + * without an object ID, typically for new transient entities. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean true to clear all fields to default values, false to retain initialized values + * @return PersistenceCapable a new CachedFacility instance configured with the specified state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedFacility cachedFacility = new CachedFacility(); if (b) { @@ -209,7 +389,16 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final protected static int pcGetManagedFieldCount() { return 10; } - + + /** + * Replaces a single field value using the StateManager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA during entity + * state transitions (e.g., loading from database, refresh operations). + * + * @param n int the field index to replace (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcReplaceField(final int n) { final int n2 = n - CachedFacility.pcInheritedFieldCount; if (n2 < 0) { @@ -261,13 +450,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values using the StateManager. + * + * This method is part of the PersistenceCapable interface and efficiently replaces multiple fields + * at once during entity state transitions. + * + * @param array int[] an array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the StateManager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA to read field values + * during flush operations (e.g., when persisting changes to the database). + * + * @param n int the field index to provide (relative to pcInheritedFieldCount) + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcProvideField(final int n) { final int n2 = n - CachedFacility.pcInheritedFieldCount; if (n2 < 0) { @@ -319,7 +525,15 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the StateManager. + * + * This method is part of the PersistenceCapable interface and efficiently provides multiple fields + * at once during flush operations. + * + * @param array int[] an array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -377,7 +591,18 @@ protected void pcCopyField(final CachedFacility cachedFacility, final int n) { } } } - + + /** + * Copies field values from another CachedFacility instance. + * + * This method is part of the PersistenceCapable interface and is used by OpenJPA during merge + * and copy operations to transfer field values between entities. + * + * @param o Object the source CachedFacility object from which to copy field values + * @param array int[] an array of field indices to copy + * @throws IllegalArgumentException if the source object has a different StateManager + * @throws IllegalStateException if this entity has no StateManager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedFacility cachedFacility = (CachedFacility)o; if (cachedFacility.pcStateManager != this.pcStateManager) { @@ -390,25 +615,57 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedFacility, array[i]); } } - + + /** + * Retrieves the generic context from the StateManager. + * + * This method is part of the PersistenceCapable interface and provides access to OpenJPA-specific + * context information associated with this entity. + * + * @return Object the generic context object, or null if no StateManager is assigned + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity. + * + * This method is part of the PersistenceCapable interface and retrieves the unique identifier + * used by OpenJPA to track this entity instance. + * + * @return Object the object ID for this entity, or null if no StateManager is assigned + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been marked as deleted. + * + * This method is part of the PersistenceCapable interface and indicates whether OpenJPA + * has marked this entity for deletion from the database. + * + * @return boolean true if the entity is marked as deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has unsaved changes. + * + * This method is part of the PersistenceCapable interface and indicates whether any fields + * have been modified since the entity was loaded or last persisted. + * + * @return boolean true if the entity has unsaved changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -417,41 +674,106 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + * This method is part of the PersistenceCapable interface and indicates whether this entity + * represents a new object that has not yet been saved to the database. + * + * @return boolean true if the entity is new and unsaved, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by OpenJPA). + * + * This method is part of the PersistenceCapable interface and indicates whether this entity + * is currently managed by the persistence layer and can be saved to the database. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is part of an active transaction. + * + * This method is part of the PersistenceCapable interface and indicates whether this entity + * is currently enrolled in a transaction context. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * This method is part of the PersistenceCapable interface and indicates whether the entity + * is in the process of being serialized for storage or transmission. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty (modified) to trigger persistence. + * + * This method is part of the PersistenceCapable interface and notifies OpenJPA that a specific + * field has been modified and needs to be persisted to the database. + * + * @param s String the name of the field to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the StateManager associated with this entity. + * + * This method is part of the PersistenceCapable interface and provides access to the OpenJPA + * StateManager responsible for tracking the lifecycle and state of this entity. + * + * @return StateManager the state manager for this entity, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for this entity. + * + * This method is part of the PersistenceCapable interface and returns version data used + * for optimistic locking and concurrency control. + * + * @return Object the version information, or null if no StateManager is assigned + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the StateManager for this entity. + * + * This method is part of the PersistenceCapable interface and is used by OpenJPA to change + * the state manager during entity lifecycle transitions. + * + * @param pcStateManager StateManager the new state manager to assign to this entity + * @throws SecurityException if the state manager replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -459,27 +781,80 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a FieldSupplier. + * + * This method is part of the PersistenceCapable interface but is not implemented for this entity + * as it uses a single-field IntId instead of a composite key. + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying field values + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + * This method is part of the PersistenceCapable interface but is not implemented for this entity + * as it uses a single-field IntId instead of a composite key. + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a FieldConsumer. + * + * This method is part of the PersistenceCapable interface and extracts the primary key value + * from the object ID to populate the entity's key field. + * + * @param fieldConsumer FieldConsumer the field consumer to use for storing field values + * @param o Object the source object ID containing the primary key value + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(7 + CachedFacility.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key fields from an object ID directly to this entity. + * + * This method is part of the PersistenceCapable interface and extracts the primary key value + * from the IntId object ID to populate the integratorFacilityId field. + * + * @param o Object the source object ID (must be an IntId instance) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.integratorFacilityId = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a String key value. + * + * This method is part of the PersistenceCapable interface and constructs an IntId object ID + * from a string representation of the primary key. + * + * @param o Object a String containing the primary key value + * @return Object a new IntId instance for this entity class + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((CachedFacility.class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility != null) ? CachedFacility.class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility : (CachedFacility.class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility = class$("ca.openosp.openo.caisi_integrator.dao.CachedFacility")), (String)o); } - + + /** + * Creates a new object ID instance from this entity's current primary key value. + * + * This method is part of the PersistenceCapable interface and constructs an IntId object ID + * using the current integratorFacilityId value. + * + * @return Object a new IntId instance representing this entity's identity + */ public Object pcNewObjectIdInstance() { return new IntId((CachedFacility.class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility != null) ? CachedFacility.class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility : (CachedFacility.class$Lca$openosp$openo$caisi_integrator$dao$CachedFacility = class$("ca.openosp.openo.caisi_integrator.dao.CachedFacility")), this.integratorFacilityId); } @@ -643,7 +1018,15 @@ private static final void pcSetname(final CachedFacility cachedFacility, final S } cachedFacility.pcStateManager.settingStringField((PersistenceCapable)cachedFacility, CachedFacility.pcInheritedFieldCount + 9, cachedFacility.name, name, 0); } - + + /** + * Checks if this entity is in a detached state. + * + * This method is part of the PersistenceCapable interface and determines whether the entity + * is detached from the persistence context (i.e., not currently managed by OpenJPA). + * + * @return Boolean true if detached, false if attached, null if the state cannot be determined + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -668,11 +1051,27 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * + * This method is part of the PersistenceCapable interface and returns the state information + * that OpenJPA uses to track detached entity instances. + * + * @return Object the detached state object, or null if not set + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + * This method is part of the PersistenceCapable interface and stores the state information + * that OpenJPA uses to manage detached entity instances. + * + * @param pcDetachedState Object the detached state object to assign + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurement.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurement.java index 5165cfe92ad..f95e44821a7 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurement.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurement.java @@ -20,6 +20,29 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Cached clinical measurement entity for the CAISI Integrator system. + * + * This entity represents cached clinical measurement data retrieved from remote healthcare facilities + * through the CAISI (Client Access to Integrated Services and Information) Integrator. The integrator + * allows OpenO EMR instances to share patient data across multiple facilities while maintaining local + * control over patient information. + * + * Measurements stored in this cache include vital signs, clinical observations, and other quantitative + * health data points. The cache mechanism improves performance by reducing redundant remote data requests + * while ensuring that healthcare providers have access to comprehensive patient measurement history across + * the integrated healthcare network. + * + * This class is enhanced by OpenJPA for persistence management and includes specialized field accessors + * that integrate with the JPA StateManager for transaction management and dirty checking. The entity uses + * a composite primary key combining facility identifier and measurement item identifier to ensure unique + * identification across the integrated system. + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedMeasurement extends AbstractModel implements Comparable, PersistenceCapable { @@ -54,7 +77,14 @@ public class CachedMeasurement extends AbstractModelThis class represents extended measurement data cached from remote healthcare facilities + * in the CAISI (Client Access to Integrated Services and Information) Integrator system. + * It stores key-value pairs of additional measurement attributes that extend the core + * measurement data, allowing flexible storage of facility-specific or measurement-specific + * metadata.

    + * + *

    The entity uses OpenJPA persistence capabilities for optimized database operations and + * supports multi-facility environments through a composite primary key that combines + * facility identification with measurement extension identifiers.

    + * + *

    Healthcare Context: In integrated healthcare environments, measurements + * (such as vital signs, lab values, or clinical observations) may have facility-specific + * attributes or extended metadata that need to be preserved when cached from remote systems. + * This entity provides a flexible key-value storage mechanism for such extensions.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedMeasurementExt extends AbstractModel implements Comparable, PersistenceCapable { @@ -41,55 +64,143 @@ public class CachedMeasurementExt extends AbstractModelCreates a new CachedMeasurementExt instance with all measurement extension + * fields set to null values. The composite primary key and measurement reference + * must be set separately before persisting the entity.

    + */ public CachedMeasurementExt() { this.measurementId = null; this.keyval = null; this.val = null; } - + + /** + * Gets the composite primary key combining facility and measurement extension identifiers. + * + * @return FacilityIdIntegerCompositePk the composite primary key, or null if not set + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityMeasurementExtPk(this); } - + + /** + * Sets the composite primary key combining facility and measurement extension identifiers. + * + * @param facilityMeasurementExtPk FacilityIdIntegerCompositePk the composite primary key to set + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityMeasurementExtPk) { pcSetfacilityMeasurementExtPk(this, facilityMeasurementExtPk); } - + + /** + * Gets the measurement identifier that this extension belongs to. + * + * @return Integer the measurement ID, or null if not set + */ public Integer getMeasurementId() { return pcGetmeasurementId(this); } - + + /** + * Sets the measurement identifier that this extension belongs to. + * + * @param measurementId Integer the measurement ID to set + */ public void setMeasurementId(final Integer measurementId) { pcSetmeasurementId(this, measurementId); } - + + /** + * Gets the key name of this measurement extension attribute. + * + *

    The key represents the name or identifier of the extended attribute + * (e.g., "unit", "notes", "lab_code"). Maximum length is 20 characters.

    + * + * @return String the attribute key, or null if not set + */ public String getKeyval() { return pcGetkeyval(this); } - + + /** + * Sets the key name of this measurement extension attribute. + * + *

    The input string is trimmed to remove leading and trailing whitespace. + * If null, it is converted to an empty string.

    + * + * @param keyval String the attribute key to set (maximum 20 characters) + */ public void setKeyval(final String keyval) { pcSetkeyval(this, StringUtils.trimToEmpty(keyval)); } - + + /** + * Gets the value of this measurement extension attribute. + * + *

    The value can be any text content associated with the key, such as + * measurement units, notes, codes, or other facility-specific metadata.

    + * + * @return String the attribute value, or null if not set + */ public String getVal() { return pcGetval(this); } - + + /** + * Sets the value of this measurement extension attribute. + * + *

    The input string is trimmed to remove leading and trailing whitespace. + * If null, it is converted to an empty string. Stored as TEXT type in database + * to accommodate large values.

    + * + * @param val String the attribute value to set + */ public void setVal(final String val) { pcSetval(this, StringUtils.trimToEmpty(val)); } - + + /** + * Compares this cached measurement extension to another based on CAISI item ID. + * + *

    The comparison is performed by subtracting the CAISI item IDs from the + * composite primary keys of the two objects. This allows measurement extensions + * to be sorted by their item identifiers.

    + * + * @param o CachedMeasurementExt the measurement extension to compare to + * @return int negative if this object's ID is less than the other, zero if equal, + * positive if greater + */ @Override public int compareTo(final CachedMeasurementExt o) { return pcGetfacilityMeasurementExtPk(this).getCaisiItemId() - pcGetfacilityMeasurementExtPk(o).getCaisiItemId(); } - + + /** + * Gets the primary key identifier for this entity. + * + *

    This method is required by the AbstractModel parent class and returns + * the composite primary key containing both facility and measurement extension + * identifiers.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityMeasurementExtPk(this); } - + + /** + * Gets the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and returns + * the version number of the bytecode enhancement applied to this class.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -111,13 +222,30 @@ public int pcGetEnhancementContractVersion() { } } + /** + * Clears all persistent fields to null values. + * + *

    This protected method is used by OpenJPA to reset the entity's persistent + * fields during various persistence lifecycle operations.

    + */ protected void pcClearFields() { this.facilityMeasurementExtPk = null; this.keyval = null; this.measurementId = null; this.val = null; } - + + /** + * Creates a new instance with a state manager and object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used + * to create new instances during fetch operations from the database.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean if true, clears all fields before initializing + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedMeasurementExt cachedMeasurementExt = new CachedMeasurementExt(); if (b) { @@ -127,7 +255,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedMeasurementExt.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedMeasurementExt; } - + + /** + * Creates a new instance with a state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used + * to create new instances during various persistence operations.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all fields before initializing + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedMeasurementExt cachedMeasurementExt = new CachedMeasurementExt(); if (b) { @@ -136,11 +274,28 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedMeasurementExt.pcStateManager = pcStateManager; return (PersistenceCapable)cachedMeasurementExt; } - + + /** + * Gets the number of managed fields in this entity. + * + *

    This protected method returns the count of persistent fields managed by OpenJPA. + * This entity has 4 managed fields: facilityMeasurementExtPk, keyval, measurementId, and val.

    + * + * @return int the number of managed fields (4) + */ protected static int pcGetManagedFieldCount() { return 4; } - + + /** + * Replaces a single field value from the state manager. + * + *

    This method is part of the OpenJPA field interception mechanism and is used + * to restore field values during persistence operations.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedMeasurementExt.pcInheritedFieldCount; if (n2 < 0) { @@ -168,13 +323,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values from the state manager. + * + *

    This method is part of the OpenJPA field interception mechanism and processes + * an array of field indices, replacing each field's value.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the state manager. + * + *

    This method is part of the OpenJPA field interception mechanism and is used + * to supply field values to the state manager during persistence operations.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedMeasurementExt.pcInheritedFieldCount; if (n2 < 0) { @@ -202,13 +374,31 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This method is part of the OpenJPA field interception mechanism and processes + * an array of field indices, providing each field's value to the state manager.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another instance. + * + *

    This protected method is used by OpenJPA to copy field values between + * instances during various persistence operations.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the source instance to copy from + * @param n int the absolute field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedMeasurementExt cachedMeasurementExt, final int n) { final int n2 = n - CachedMeasurementExt.pcInheritedFieldCount; if (n2 < 0) { @@ -236,7 +426,19 @@ protected void pcCopyField(final CachedMeasurementExt cachedMeasurementExt, fina } } } - + + /** + * Copies multiple field values from another instance. + * + *

    This method is part of the OpenJPA field interception mechanism and processes + * an array of field indices, copying each field's value from the source object. + * Both instances must share the same state manager.

    + * + * @param o Object the source object to copy from (must be a CachedMeasurementExt) + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final CachedMeasurementExt cachedMeasurementExt = (CachedMeasurementExt)o; if (cachedMeasurementExt.pcStateManager != this.pcStateManager) { @@ -249,25 +451,45 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedMeasurementExt, array[i]); } } - + + /** + * Gets the generic context from the state manager. + * + * @return Object the generic context, or null if no state manager is set + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID from the state manager. + * + * @return Object the object ID, or null if no state manager is set + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity is marked for deletion. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified. + * + * @return boolean true if the entity is dirty (has unsaved changes), false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -276,41 +498,82 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by a persistence context). + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is participating in a transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty (modified). + * + * @param s String the name of the field to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Gets the state manager for this entity. + * + * @return StateManager the state manager, or null if not set + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Gets the version identifier for optimistic locking. + * + * @return Object the version identifier, or null if no state manager is set + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager for this entity. + * + * @param pcStateManager StateManager the new state manager to set + * @throws SecurityException if a security violation occurs during replacement + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -318,31 +581,82 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * + *

    This method is not supported for this entity type and will throw an exception.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + *

    This method is not supported for this entity type and will throw an exception.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * + * @param fieldConsumer FieldConsumer the field consumer to store the key field + * @param o Object the source object ID to copy from + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(0 + CachedMeasurementExt.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from an object ID directly to this instance. + * + * @param o Object the source object ID to copy from + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityMeasurementExtPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This method is not supported for this entity type and will throw an exception.

    + * + * @param o Object the string representation to parse + * @return Object never returns normally + * @throws IllegalArgumentException always thrown as this constructor type is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedMeasurementExt\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity. + * + * @return Object the newly created object ID containing this entity's primary key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedMeasurementExt.class$Lca$openosp$openo$caisi_integrator$dao$CachedMeasurementExt != null) ? CachedMeasurementExt.class$Lca$openosp$openo$caisi_integrator$dao$CachedMeasurementExt : (CachedMeasurementExt.class$Lca$openosp$openo$caisi_integrator$dao$CachedMeasurementExt = class$("ca.openosp.openo.caisi_integrator.dao.CachedMeasurementExt")), (Object)this.facilityMeasurementExtPk); } - + + /** + * Retrieves the composite primary key with state manager awareness. + * + *

    This private static method handles field access interception for the primary key field, + * notifying the state manager when the field is accessed.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to get the key from + * @return FacilityIdIntegerCompositePk the composite primary key + */ private static final FacilityIdIntegerCompositePk pcGetfacilityMeasurementExtPk(final CachedMeasurementExt cachedMeasurementExt) { if (cachedMeasurementExt.pcStateManager == null) { return cachedMeasurementExt.facilityMeasurementExtPk; @@ -350,7 +664,16 @@ private static final FacilityIdIntegerCompositePk pcGetfacilityMeasurementExtPk( cachedMeasurementExt.pcStateManager.accessingField(CachedMeasurementExt.pcInheritedFieldCount + 0); return cachedMeasurementExt.facilityMeasurementExtPk; } - + + /** + * Sets the composite primary key with state manager awareness. + * + *

    This private static method handles field modification interception for the primary key field, + * notifying the state manager when the field is modified.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to set the key on + * @param facilityMeasurementExtPk FacilityIdIntegerCompositePk the composite primary key to set + */ private static final void pcSetfacilityMeasurementExtPk(final CachedMeasurementExt cachedMeasurementExt, final FacilityIdIntegerCompositePk facilityMeasurementExtPk) { if (cachedMeasurementExt.pcStateManager == null) { cachedMeasurementExt.facilityMeasurementExtPk = facilityMeasurementExtPk; @@ -358,7 +681,16 @@ private static final void pcSetfacilityMeasurementExtPk(final CachedMeasurementE } cachedMeasurementExt.pcStateManager.settingObjectField((PersistenceCapable)cachedMeasurementExt, CachedMeasurementExt.pcInheritedFieldCount + 0, (Object)cachedMeasurementExt.facilityMeasurementExtPk, (Object)facilityMeasurementExtPk, 0); } - + + /** + * Retrieves the key value with state manager awareness. + * + *

    This private static method handles field access interception for the keyval field, + * notifying the state manager when the field is accessed.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to get the key from + * @return String the key value + */ private static final String pcGetkeyval(final CachedMeasurementExt cachedMeasurementExt) { if (cachedMeasurementExt.pcStateManager == null) { return cachedMeasurementExt.keyval; @@ -366,7 +698,16 @@ private static final String pcGetkeyval(final CachedMeasurementExt cachedMeasure cachedMeasurementExt.pcStateManager.accessingField(CachedMeasurementExt.pcInheritedFieldCount + 1); return cachedMeasurementExt.keyval; } - + + /** + * Sets the key value with state manager awareness. + * + *

    This private static method handles field modification interception for the keyval field, + * notifying the state manager when the field is modified.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to set the key on + * @param keyval String the key value to set + */ private static final void pcSetkeyval(final CachedMeasurementExt cachedMeasurementExt, final String keyval) { if (cachedMeasurementExt.pcStateManager == null) { cachedMeasurementExt.keyval = keyval; @@ -374,7 +715,16 @@ private static final void pcSetkeyval(final CachedMeasurementExt cachedMeasureme } cachedMeasurementExt.pcStateManager.settingStringField((PersistenceCapable)cachedMeasurementExt, CachedMeasurementExt.pcInheritedFieldCount + 1, cachedMeasurementExt.keyval, keyval, 0); } - + + /** + * Retrieves the measurement ID with state manager awareness. + * + *

    This private static method handles field access interception for the measurementId field, + * notifying the state manager when the field is accessed.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to get the measurement ID from + * @return Integer the measurement ID + */ private static final Integer pcGetmeasurementId(final CachedMeasurementExt cachedMeasurementExt) { if (cachedMeasurementExt.pcStateManager == null) { return cachedMeasurementExt.measurementId; @@ -382,7 +732,16 @@ private static final Integer pcGetmeasurementId(final CachedMeasurementExt cache cachedMeasurementExt.pcStateManager.accessingField(CachedMeasurementExt.pcInheritedFieldCount + 2); return cachedMeasurementExt.measurementId; } - + + /** + * Sets the measurement ID with state manager awareness. + * + *

    This private static method handles field modification interception for the measurementId field, + * notifying the state manager when the field is modified.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to set the measurement ID on + * @param measurementId Integer the measurement ID to set + */ private static final void pcSetmeasurementId(final CachedMeasurementExt cachedMeasurementExt, final Integer measurementId) { if (cachedMeasurementExt.pcStateManager == null) { cachedMeasurementExt.measurementId = measurementId; @@ -390,7 +749,16 @@ private static final void pcSetmeasurementId(final CachedMeasurementExt cachedMe } cachedMeasurementExt.pcStateManager.settingObjectField((PersistenceCapable)cachedMeasurementExt, CachedMeasurementExt.pcInheritedFieldCount + 2, (Object)cachedMeasurementExt.measurementId, (Object)measurementId, 0); } - + + /** + * Retrieves the value with state manager awareness. + * + *

    This private static method handles field access interception for the val field, + * notifying the state manager when the field is accessed.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to get the value from + * @return String the value + */ private static final String pcGetval(final CachedMeasurementExt cachedMeasurementExt) { if (cachedMeasurementExt.pcStateManager == null) { return cachedMeasurementExt.val; @@ -398,7 +766,16 @@ private static final String pcGetval(final CachedMeasurementExt cachedMeasuremen cachedMeasurementExt.pcStateManager.accessingField(CachedMeasurementExt.pcInheritedFieldCount + 3); return cachedMeasurementExt.val; } - + + /** + * Sets the value with state manager awareness. + * + *

    This private static method handles field modification interception for the val field, + * notifying the state manager when the field is modified.

    + * + * @param cachedMeasurementExt CachedMeasurementExt the instance to set the value on + * @param val String the value to set + */ private static final void pcSetval(final CachedMeasurementExt cachedMeasurementExt, final String val) { if (cachedMeasurementExt.pcStateManager == null) { cachedMeasurementExt.val = val; @@ -406,7 +783,17 @@ private static final void pcSetval(final CachedMeasurementExt cachedMeasurementE } cachedMeasurementExt.pcStateManager.settingStringField((PersistenceCapable)cachedMeasurementExt, CachedMeasurementExt.pcInheritedFieldCount + 3, cachedMeasurementExt.val, val, 0); } - + + /** + * Checks if this entity is in a detached state. + * + *

    A detached entity is one that was previously managed by a persistence context + * but is no longer associated with it. This method returns a Boolean (not boolean) + * to allow for three states: true (definitely detached), false (definitely not detached), + * or null (cannot determine).

    + * + * @return Boolean true if detached, false if attached, null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -427,19 +814,47 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive. + * + *

    This private method returns false, indicating that the presence or absence + * of detached state alone is not sufficient to definitively determine if the + * entity is detached.

    + * + * @return boolean always returns false + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Gets the detached state object. + * + * @return Object the detached state, or null if not set + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method for writing this object to a stream. + * + *

    This method handles the serialization of the entity, clearing the detached + * state if the entity is currently being serialized by the persistence framework.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -447,7 +862,18 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method for reading this object from a stream. + * + *

    This method handles the deserialization of the entity, setting the detached + * state to DESERIALIZED to indicate that the entity was loaded from serialization + * rather than from the database.

    + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementMap.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementMap.java index 3cff4e0966f..94247ea50b3 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementMap.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementMap.java @@ -17,6 +17,39 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing a cached mapping between facility-specific measurement identifiers and standardized + * healthcare measurement codes within the CAISI (Client Access to Integrated Services and Information) Integrator system. + * + *

    This entity facilitates interoperability between different healthcare facilities by maintaining a persistent + * mapping of laboratory measurement identifiers. Each mapping associates a facility's internal measurement identifier + * with standard LOINC (Logical Observation Identifiers Names and Codes) codes, enabling consistent interpretation + * of laboratory results across different EMR systems and healthcare facilities.

    + * + *

    The class is enhanced by Apache OpenJPA for JPA persistence, implementing the {@link PersistenceCapable} interface + * to enable transparent persistence and state management. All persistence-related methods (prefixed with "pc") are + * generated by OpenJPA bytecode enhancement and should not be called directly by application code.

    + * + *

    Healthcare Context: Laboratory measurements are fundamental to patient care, and different + * facilities often use different coding systems and identifiers. This mapping table enables the CAISI Integrator + * to translate between facility-specific codes and standardized LOINC codes, ensuring that laboratory results + * can be correctly interpreted regardless of their source facility.

    + * + *

    Key Features:

    + *
      + *
    • Composite primary key based on facility ID and CAISI item ID
    • + *
    • Support for LOINC codes (standard healthcare measurement codes)
    • + *
    • Facility-specific identification codes
    • + *
    • Human-readable measurement names
    • + *
    • Laboratory type categorization
    • + *
    • OpenJPA bytecode enhancement for transparent persistence
    • + *
    + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedMeasurementMap extends AbstractModel implements Comparable, PersistenceCapable { @@ -44,6 +77,12 @@ public class CachedMeasurementMap extends AbstractModelThis constructor is required by JPA for entity instantiation and should be used when creating + * new measurement mappings that will have their values set via setter methods.

    + */ public CachedMeasurementMap() { this.loincCode = null; this.identCode = null; @@ -51,56 +90,173 @@ public CachedMeasurementMap() { this.labType = null; } + /** + * Retrieves the composite primary key for this measurement mapping. + * + *

    The composite key uniquely identifies this measurement mapping by combining the integrator facility ID + * and the CAISI item ID. This key enables the system to distinguish between the same measurement type + * across different healthcare facilities.

    + * + * @return FacilityIdIntegerCompositePk the composite primary key containing facility and item identifiers, + * or null if not yet set + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityMeasurementMapPk(this); } - + + /** + * Sets the composite primary key for this measurement mapping. + * + *

    This method should be called when creating a new measurement mapping to establish its unique identity + * within the system. The key must contain valid facility and item identifiers.

    + * + * @param facilityMeasurementMapPk FacilityIdIntegerCompositePk the composite primary key to set, + * must not be null for persistent entities + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityMeasurementMapPk) { pcSetfacilityMeasurementMapPk(this, facilityMeasurementMapPk); } + /** + * Retrieves the LOINC (Logical Observation Identifiers Names and Codes) code for this measurement. + * + *

    LOINC is a universal standard for identifying laboratory and clinical observations. This code enables + * interoperability between different healthcare systems by providing a standardized identifier for the + * measurement type regardless of the source facility.

    + * + * @return String the LOINC code (maximum 20 characters), or null if not assigned + */ public String getLoincCode() { return pcGetloincCode(this); } - + + /** + * Sets the LOINC code for this measurement mapping. + * + *

    The LOINC code should be a valid code from the LOINC coding system. The value will be automatically + * trimmed of leading and trailing whitespace. If null is provided, an empty string will be stored.

    + * + * @param loincCode String the LOINC code to assign (maximum 20 characters), will be trimmed + */ public void setLoincCode(final String loincCode) { pcSetloincCode(this, StringUtils.trimToEmpty(loincCode)); } + /** + * Retrieves the facility-specific identification code for this measurement. + * + *

    Each healthcare facility may use its own internal coding system for laboratory measurements. + * This field stores the facility's local identifier, which can be mapped to the standardized LOINC code + * to enable interoperability.

    + * + * @return String the facility-specific identification code (maximum 20 characters), never null + */ public String getIdentCode() { return pcGetidentCode(this); } - + + /** + * Sets the facility-specific identification code for this measurement mapping. + * + *

    This should be the code used by the source facility to identify this measurement type in their + * local system. The value will be automatically trimmed of leading and trailing whitespace. If null + * is provided, an empty string will be stored.

    + * + * @param identCode String the facility-specific identification code (maximum 20 characters, required), + * will be trimmed + */ public void setIdentCode(final String identCode) { pcSetidentCode(this, StringUtils.trimToEmpty(identCode)); } + /** + * Retrieves the human-readable name for this measurement. + * + *

    This name provides a descriptive label for the measurement that can be displayed to end users, + * such as "Blood Glucose", "Hemoglobin A1c", or "Systolic Blood Pressure". It complements the + * technical codes (LOINC and facility identifier) with a user-friendly description.

    + * + * @return String the measurement name (maximum 255 characters), never null + */ public String getName() { return pcGetname(this); } - + + /** + * Sets the human-readable name for this measurement mapping. + * + *

    The name should be clear and descriptive to help users understand what measurement this mapping + * represents. The value will be automatically trimmed of leading and trailing whitespace. If null + * is provided, an empty string will be stored.

    + * + * @param name String the measurement name (maximum 255 characters, required), will be trimmed + */ public void setName(final String name) { pcSetname(this, StringUtils.trimToEmpty(name)); } + /** + * Retrieves the laboratory type categorization for this measurement. + * + *

    This field categorizes the measurement by laboratory department or type, such as "CHEM" (Chemistry), + * "HEMA" (Hematology), "MICRO" (Microbiology), etc. This categorization helps organize and filter + * measurements by their clinical specialty area.

    + * + * @return String the laboratory type code (maximum 10 characters), never null + */ public String getLabType() { return pcGetlabType(this); } - + + /** + * Sets the laboratory type categorization for this measurement mapping. + * + *

    The lab type should indicate the clinical specialty or department that typically performs this + * measurement. The value will be automatically trimmed of leading and trailing whitespace. If null + * is provided, an empty string will be stored.

    + * + * @param labType String the laboratory type code (maximum 10 characters, required), will be trimmed + */ public void setLabType(final String labType) { pcSetlabType(this, StringUtils.trimToEmpty(labType)); } + /** + * Compares this measurement mapping to another for ordering purposes. + * + *

    The comparison is based on the CAISI item ID component of the composite primary key. This enables + * measurement mappings to be sorted in a consistent order based on their item identifiers.

    + * + * @param o CachedMeasurementMap the measurement mapping to compare against, must not be null + * @return int a negative integer, zero, or a positive integer as this mapping's CAISI item ID + * is less than, equal to, or greater than the specified mapping's CAISI item ID + */ @Override public int compareTo(final CachedMeasurementMap o) { return pcGetfacilityMeasurementMapPk(this).getCaisiItemId() - pcGetfacilityMeasurementMapPk(o).getCaisiItemId(); } + /** + * Retrieves the entity's primary key identifier. + * + *

    This method overrides the abstract getId() method from AbstractModel to provide access to the + * composite primary key. It returns the same value as getFacilityIdIntegerCompositePk().

    + * + * @return FacilityIdIntegerCompositePk the composite primary key for this entity, or null if not set + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityMeasurementMapPk(this); } + /** + * Returns the OpenJPA bytecode enhancement contract version. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is automatically generated + * by OpenJPA bytecode enhancement. It should not be called directly by application code.

    + * + * @return int the enhancement contract version (always 2 for this implementation) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -130,6 +286,17 @@ protected void pcClearFields() { this.name = null; } + /** + * Creates a new instance of this entity with a specific state manager and object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to create managed instances. It should not be called directly by application code.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to manage this instance + * @param o Object the object ID containing key field values to copy + * @param b boolean if true, all fields will be cleared before setting the state manager + * @return PersistenceCapable a new managed instance with the specified state manager and key fields + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedMeasurementMap cachedMeasurementMap = new CachedMeasurementMap(); if (b) { @@ -139,7 +306,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedMeasurementMap.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedMeasurementMap; } - + + /** + * Creates a new instance of this entity with a specific state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to create managed instances. It should not be called directly by application code.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to manage this instance + * @param b boolean if true, all fields will be cleared before setting the state manager + * @return PersistenceCapable a new managed instance with the specified state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedMeasurementMap cachedMeasurementMap = new CachedMeasurementMap(); if (b) { @@ -153,6 +330,15 @@ protected static int pcGetManagedFieldCount() { return 5; } + /** + * Replaces a single field value from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to manage field state. It should not be called directly by application code.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedMeasurementMap.pcInheritedFieldCount; if (n2 < 0) { @@ -184,13 +370,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to manage field state. It should not be called directly by application code.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a single field value to the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to retrieve field values for persistence operations. It should not be called directly by application code.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedMeasurementMap.pcInheritedFieldCount; if (n2 < 0) { @@ -222,7 +425,15 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to retrieve field values for persistence operations. It should not be called directly by application code.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -261,6 +472,17 @@ protected void pcCopyField(final CachedMeasurementMap cachedMeasurementMap, fina } } + /** + * Copies multiple field values from another instance with the same state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * for state management operations. Both instances must be managed by the same state manager.

    + * + * @param o Object the source CachedMeasurementMap instance to copy fields from + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source has a different state manager + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final CachedMeasurementMap cachedMeasurementMap = (CachedMeasurementMap)o; if (cachedMeasurementMap.pcStateManager != this.pcStateManager) { @@ -274,24 +496,56 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Retrieves the generic context from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface. The generic context provides + * additional state information for the persistence provider.

    + * + * @return Object the generic context, or null if there is no state manager + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Retrieves the object ID for this entity from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and provides access to the + * persistence provider's internal object identifier.

    + * + * @return Object the object ID, or null if there is no state manager + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been deleted from the persistence context. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates whether + * this entity is marked for deletion.

    + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since it was loaded or last persisted. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to determine if the entity needs to be updated in the database.

    + * + * @return boolean true if the entity has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -300,41 +554,106 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted to the database. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates whether + * this entity has been created but not yet inserted into the database.

    + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by the persistence context). + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates whether + * this entity is being managed by the JPA persistence provider.

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is enrolled in a transaction. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates whether + * this entity is participating in an active transaction.

    + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used during + * serialization to handle detached state properly.

    + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } + /** + * Marks a specific field as dirty (modified) in the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and notifies the JPA provider + * that a field has been modified and should be persisted.

    + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and provides access to the + * state manager that tracks this entity's persistence state.

    + * + * @return StateManager the state manager, or null if this instance is not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version number for optimistic locking. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and provides access to the + * version field used for optimistic locking and concurrency control.

    + * + * @return Object the version object, or null if there is no state manager + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * during state transitions. It should not be called directly by application code.

    + * + * @param pcStateManager StateManager the new state manager to use + * @throws SecurityException if the state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -343,26 +662,81 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key fields to an object ID using a field supplier. + * + *

    This method is part of the OpenJPA PersistenceCapable interface. This implementation throws + * InternalException because this entity uses an embedded ID class rather than individual key fields.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported for embedded ID classes + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields directly to an object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable interface. This implementation throws + * InternalException because this entity uses an embedded ID class rather than individual key fields.

    + * + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported for embedded ID classes + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to populate the entity's key fields from an object ID.

    + * + * @param fieldConsumer FieldConsumer the field consumer to store the key fields into + * @param o Object the source object ID containing the key field values + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(0 + CachedMeasurementMap.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields directly from an object ID to this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to set the composite primary key from an object ID.

    + * + * @param o Object the source ObjectId containing the FacilityIdIntegerCompositePk + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityMeasurementMapPk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This method is part of the OpenJPA PersistenceCapable interface. This implementation always throws + * IllegalArgumentException because the ObjectId class does not support string-based construction for + * embedded composite keys.

    + * + * @param o Object the string representation of the object ID + * @return Object never returns normally + * @throws IllegalArgumentException always, as string-based construction is not supported + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedMeasurementMap\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity's current key values. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and creates an ObjectId + * containing this entity's composite primary key.

    + * + * @return Object a new ObjectId wrapping this entity's FacilityIdIntegerCompositePk + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedMeasurementMap.class$Lca$openosp$openo$caisi_integrator$dao$CachedMeasurementMap != null) ? CachedMeasurementMap.class$Lca$openosp$openo$caisi_integrator$dao$CachedMeasurementMap : (CachedMeasurementMap.class$Lca$openosp$openo$caisi_integrator$dao$CachedMeasurementMap = class$("ca.openosp.openo.caisi_integrator.dao.CachedMeasurementMap")), (Object)this.facilityMeasurementMapPk); } @@ -447,6 +821,21 @@ private static final void pcSetname(final CachedMeasurementMap cachedMeasurement cachedMeasurementMap.pcStateManager.settingStringField((PersistenceCapable)cachedMeasurementMap, CachedMeasurementMap.pcInheritedFieldCount + 4, cachedMeasurementMap.name, name, 0); } + /** + * Checks if this entity is detached from the persistence context. + * + *

    A detached entity was previously managed but is no longer associated with a persistence context. + * Detached entities can be reattached (merged) back into a persistence context later.

    + * + *

    This method is part of the OpenJPA PersistenceCapable interface and returns:

    + *
      + *
    • Boolean.TRUE if the entity is definitely detached
    • + *
    • Boolean.FALSE if the entity is definitely not detached
    • + *
    • null if the detached status cannot be determined definitively
    • + *
    + * + * @return Boolean the detached status, or null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -472,10 +861,28 @@ private boolean pcisDetachedStateDefinitive() { return false; } + /** + * Retrieves the detached state object for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and provides access to the + * internal state used to track whether the entity is detached. The detached state is used during + * merge operations to determine how to reattach the entity.

    + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used by the JPA provider + * to mark the entity as detached and track its detached state. It should not be called directly by + * application code.

    + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementType.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementType.java index 09602089306..605c96a577d 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementType.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedMeasurementType.java @@ -17,6 +17,27 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Cached measurement type entity for the CAISI Integrator system. + * + * This JPA entity represents a cached copy of measurement type definitions from remote facilities + * in the CAISI (Collaborative Application for Integrated Services Information) integrator context. + * Measurement types define clinical measurements such as vital signs (blood pressure, temperature, + * weight, height), laboratory values, and other quantifiable health data points. + * + * The caching mechanism improves performance by storing remote facility measurement type definitions + * locally, reducing the need for repeated remote queries when displaying or processing clinical + * measurements from integrated healthcare facilities. + * + * This class is enhanced by OpenJPA for persistence capabilities, implementing the PersistenceCapable + * interface to support advanced ORM features including detached state management, field-level access + * tracking, and transparent persistence operations. + * + * @see FacilityIdIntegerCompositePk + * @see AbstractModel + * @see PersistenceCapable + * @since 2024-01-24 + */ @Entity public class CachedMeasurementType extends AbstractModel implements Comparable, PersistenceCapable { @@ -40,55 +61,149 @@ public class CachedMeasurementType extends AbstractModel implements Comparable, PersistenceCapable { @@ -68,7 +88,16 @@ public class CachedProgram extends AbstractModel i static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$CachedProgram; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor that initializes a new CachedProgram instance. + * + * Initializes all fields to their default values: + * - String fields are set to null + * - Boolean fields are set to false + * - minAge is set to 0 + * - maxAge is set to 200 (representing no upper age limit) + */ public CachedProgram() { this.name = null; this.description = null; @@ -91,185 +120,420 @@ public CachedProgram() { this.email = null; this.emergencyNumber = null; } - + + /** + * Gets the composite primary key for this cached program. + * + * @return FacilityIdIntegerCompositePk the composite primary key containing facility ID and CAISI item ID + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return pcGetfacilityIdIntegerCompositePk(this); } - + + /** + * Sets the composite primary key for this cached program. + * + * @param facilityIdIntegerCompositePk FacilityIdIntegerCompositePk the composite primary key to set + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityIdIntegerCompositePk) { pcSetfacilityIdIntegerCompositePk(this, facilityIdIntegerCompositePk); } - + + /** + * Gets the name of the program. + * + * @return String the program name, may be null + */ public String getName() { return pcGetname(this); } - + + /** + * Sets the name of the program. + * The input string is trimmed and converted to null if empty. + * + * @param name String the program name to set + */ public void setName(final String name) { pcSetname(this, StringUtils.trimToNull(name)); } - + + /** + * Gets the description of the program. + * + * @return String the program description, may be null + */ public String getDescription() { return pcGetdescription(this); } - + + /** + * Sets the description of the program. + * The input string is trimmed and converted to null if empty. + * + * @param description String the program description to set + */ public void setDescription(final String description) { pcSetdescription(this, StringUtils.trimToNull(description)); } - + + /** + * Gets the type of the program. + * + * @return String the program type, maximum length 32 characters, may be null + */ public String getType() { return pcGettype(this); } - + + /** + * Sets the type of the program. + * The input string is trimmed and converted to null if empty. + * + * @param type String the program type to set, maximum length 32 characters + */ public void setType(final String type) { pcSettype(this, StringUtils.trimToNull(type)); } - + + /** + * Gets the status of the program. + * + * @return String the program status, maximum length 32 characters, may be null + */ public String getStatus() { return pcGetstatus(this); } - + + /** + * Sets the status of the program. + * The input string is trimmed and converted to null if empty. + * + * @param status String the program status to set, maximum length 32 characters + */ public void setStatus(final String status) { pcSetstatus(this, StringUtils.trimToNull(status)); } - + + /** + * Checks if the program is affiliated with a bed program. + * + * @return boolean true if the program is affiliated with a bed program, false otherwise + */ public boolean isBedProgramAffiliated() { return pcGetbedProgramAffiliated(this); } - + + /** + * Sets whether the program is affiliated with a bed program. + * + * @param bedProgramAffiliated boolean true to indicate bed program affiliation, false otherwise + */ public void setBedProgramAffiliated(final boolean bedProgramAffiliated) { pcSetbedProgramAffiliated(this, bedProgramAffiliated); } - + + /** + * Checks if the program provides alcohol-related services or support. + * + * @return boolean true if the program provides alcohol services, false otherwise + */ public boolean isAlcohol() { return pcGetalcohol(this); } - + + /** + * Sets whether the program provides alcohol-related services or support. + * + * @param alcohol boolean true to indicate alcohol services are provided, false otherwise + */ public void setAlcohol(final boolean alcohol) { pcSetalcohol(this, alcohol); } - + + /** + * Gets the abstinence support level or type provided by the program. + * + * @return String the abstinence support level, maximum length 32 characters, may be null + */ public String getAbstinenceSupport() { return pcGetabstinenceSupport(this); } - + + /** + * Sets the abstinence support level or type provided by the program. + * The input string is trimmed and converted to null if empty. + * + * @param abstinenceSupport String the abstinence support level to set, maximum length 32 characters + */ public void setAbstinenceSupport(final String abstinenceSupport) { pcSetabstinenceSupport(this, StringUtils.trimToNull(abstinenceSupport)); } - + + /** + * Checks if the program provides physical health services. + * + * @return boolean true if the program provides physical health services, false otherwise + */ public boolean isPhysicalHealth() { return pcGetphysicalHealth(this); } - + + /** + * Sets whether the program provides physical health services. + * + * @param physicalHealth boolean true to indicate physical health services are provided, false otherwise + */ public void setPhysicalHealth(final boolean physicalHealth) { pcSetphysicalHealth(this, physicalHealth); } - + + /** + * Checks if the program provides mental health services. + * + * @return boolean true if the program provides mental health services, false otherwise + */ public boolean isMentalHealth() { return pcGetmentalHealth(this); } - + + /** + * Sets whether the program provides mental health services. + * + * @param mentalHealth boolean true to indicate mental health services are provided, false otherwise + */ public void setMentalHealth(final boolean mentalHealth) { pcSetmentalHealth(this, mentalHealth); } - + + /** + * Checks if the program provides housing assistance or services. + * + * @return boolean true if the program provides housing services, false otherwise + */ public boolean isHousing() { return pcGethousing(this); } - + + /** + * Sets whether the program provides housing assistance or services. + * + * @param housing boolean true to indicate housing services are provided, false otherwise + */ public void setHousing(final boolean housing) { pcSethousing(this, housing); } - + + /** + * Gets the gender restriction for program eligibility. + * + * @return Gender the gender restriction (M, F, T, O, or U), may be null if no gender restriction + * @see CachedDemographic.Gender + */ public CachedDemographic.Gender getGender() { return pcGetgender(this); } - + + /** + * Sets the gender restriction for program eligibility. + * + * @param gender Gender the gender restriction to set, may be null for no restriction + * @see CachedDemographic.Gender + */ public void setGender(final CachedDemographic.Gender gender) { pcSetgender(this, gender); } - + + /** + * Checks if the program is restricted to First Nation individuals. + * + * @return boolean true if the program is restricted to First Nation individuals, false otherwise + */ public boolean isFirstNation() { return pcGetfirstNation(this); } - + + /** + * Sets whether the program is restricted to First Nation individuals. + * + * @param firstNation boolean true to restrict to First Nation individuals, false otherwise + */ public void setFirstNation(final boolean firstNation) { pcSetfirstNation(this, firstNation); } - + + /** + * Gets the minimum age for program eligibility. + * + * @return int the minimum age in years (default is 0) + */ public int getMinAge() { return pcGetminAge(this); } - + + /** + * Sets the minimum age for program eligibility. + * + * @param minAge int the minimum age in years + */ public void setMinAge(final int minAge) { pcSetminAge(this, minAge); } - + + /** + * Gets the maximum age for program eligibility. + * + * @return int the maximum age in years (default is 200, representing no upper limit) + */ public int getMaxAge() { return pcGetmaxAge(this); } - + + /** + * Sets the maximum age for program eligibility. + * + * @param maxAge int the maximum age in years + */ public void setMaxAge(final int maxAge) { pcSetmaxAge(this, maxAge); } - + + /** + * Gets the physical address of the program location. + * + * @return String the program address, may be null + */ public String getAddress() { return pcGetaddress(this); } - + + /** + * Sets the physical address of the program location. + * + * @param address String the program address to set + */ public void setAddress(final String address) { pcSetaddress(this, address); } - + + /** + * Gets the phone number for the program. + * + * @return String the phone number, may be null + */ public String getPhone() { return pcGetphone(this); } - + + /** + * Sets the phone number for the program. + * + * @param phone String the phone number to set + */ public void setPhone(final String phone) { pcSetphone(this, phone); } - + + /** + * Gets the fax number for the program. + * + * @return String the fax number, may be null + */ public String getFax() { return pcGetfax(this); } - + + /** + * Sets the fax number for the program. + * + * @param fax String the fax number to set + */ public void setFax(final String fax) { pcSetfax(this, fax); } - + + /** + * Gets the website URL for the program. + * + * @return String the website URL, may be null + */ public String getUrl() { return pcGeturl(this); } - + + /** + * Sets the website URL for the program. + * + * @param url String the website URL to set + */ public void setUrl(final String url) { pcSeturl(this, url); } - + + /** + * Gets the email address for the program. + * + * @return String the email address, may be null + */ public String getEmail() { return pcGetemail(this); } - + + /** + * Sets the email address for the program. + * + * @param email String the email address to set + */ public void setEmail(final String email) { pcSetemail(this, email); } - + + /** + * Gets the emergency contact number for the program. + * + * @return String the emergency contact number, may be null + */ public String getEmergencyNumber() { return pcGetemergencyNumber(this); } - + + /** + * Sets the emergency contact number for the program. + * + * @param emergencyNumber String the emergency contact number to set + */ public void setEmergencyNumber(final String emergencyNumber) { pcSetemergencyNumber(this, emergencyNumber); } - + + /** + * Compares this program with another program based on their CAISI item IDs. + * Used for sorting programs in collections. + * + * @param o CachedProgram the program to compare to + * @return int negative if this program's ID is less, zero if equal, positive if greater + */ @Override public int compareTo(final CachedProgram o) { return pcGetfacilityIdIntegerCompositePk(this).getCaisiItemId() - pcGetfacilityIdIntegerCompositePk(o).getCaisiItemId(); } - + + /** + * Gets the identifier for this program (composite primary key). + * + * @return FacilityIdIntegerCompositePk the composite primary key + */ @Override public FacilityIdIntegerCompositePk getId() { return pcGetfacilityIdIntegerCompositePk(this); } - + + /** + * Returns the OpenJPA enhancement contract version for this entity. + * Used by OpenJPA for bytecode enhancement versioning. + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -290,7 +554,11 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all fields in this entity to their default values. + * Used by OpenJPA for entity lifecycle management. + */ protected void pcClearFields() { this.abstinenceSupport = null; this.address = null; @@ -314,7 +582,16 @@ protected void pcClearFields() { this.type = null; this.url = null; } - + + /** + * Creates a new instance of this entity with the specified state manager and object ID. + * Used by OpenJPA for creating managed instances during persistence operations. + * + * @param pcStateManager StateManager the state manager to manage this instance + * @param o Object the object ID to copy key fields from + * @param b boolean true to clear all fields, false to preserve them + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedProgram cachedProgram = new CachedProgram(); if (b) { @@ -324,7 +601,15 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedProgram.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedProgram; } - + + /** + * Creates a new instance of this entity with the specified state manager. + * Used by OpenJPA for creating managed instances during persistence operations. + * + * @param pcStateManager StateManager the state manager to manage this instance + * @param b boolean true to clear all fields, false to preserve them + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedProgram cachedProgram = new CachedProgram(); if (b) { @@ -333,11 +618,24 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedProgram.pcStateManager = pcStateManager; return (PersistenceCapable)cachedProgram; } - + + /** + * Returns the number of managed fields in this entity. + * Used by OpenJPA for field tracking and state management. + * + * @return int the number of managed fields (21) + */ protected static int pcGetManagedFieldCount() { return 21; } - + + /** + * Replaces the value of a single field from the state manager. + * Used by OpenJPA during entity hydration and state restoration. + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - CachedProgram.pcInheritedFieldCount; if (n2 < 0) { @@ -433,13 +731,26 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces the values of multiple fields from the state manager. + * Used by OpenJPA during entity hydration and state restoration. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides the value of a single field to the state manager. + * Used by OpenJPA during entity persistence and state capture. + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - CachedProgram.pcInheritedFieldCount; if (n2 < 0) { @@ -535,13 +846,27 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides the values of multiple fields to the state manager. + * Used by OpenJPA during entity persistence and state capture. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies the value of a single field from another CachedProgram instance. + * Used by OpenJPA for entity cloning and merging operations. + * + * @param cachedProgram CachedProgram the source program to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final CachedProgram cachedProgram, final int n) { final int n2 = n - CachedProgram.pcInheritedFieldCount; if (n2 < 0) { @@ -637,7 +962,16 @@ protected void pcCopyField(final CachedProgram cachedProgram, final int n) { } } } - + + /** + * Copies the values of multiple fields from another CachedProgram instance. + * Used by OpenJPA for entity cloning and merging operations. + * + * @param o Object the source object to copy from (must be a CachedProgram) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if state managers don't match + * @throws IllegalStateException if state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final CachedProgram cachedProgram = (CachedProgram)o; if (cachedProgram.pcStateManager != this.pcStateManager) { @@ -650,25 +984,49 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedProgram, array[i]); } } - + + /** + * Gets the generic context from the state manager. + * Used by OpenJPA for accessing persistence context information. + * + * @return Object the generic context, or null if no state manager + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object identifier for this entity. + * Used by OpenJPA for identity management. + * + * @return Object the object identifier, or null if no state manager + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity is marked for deletion. + * Used by OpenJPA for lifecycle state tracking. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since being loaded or last persisted. + * Used by OpenJPA for change detection and optimistic locking. + * + * @return boolean true if the entity is dirty, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -677,41 +1035,90 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * Used by OpenJPA for lifecycle state tracking. + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by a persistence context). + * Used by OpenJPA for lifecycle state tracking. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is part of an active transaction. + * Used by OpenJPA for transaction management. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * Used by OpenJPA for serialization handling. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty (modified). + * Used by OpenJPA for change tracking. + * + * @param s String the field name that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Gets the state manager for this entity. + * Used by OpenJPA for accessing persistence state management. + * + * @return StateManager the state manager managing this entity + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Gets the version of this entity for optimistic locking. + * Used by OpenJPA for detecting concurrent modifications. + * + * @return Object the version object, or null if no state manager + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager for this entity. + * Used by OpenJPA during entity attachment and detachment. + * + * @param pcStateManager StateManager the new state manager + * @throws SecurityException if replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -719,27 +1126,69 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * This operation is not supported for this entity type. + * + * @param fieldSupplier FieldSupplier the field supplier (not used) + * @param o Object the object ID (not used) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * This operation is not supported for this entity type. + * + * @param o Object the object ID (not used) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * Used by OpenJPA for reconstructing entity identity. + * + * @param fieldConsumer FieldConsumer the field consumer to receive key fields + * @param o Object the object ID to copy from + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(7 + CachedProgram.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from an object ID. + * Used by OpenJPA for reconstructing entity identity. + * + * @param o Object the object ID to copy from + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityIdIntegerCompositePk = (FacilityIdIntegerCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * This operation is not supported for this entity type due to composite key structure. + * + * @param o Object the string representation (not used) + * @return Object never returns normally + * @throws IllegalArgumentException always thrown with explanatory message + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedProgram\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance for this entity. + * Used by OpenJPA for generating entity identifiers. + * + * @return Object the new object ID instance containing this entity's composite key + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedProgram.class$Lca$openosp$openo$caisi_integrator$dao$CachedProgram != null) ? CachedProgram.class$Lca$openosp$openo$caisi_integrator$dao$CachedProgram : (CachedProgram.class$Lca$openosp$openo$caisi_integrator$dao$CachedProgram = class$("ca.openosp.openo.caisi_integrator.dao.CachedProgram")), (Object)this.facilityIdIntegerCompositePk); } @@ -1079,7 +1528,14 @@ private static final void pcSeturl(final CachedProgram cachedProgram, final Stri } cachedProgram.pcStateManager.settingStringField((PersistenceCapable)cachedProgram, CachedProgram.pcInheritedFieldCount + 20, cachedProgram.url, url, 0); } - + + /** + * Checks if this entity is in a detached state. + * Detached entities have been loaded from the database but are no longer managed by a persistence context. + * Used by OpenJPA for lifecycle state tracking and entity merging operations. + * + * @return Boolean true if detached, false if attached, null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -1100,19 +1556,44 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive for this entity. + * Used internally by OpenJPA to determine if the detached state can be trusted. + * + * @return boolean always returns false, indicating detached state is not definitive + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Gets the detached state object for this entity. + * The detached state holds information needed to reattach the entity to a persistence context. + * + * @return Object the detached state object, may be null or DESERIALIZED constant + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * Used by OpenJPA during detachment and serialization operations. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method for writing this entity to an output stream. + * Handles proper serialization of OpenJPA-enhanced entities. + * + * @param objectOutputStream ObjectOutputStream the stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -1120,7 +1601,15 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method for reading this entity from an input stream. + * Handles proper deserialization of OpenJPA-enhanced entities and marks the entity as deserialized. + * + * @param objectInputStream ObjectInputStream the stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedProvider.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedProvider.java index fdc825befb8..c5b94f65b5c 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedProvider.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/CachedProvider.java @@ -16,6 +16,31 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * Cached healthcare provider entity for the CAISI integrator system. + * + * This JPA entity represents a cached copy of healthcare provider information from remote CAISI + * (Client Access to Integrated Services and Information) facilities. The cache stores essential + * provider details including name, specialty, and contact information to support cross-facility + * healthcare collaboration and data sharing within the OpenO EMR integrator framework. + * + * The class implements OpenJPA's PersistenceCapable interface to enable byte-code enhancement + * for optimized JPA operations including field-level dirty tracking, lazy loading, and detached + * state management. The enhancement is performed at build time by the OpenJPA bytecode enhancer. + * + * This entity uses a composite primary key {@link FacilityIdStringCompositePk} to uniquely + * identify providers across multiple healthcare facilities, ensuring proper data isolation + * and preventing duplicate provider records when aggregating data from distributed sources. + * + * All string fields are automatically trimmed to null using Apache Commons StringUtils to + * ensure consistent data storage and prevent empty string vs null inconsistencies that can + * cause issues in healthcare data integration scenarios. + * + * @see FacilityIdStringCompositePk + * @see AbstractModel + * @see org.apache.openjpa.enhance.PersistenceCapable + * @since 2026-01-24 + */ @Entity public class CachedProvider extends AbstractModel implements Comparable, PersistenceCapable { @@ -40,64 +65,220 @@ public class CachedProvider extends AbstractModel i static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$CachedProvider; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Constructs a new CachedProvider instance with null field values. + * + * This default constructor initializes all provider fields (firstName, lastName, specialty, + * workPhone) to null, providing a clean slate for new provider records. Required by JPA + * specification for entity instantiation and by OpenJPA for bytecode enhancement operations. + * + * @see #setFirstName(String) + * @see #setLastName(String) + * @see #setSpecialty(String) + * @see #setWorkPhone(String) + */ public CachedProvider() { this.firstName = null; this.lastName = null; this.specialty = null; this.workPhone = null; } - + + /** + * Retrieves the composite primary key for this cached provider. + * + * Returns the facility and ID composite key that uniquely identifies this provider + * across multiple healthcare facilities in the CAISI integrator network. This method + * delegates to the OpenJPA-enhanced static accessor to ensure proper field access + * tracking and lazy loading support. + * + * @return FacilityIdStringCompositePk the composite primary key containing facility ID and provider ID + * @see #setFacilityIdStringCompositePk(FacilityIdStringCompositePk) + * @see FacilityIdStringCompositePk + */ public FacilityIdStringCompositePk getFacilityIdStringCompositePk() { return pcGetfacilityIdStringCompositePk(this); } - + + /** + * Sets the composite primary key for this cached provider. + * + * Assigns the facility and ID composite key that uniquely identifies this provider + * across multiple healthcare facilities. This method delegates to the OpenJPA-enhanced + * static mutator to ensure proper state management and dirty field tracking. + * + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the composite primary key to assign + * @see #getFacilityIdStringCompositePk() + * @see FacilityIdStringCompositePk + */ public void setFacilityIdStringCompositePk(final FacilityIdStringCompositePk facilityIdStringCompositePk) { pcSetfacilityIdStringCompositePk(this, facilityIdStringCompositePk); } - + + /** + * Compares this provider to another provider based on CAISI item ID. + * + * Implements natural ordering for CachedProvider objects by comparing the CAISI item IDs + * from their composite primary keys. This enables consistent sorting of provider collections + * across the integrator system. The comparison is delegated to the String compareTo method + * of the CAISI item IDs, providing lexicographic ordering. + * + * @param o CachedProvider the provider to compare against + * @return int negative if this provider's ID is less than the other, zero if equal, + * positive if greater than the other provider's ID + * @see Comparable#compareTo(Object) + * @see FacilityIdStringCompositePk#getCaisiItemId() + */ @Override public int compareTo(final CachedProvider o) { return pcGetfacilityIdStringCompositePk(this).getCaisiItemId().compareTo(pcGetfacilityIdStringCompositePk(o).getCaisiItemId()); } - + + /** + * Retrieves the entity identifier for this cached provider. + * + * Returns the composite primary key as required by the AbstractModel parent class. + * This method provides the unique identifier used by the persistence framework for + * entity lifecycle management, caching, and relationship mapping. + * + * @return FacilityIdStringCompositePk the composite primary key identifying this provider + * @see AbstractModel#getId() + * @see #getFacilityIdStringCompositePk() + */ @Override public FacilityIdStringCompositePk getId() { return pcGetfacilityIdStringCompositePk(this); } - + + /** + * Retrieves the first name of the healthcare provider. + * + * Returns the provider's given name as stored in the cache. This method uses the + * OpenJPA-enhanced accessor to ensure proper persistence state tracking. The value + * may be null if not set or if trimmed to null during assignment. + * + * @return String the provider's first name, or null if not set + * @see #setFirstName(String) + */ public String getFirstName() { return pcGetfirstName(this); } - + + /** + * Sets the first name of the healthcare provider. + * + * Assigns the provider's given name to the cache after trimming whitespace. Empty strings + * are automatically converted to null to ensure consistent data storage. This method uses + * the OpenJPA-enhanced mutator for proper dirty field tracking. + * + * @param firstName String the provider's first name to store (will be trimmed to null if blank) + * @see #getFirstName() + * @see StringUtils#trimToNull(String) + */ public void setFirstName(final String firstName) { pcSetfirstName(this, StringUtils.trimToNull(firstName)); } - + + /** + * Retrieves the last name of the healthcare provider. + * + * Returns the provider's family name as stored in the cache. This method uses the + * OpenJPA-enhanced accessor to ensure proper persistence state tracking. The value + * may be null if not set or if trimmed to null during assignment. + * + * @return String the provider's last name, or null if not set + * @see #setLastName(String) + */ public String getLastName() { return pcGetlastName(this); } - + + /** + * Sets the last name of the healthcare provider. + * + * Assigns the provider's family name to the cache after trimming whitespace. Empty strings + * are automatically converted to null to ensure consistent data storage. This method uses + * the OpenJPA-enhanced mutator for proper dirty field tracking. + * + * @param lastName String the provider's last name to store (will be trimmed to null if blank) + * @see #getLastName() + * @see StringUtils#trimToNull(String) + */ public void setLastName(final String lastName) { pcSetlastName(this, StringUtils.trimToNull(lastName)); } - + + /** + * Retrieves the medical specialty of the healthcare provider. + * + * Returns the provider's area of medical practice or specialization as stored in the cache. + * This may include values such as "Family Medicine", "Cardiology", "Pediatrics", etc. + * This method uses the OpenJPA-enhanced accessor to ensure proper persistence state tracking. + * + * @return String the provider's medical specialty, or null if not set + * @see #setSpecialty(String) + */ public String getSpecialty() { return pcGetspecialty(this); } - + + /** + * Sets the medical specialty of the healthcare provider. + * + * Assigns the provider's area of medical practice or specialization to the cache after + * trimming whitespace. Empty strings are automatically converted to null to ensure + * consistent data storage. This method uses the OpenJPA-enhanced mutator for proper + * dirty field tracking. + * + * @param specialty String the provider's medical specialty to store (will be trimmed to null if blank) + * @see #getSpecialty() + * @see StringUtils#trimToNull(String) + */ public void setSpecialty(final String specialty) { pcSetspecialty(this, StringUtils.trimToNull(specialty)); } - + + /** + * Retrieves the work phone number of the healthcare provider. + * + * Returns the provider's business contact phone number as stored in the cache. This is + * the primary phone number for professional healthcare communications. This method uses + * the OpenJPA-enhanced accessor to ensure proper persistence state tracking. + * + * @return String the provider's work phone number, or null if not set + * @see #setWorkPhone(String) + */ public String getWorkPhone() { return pcGetworkPhone(this); } - + + /** + * Sets the work phone number of the healthcare provider. + * + * Assigns the provider's business contact phone number to the cache after trimming + * whitespace. Empty strings are automatically converted to null to ensure consistent + * data storage. This method uses the OpenJPA-enhanced mutator for proper dirty field + * tracking. + * + * @param workPhone String the provider's work phone number to store (will be trimmed to null if blank) + * @see #getWorkPhone() + * @see StringUtils#trimToNull(String) + */ public void setWorkPhone(final String workPhone) { pcSetworkPhone(this, StringUtils.trimToNull(workPhone)); } - + + /** + * Returns the OpenJPA bytecode enhancement contract version. + * + * This method is part of the PersistenceCapable contract and indicates the version of the + * OpenJPA enhancement specification implemented by this class. The value 2 corresponds to + * the OpenJPA enhancement contract version used during bytecode processing. + * + * @return int the enhancement contract version number (always returns 2) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcGetEnhancementContractVersion() + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -118,7 +299,17 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all managed field values to null. + * + * This OpenJPA enhancement method resets all persistent fields (facilityIdStringCompositePk, + * firstName, lastName, specialty, workPhone) to null. Used internally by the persistence + * framework during entity initialization and state management operations. + * + * @see #pcNewInstance(StateManager, Object, boolean) + * @see #pcNewInstance(StateManager, boolean) + */ protected void pcClearFields() { this.facilityIdStringCompositePk = null; this.firstName = null; @@ -126,7 +317,23 @@ protected void pcClearFields() { this.specialty = null; this.workPhone = null; } - + + /** + * Creates a new provider instance with state manager and object ID. + * + * This OpenJPA enhancement method constructs a new CachedProvider instance, optionally + * clearing its fields, assigning the provided state manager, and copying key fields from + * the given object ID. Used by the persistence framework when loading entities from the + * database or creating new managed instances. + * + * @param pcStateManager StateManager the OpenJPA state manager to assign to the new instance + * @param o Object the object ID containing key field values to copy + * @param b boolean true to clear all fields before initialization, false to preserve default values + * @return PersistenceCapable the newly created provider instance + * @see #pcClearFields() + * @see #pcCopyKeyFieldsFromObjectId(Object) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcNewInstance(StateManager, Object, boolean) + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final CachedProvider cachedProvider = new CachedProvider(); if (b) { @@ -136,7 +343,20 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedProvider.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)cachedProvider; } - + + /** + * Creates a new provider instance with state manager. + * + * This OpenJPA enhancement method constructs a new CachedProvider instance, optionally + * clearing its fields and assigning the provided state manager. Used by the persistence + * framework when creating new managed instances without a specific object ID. + * + * @param pcStateManager StateManager the OpenJPA state manager to assign to the new instance + * @param b boolean true to clear all fields, false to preserve default values + * @return PersistenceCapable the newly created provider instance + * @see #pcClearFields() + * @see org.apache.openjpa.enhance.PersistenceCapable#pcNewInstance(StateManager, boolean) + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final CachedProvider cachedProvider = new CachedProvider(); if (b) { @@ -145,11 +365,33 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final cachedProvider.pcStateManager = pcStateManager; return (PersistenceCapable)cachedProvider; } - + + /** + * Returns the count of managed persistent fields. + * + * This OpenJPA enhancement method returns the total number of fields managed by the + * persistence framework for this entity class. The count includes all persistent fields: + * facilityIdStringCompositePk, firstName, lastName, specialty, and workPhone. + * + * @return int the number of managed fields (always returns 5) + */ protected static int pcGetManagedFieldCount() { return 5; } - + + /** + * Replaces a single managed field value from the state manager. + * + * This OpenJPA enhancement method replaces the value of a specific persistent field + * by retrieving the new value from the state manager. The field index is adjusted + * for inheritance and validated before replacement. Used during entity refresh, + * merge, and detachment operations. + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + * @see #pcReplaceFields(int[]) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcReplaceField(int) + */ public void pcReplaceField(final int n) { final int n2 = n - CachedProvider.pcInheritedFieldCount; if (n2 < 0) { @@ -181,13 +423,38 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple managed field values from the state manager. + * + * This OpenJPA enhancement method replaces the values of specified persistent fields + * by iterating through the provided field indices and delegating to pcReplaceField + * for each. Used during bulk entity refresh and merge operations. + * + * @param array int[] array of absolute field indices to replace + * @throws IllegalArgumentException if any field index is invalid + * @see #pcReplaceField(int) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcReplaceFields(int[]) + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single managed field value to the state manager. + * + * This OpenJPA enhancement method sends the current value of a specific persistent field + * to the state manager for tracking or serialization. The field index is adjusted for + * inheritance and validated before the value is provided. Used during entity persistence, + * flush, and detachment operations. + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + * @see #pcProvideFields(int[]) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcProvideField(int) + */ public void pcProvideField(final int n) { final int n2 = n - CachedProvider.pcInheritedFieldCount; if (n2 < 0) { @@ -219,13 +486,37 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple managed field values to the state manager. + * + * This OpenJPA enhancement method sends the current values of specified persistent fields + * to the state manager by iterating through the provided field indices and delegating to + * pcProvideField for each. Used during bulk entity persistence and flush operations. + * + * @param array int[] array of absolute field indices to provide + * @throws IllegalArgumentException if any field index is invalid + * @see #pcProvideField(int) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcProvideFields(int[]) + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another provider instance. + * + * This OpenJPA enhancement method copies the value of a specific persistent field from + * the source provider to this instance. The field index is adjusted for inheritance and + * validated before the copy operation. Used during entity merge and refresh operations. + * + * @param cachedProvider CachedProvider the source provider instance to copy from + * @param n int the absolute field index to copy + * @throws IllegalArgumentException if the field index is invalid + * @see #pcCopyFields(Object, int[]) + */ protected void pcCopyField(final CachedProvider cachedProvider, final int n) { final int n2 = n - CachedProvider.pcInheritedFieldCount; if (n2 < 0) { @@ -257,7 +548,21 @@ protected void pcCopyField(final CachedProvider cachedProvider, final int n) { } } } - + + /** + * Copies multiple field values from another provider instance. + * + * This OpenJPA enhancement method copies the values of specified persistent fields from + * the source object to this instance. Validates that both instances share the same state + * manager before performing the copy operation. Used during entity merge operations. + * + * @param o Object the source provider instance to copy from (must be a CachedProvider) + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if the state manager is null + * @see #pcCopyField(CachedProvider, int) + * @see org.apache.openjpa.enhance.PersistenceCapable#pcCopyFields(Object, int[]) + */ public void pcCopyFields(final Object o, final int[] array) { final CachedProvider cachedProvider = (CachedProvider)o; if (cachedProvider.pcStateManager != this.pcStateManager) { @@ -270,25 +575,62 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(cachedProvider, array[i]); } } - + + /** + * Retrieves the generic context from the state manager. + * + * Returns the generic context object associated with this entity's state manager. + * The context contains persistence framework-specific metadata and configuration. + * + * @return Object the generic context, or null if no state manager is present + * @see org.apache.openjpa.enhance.PersistenceCapable#pcGetGenericContext() + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object identifier for this entity. + * + * Returns the JPA object ID that uniquely identifies this entity instance within the + * persistence context. Returns null for transient (non-persistent) instances. + * + * @return Object the object identifier, or null if not persistent or no state manager + * @see org.apache.openjpa.enhance.PersistenceCapable#pcFetchObjectId() + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been marked for deletion. + * + * Returns true if this provider entity has been marked for removal in the current + * transaction but the deletion has not yet been flushed to the database. + * + * @return boolean true if marked for deletion, false otherwise + * @see org.apache.openjpa.enhance.PersistenceCapable#pcIsDeleted() + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified. + * + * Returns true if any persistent fields have been changed since the entity was loaded + * or last synchronized with the database. Triggers a dirty check via RedefinitionHelper + * to ensure accurate state detection. + * + * @return boolean true if any fields have been modified, false otherwise + * @see org.apache.openjpa.enhance.PersistenceCapable#pcIsDirty() + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -297,41 +639,115 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created. + * + * Returns true if this provider entity has been persisted (added to the persistence + * context) but not yet committed to the database. + * + * @return boolean true if newly created in the current transaction, false otherwise + * @see org.apache.openjpa.enhance.PersistenceCapable#pcIsNew() + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is managed by the persistence context. + * + * Returns true if this provider entity is persistent (has been loaded from or saved to + * the database) and is currently managed by the JPA entity manager. + * + * @return boolean true if persistent, false if transient + * @see org.apache.openjpa.enhance.PersistenceCapable#pcIsPersistent() + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is participating in a transaction. + * + * Returns true if this provider entity is currently enlisted in an active JPA transaction. + * + * @return boolean true if transactional, false otherwise + * @see org.apache.openjpa.enhance.PersistenceCapable#pcIsTransactional() + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * Returns true if the persistence framework is currently serializing this provider + * entity, typically during detachment or remote transfer operations. + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty for persistence tracking. + * + * Notifies the state manager that the specified field has been modified and needs to + * be synchronized with the database. Used internally by enhanced setter methods to + * maintain dirty field tracking. + * + * @param s String the name of the field that was modified + * @see org.apache.openjpa.enhance.PersistenceCapable#pcDirty(String) + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager for this entity. + * + * Returns the state manager instance responsible for tracking the persistence state + * and lifecycle of this provider entity. Returns null for transient instances. + * + * @return StateManager the state manager, or null if not managed + * @see org.apache.openjpa.enhance.PersistenceCapable#pcGetStateManager() + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version identifier for optimistic locking. + * + * Returns the version value used by the persistence framework for optimistic concurrency + * control. The version is automatically incremented on each update to detect concurrent + * modifications. + * + * @return Object the version identifier, or null if no state manager or not versioned + * @see org.apache.openjpa.enhance.PersistenceCapable#pcGetVersion() + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager for this entity. + * + * Assigns a new state manager to this provider entity, with proper coordination if + * a state manager is already present. Used during entity attachment, detachment, + * and context transitions. + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if state manager replacement is not permitted + * @see org.apache.openjpa.enhance.PersistenceCapable#pcReplaceStateManager(StateManager) + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -339,31 +755,105 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * + * This method is not supported for this entity type and will throw an InternalException + * if called. The entity uses embedded ID mapping which does not support this operation. + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + * @see org.apache.openjpa.enhance.PersistenceCapable#pcCopyKeyFieldsToObjectId(FieldSupplier, Object) + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + * This method is not supported for this entity type and will throw an InternalException + * if called. The entity uses embedded ID mapping which does not support this operation. + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + * @see org.apache.openjpa.enhance.PersistenceCapable#pcCopyKeyFieldsToObjectId(Object) + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * + * Extracts the embedded composite primary key from the provided OpenJPA ObjectId and + * stores it in the field consumer at the appropriate field index. Used during entity + * loading and state restoration. + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key field + * @param o Object the source object ID containing the embedded composite key + * @see org.apache.openjpa.enhance.PersistenceCapable#pcCopyKeyFieldsFromObjectId(FieldConsumer, Object) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(0 + CachedProvider.pcInheritedFieldCount, ((ObjectId)o).getId()); } - + + /** + * Copies key fields from an object ID to this entity. + * + * Extracts the embedded composite primary key from the provided OpenJPA ObjectId and + * assigns it to this provider entity's facilityIdStringCompositePk field. Used during + * entity instantiation and state restoration. + * + * @param o Object the source object ID containing the embedded composite key + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.facilityIdStringCompositePk = (FacilityIdStringCompositePk)((ObjectId)o).getId(); } - + + /** + * Creates a new object ID instance from a string representation. + * + * This method is not supported for this entity type because embedded composite IDs + * cannot be constructed from a simple string representation. Throws an exception + * explaining the constraint. + * + * @param o Object the string representation of the object ID + * @return Object never returns (always throws exception) + * @throws IllegalArgumentException always thrown because this ID type does not support + * string-based construction + * @see org.apache.openjpa.enhance.PersistenceCapable#pcNewObjectIdInstance(Object) + */ public Object pcNewObjectIdInstance(final Object o) { throw new IllegalArgumentException("The id type \"class org.apache.openjpa.util.ObjectId\" specified by persistent type \"class ca.openosp.openo.caisi_integrator.dao.CachedProvider\" does not have a public class org.apache.openjpa.util.ObjectId(String) or class org.apache.openjpa.util.ObjectId(Class, String) constructor."); } - + + /** + * Creates a new object ID instance from this entity's current key fields. + * + * Constructs an OpenJPA ObjectId containing this provider's composite primary key + * (facilityIdStringCompositePk). Used by the persistence framework for caching, + * identity management, and relationship mapping. + * + * @return Object a new ObjectId instance wrapping the composite primary key + * @see org.apache.openjpa.enhance.PersistenceCapable#pcNewObjectIdInstance() + */ public Object pcNewObjectIdInstance() { return new ObjectId((CachedProvider.class$Lca$openosp$openo$caisi_integrator$dao$CachedProvider != null) ? CachedProvider.class$Lca$openosp$openo$caisi_integrator$dao$CachedProvider : (CachedProvider.class$Lca$openosp$openo$caisi_integrator$dao$CachedProvider = class$("ca.openosp.openo.caisi_integrator.dao.CachedProvider")), (Object)this.facilityIdStringCompositePk); } - + + /** + * Enhanced static accessor for the composite primary key field. + * + * OpenJPA-generated method that provides optimized field access with automatic state + * manager notification. Used internally by the public getter to ensure proper field + * tracking during lazy loading and dirty checking. + * + * @param cachedProvider CachedProvider the provider instance to access + * @return FacilityIdStringCompositePk the composite primary key value + */ private static final FacilityIdStringCompositePk pcGetfacilityIdStringCompositePk(final CachedProvider cachedProvider) { if (cachedProvider.pcStateManager == null) { return cachedProvider.facilityIdStringCompositePk; @@ -371,7 +861,17 @@ private static final FacilityIdStringCompositePk pcGetfacilityIdStringCompositeP cachedProvider.pcStateManager.accessingField(CachedProvider.pcInheritedFieldCount + 0); return cachedProvider.facilityIdStringCompositePk; } - + + /** + * Enhanced static mutator for the composite primary key field. + * + * OpenJPA-generated method that provides optimized field modification with automatic + * state manager notification for dirty tracking. Used internally by the public setter + * to ensure proper persistence state management. + * + * @param cachedProvider CachedProvider the provider instance to modify + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the new composite key value + */ private static final void pcSetfacilityIdStringCompositePk(final CachedProvider cachedProvider, final FacilityIdStringCompositePk facilityIdStringCompositePk) { if (cachedProvider.pcStateManager == null) { cachedProvider.facilityIdStringCompositePk = facilityIdStringCompositePk; @@ -379,7 +879,17 @@ private static final void pcSetfacilityIdStringCompositePk(final CachedProvider } cachedProvider.pcStateManager.settingObjectField((PersistenceCapable)cachedProvider, CachedProvider.pcInheritedFieldCount + 0, (Object)cachedProvider.facilityIdStringCompositePk, (Object)facilityIdStringCompositePk, 0); } - + + /** + * Enhanced static accessor for the firstName field. + * + * OpenJPA-generated method that provides optimized field access with automatic state + * manager notification. Used internally by the public getter to ensure proper field + * tracking during lazy loading and dirty checking. + * + * @param cachedProvider CachedProvider the provider instance to access + * @return String the firstName value + */ private static final String pcGetfirstName(final CachedProvider cachedProvider) { if (cachedProvider.pcStateManager == null) { return cachedProvider.firstName; @@ -387,7 +897,17 @@ private static final String pcGetfirstName(final CachedProvider cachedProvider) cachedProvider.pcStateManager.accessingField(CachedProvider.pcInheritedFieldCount + 1); return cachedProvider.firstName; } - + + /** + * Enhanced static mutator for the firstName field. + * + * OpenJPA-generated method that provides optimized field modification with automatic + * state manager notification for dirty tracking. Used internally by the public setter + * to ensure proper persistence state management. + * + * @param cachedProvider CachedProvider the provider instance to modify + * @param firstName String the new firstName value + */ private static final void pcSetfirstName(final CachedProvider cachedProvider, final String firstName) { if (cachedProvider.pcStateManager == null) { cachedProvider.firstName = firstName; @@ -395,7 +915,17 @@ private static final void pcSetfirstName(final CachedProvider cachedProvider, fi } cachedProvider.pcStateManager.settingStringField((PersistenceCapable)cachedProvider, CachedProvider.pcInheritedFieldCount + 1, cachedProvider.firstName, firstName, 0); } - + + /** + * Enhanced static accessor for the lastName field. + * + * OpenJPA-generated method that provides optimized field access with automatic state + * manager notification. Used internally by the public getter to ensure proper field + * tracking during lazy loading and dirty checking. + * + * @param cachedProvider CachedProvider the provider instance to access + * @return String the lastName value + */ private static final String pcGetlastName(final CachedProvider cachedProvider) { if (cachedProvider.pcStateManager == null) { return cachedProvider.lastName; @@ -403,7 +933,17 @@ private static final String pcGetlastName(final CachedProvider cachedProvider) { cachedProvider.pcStateManager.accessingField(CachedProvider.pcInheritedFieldCount + 2); return cachedProvider.lastName; } - + + /** + * Enhanced static mutator for the lastName field. + * + * OpenJPA-generated method that provides optimized field modification with automatic + * state manager notification for dirty tracking. Used internally by the public setter + * to ensure proper persistence state management. + * + * @param cachedProvider CachedProvider the provider instance to modify + * @param lastName String the new lastName value + */ private static final void pcSetlastName(final CachedProvider cachedProvider, final String lastName) { if (cachedProvider.pcStateManager == null) { cachedProvider.lastName = lastName; @@ -411,7 +951,17 @@ private static final void pcSetlastName(final CachedProvider cachedProvider, fin } cachedProvider.pcStateManager.settingStringField((PersistenceCapable)cachedProvider, CachedProvider.pcInheritedFieldCount + 2, cachedProvider.lastName, lastName, 0); } - + + /** + * Enhanced static accessor for the specialty field. + * + * OpenJPA-generated method that provides optimized field access with automatic state + * manager notification. Used internally by the public getter to ensure proper field + * tracking during lazy loading and dirty checking. + * + * @param cachedProvider CachedProvider the provider instance to access + * @return String the specialty value + */ private static final String pcGetspecialty(final CachedProvider cachedProvider) { if (cachedProvider.pcStateManager == null) { return cachedProvider.specialty; @@ -419,7 +969,17 @@ private static final String pcGetspecialty(final CachedProvider cachedProvider) cachedProvider.pcStateManager.accessingField(CachedProvider.pcInheritedFieldCount + 3); return cachedProvider.specialty; } - + + /** + * Enhanced static mutator for the specialty field. + * + * OpenJPA-generated method that provides optimized field modification with automatic + * state manager notification for dirty tracking. Used internally by the public setter + * to ensure proper persistence state management. + * + * @param cachedProvider CachedProvider the provider instance to modify + * @param specialty String the new specialty value + */ private static final void pcSetspecialty(final CachedProvider cachedProvider, final String specialty) { if (cachedProvider.pcStateManager == null) { cachedProvider.specialty = specialty; @@ -427,7 +987,17 @@ private static final void pcSetspecialty(final CachedProvider cachedProvider, fi } cachedProvider.pcStateManager.settingStringField((PersistenceCapable)cachedProvider, CachedProvider.pcInheritedFieldCount + 3, cachedProvider.specialty, specialty, 0); } - + + /** + * Enhanced static accessor for the workPhone field. + * + * OpenJPA-generated method that provides optimized field access with automatic state + * manager notification. Used internally by the public getter to ensure proper field + * tracking during lazy loading and dirty checking. + * + * @param cachedProvider CachedProvider the provider instance to access + * @return String the workPhone value + */ private static final String pcGetworkPhone(final CachedProvider cachedProvider) { if (cachedProvider.pcStateManager == null) { return cachedProvider.workPhone; @@ -435,7 +1005,17 @@ private static final String pcGetworkPhone(final CachedProvider cachedProvider) cachedProvider.pcStateManager.accessingField(CachedProvider.pcInheritedFieldCount + 4); return cachedProvider.workPhone; } - + + /** + * Enhanced static mutator for the workPhone field. + * + * OpenJPA-generated method that provides optimized field modification with automatic + * state manager notification for dirty tracking. Used internally by the public setter + * to ensure proper persistence state management. + * + * @param cachedProvider CachedProvider the provider instance to modify + * @param workPhone String the new workPhone value + */ private static final void pcSetworkPhone(final CachedProvider cachedProvider, final String workPhone) { if (cachedProvider.pcStateManager == null) { cachedProvider.workPhone = workPhone; @@ -443,7 +1023,17 @@ private static final void pcSetworkPhone(final CachedProvider cachedProvider, fi } cachedProvider.pcStateManager.settingStringField((PersistenceCapable)cachedProvider, CachedProvider.pcInheritedFieldCount + 4, cachedProvider.workPhone, workPhone, 0); } - + + /** + * Checks if this entity is in a detached state. + * + * Determines whether this provider entity has been detached from its persistence context. + * Returns Boolean.TRUE if definitely detached, Boolean.FALSE if definitely attached or + * transient, or null if the detached state cannot be definitively determined. + * + * @return Boolean TRUE if detached, FALSE if attached/transient, null if indeterminate + * @see org.apache.openjpa.enhance.PersistenceCapable#pcIsDetached() + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -464,19 +1054,58 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive. + * + * Returns false to indicate that the detached state stored in this entity is not + * definitive and should not be solely relied upon for determining detachment status. + * OpenJPA uses this method in conjunction with other checks. + * + * @return boolean always returns false + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object. + * + * Returns the detached state marker used by OpenJPA to track whether this entity + * has been detached from its persistence context. The value may be null (never detached), + * DESERIALIZED (loaded via serialization), or a version indicator. + * + * @return Object the detached state marker + * @see org.apache.openjpa.enhance.PersistenceCapable#pcGetDetachedState() + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object. + * + * Assigns the detached state marker used by OpenJPA to track detachment status. + * This is typically set to null, DESERIALIZED, or a version indicator depending + * on the entity lifecycle operations. + * + * @param pcDetachedState Object the detached state marker to set + * @see org.apache.openjpa.enhance.PersistenceCapable#pcSetDetachedState(Object) + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization handler for writing this entity to an output stream. + * + * Handles Java serialization by delegating to the default serialization mechanism + * and clearing the detached state if the entity is being serialized by the persistence + * framework. This ensures proper state management during entity detachment and transfer. + * + * @param objectOutputStream ObjectOutputStream the stream to write this entity to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -484,7 +1113,18 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization handler for reading this entity from an input stream. + * + * Handles Java deserialization by marking the entity as DESERIALIZED before delegating + * to the default deserialization mechanism. This ensures OpenJPA properly recognizes + * the entity as detached after being reconstituted from serialized form. + * + * @param objectInputStream ObjectInputStream the stream to read this entity from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if a required class cannot be found during deserialization + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicLink.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicLink.java index 6380f6cf7e1..89eeba21a07 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicLink.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicLink.java @@ -23,6 +23,27 @@ import javax.persistence.Table; import javax.persistence.Entity; +/** + * JPA entity representing a link between two demographic records across different healthcare facilities + * in the CAISI integrator system. + * + * This class enables the OpenO EMR system to maintain patient demographic relationships across + * multiple healthcare facilities and CAISI (Client Access to Integrated Services and Information) + * installations. It tracks which demographic records in different facilities represent the same + * patient, supporting cross-facility care coordination and data integration. + * + * The entity enforces a unique constraint ensuring that any pair of demographics from two facilities + * can only be linked once, preventing duplicate or conflicting links. Each link includes audit + * information tracking which provider created the link and when it was established. + * + * This class is enhanced by OpenJPA at runtime to support persistence capabilities, implementing + * the PersistenceCapable interface with generated bytecode for state management, field access, + * and object identity management. + * + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity @Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "integratorDemographicFacilityId1", "caisiDemographicId1", "integratorDemographicFacilityId2", "caisiDemographicId2" }) }) public class DemographicLink extends AbstractModel implements PersistenceCapable @@ -61,7 +82,14 @@ public class DemographicLink extends AbstractModel implements Persisten static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor that initializes a new demographic link with default values. + * + * All demographic and facility ID fields are initialized to null, and the created date + * is set to the current timestamp. This constructor is used by JPA when instantiating + * entities from database records and when creating new instances programmatically. + */ public DemographicLink() { this.id = null; this.integratorDemographicFacilityId1 = null; @@ -72,74 +100,223 @@ public DemographicLink() { this.creatorCaisiProviderId = null; this.createdDate = new Date(); } - + + /** + * Retrieves the integrator facility identifier for the first demographic in the link. + * + * This represents the healthcare facility where the first demographic record is managed + * within the integrator system. The facility ID is required and cannot be null. + * + * @return Integer the integrator facility identifier for the first demographic + */ public Integer getIntegratorDemographicFacilityId1() { return pcGetintegratorDemographicFacilityId1(this); } - + + /** + * Sets the integrator facility identifier for the first demographic in the link. + * + * This value is required and cannot be null. It identifies the healthcare facility + * managing the first demographic record in the integrator system. + * + * @param integratorDemographicFacilityId1 Integer the integrator facility identifier for the first demographic (required, cannot be null) + */ public void setIntegratorDemographicFacilityId1(final Integer integratorDemographicFacilityId1) { pcSetintegratorDemographicFacilityId1(this, integratorDemographicFacilityId1); } - + + /** + * Retrieves the CAISI demographic identifier for the first patient record in the link. + * + * This is the unique identifier of the first demographic record within the CAISI system + * at the facility specified by integratorDemographicFacilityId1. This field is required + * and cannot be null. + * + * @return Integer the CAISI demographic identifier for the first patient record + */ public Integer getCaisiDemographicId1() { return pcGetcaisiDemographicId1(this); } - + + /** + * Sets the CAISI demographic identifier for the first patient record in the link. + * + * This value is required and cannot be null. It identifies the first demographic record + * within the CAISI system at the facility specified by integratorDemographicFacilityId1. + * + * @param caisiDemographicId1 Integer the CAISI demographic identifier for the first patient record (required, cannot be null) + */ public void setCaisiDemographicId1(final Integer caisiDemographicId1) { pcSetcaisiDemographicId1(this, caisiDemographicId1); } - + + /** + * Retrieves the integrator facility identifier for the second demographic in the link. + * + * This represents the healthcare facility where the second demographic record is managed + * within the integrator system. The facility ID is required and cannot be null. + * + * @return Integer the integrator facility identifier for the second demographic + */ public Integer getIntegratorDemographicFacilityId2() { return pcGetintegratorDemographicFacilityId2(this); } - + + /** + * Sets the integrator facility identifier for the second demographic in the link. + * + * This value is required and cannot be null. It identifies the healthcare facility + * managing the second demographic record in the integrator system. + * + * @param integratorDemographicFacilityId2 Integer the integrator facility identifier for the second demographic (required, cannot be null) + */ public void setIntegratorDemographicFacilityId2(final Integer integratorDemographicFacilityId2) { pcSetintegratorDemographicFacilityId2(this, integratorDemographicFacilityId2); } - + + /** + * Retrieves the CAISI demographic identifier for the second patient record in the link. + * + * This is the unique identifier of the second demographic record within the CAISI system + * at the facility specified by integratorDemographicFacilityId2. This field is required + * and cannot be null. + * + * @return Integer the CAISI demographic identifier for the second patient record + */ public Integer getCaisiDemographicId2() { return pcGetcaisiDemographicId2(this); } - + + /** + * Sets the CAISI demographic identifier for the second patient record in the link. + * + * This value is required and cannot be null. It identifies the second demographic record + * within the CAISI system at the facility specified by integratorDemographicFacilityId2. + * + * @param caisiDemographicId2 Integer the CAISI demographic identifier for the second patient record (required, cannot be null) + */ public void setCaisiDemographicId2(final Integer caisiDemographicId2) { pcSetcaisiDemographicId2(this, caisiDemographicId2); } - + + /** + * Retrieves the integrator facility identifier for the healthcare provider who created this link. + * + * This represents the facility where the provider who established this demographic link + * is registered within the integrator system. This field is required for audit purposes + * and cannot be null. + * + * @return Integer the integrator facility identifier for the provider who created the link + */ public Integer getCreatorIntegratorProviderFacilityId() { return pcGetcreatorIntegratorProviderFacilityId(this); } - + + /** + * Sets the integrator facility identifier for the healthcare provider who created this link. + * + * This value is required for audit purposes and cannot be null. It identifies the facility + * where the provider who established this demographic link is registered. + * + * @param creatorIntegratorProviderFacilityId Integer the integrator facility identifier for the provider who created the link (required, cannot be null) + */ public void setCreatorIntegratorProviderFacilityId(final Integer creatorIntegratorProviderFacilityId) { pcSetcreatorIntegratorProviderFacilityId(this, creatorIntegratorProviderFacilityId); } - + + /** + * Retrieves the CAISI provider identifier for the healthcare provider who created this link. + * + * This is the unique identifier of the provider within the CAISI system at their facility + * who established this demographic link. This field is required for audit purposes and + * cannot be null. Maximum length is 16 characters. + * + * @return String the CAISI provider identifier for the creator of this link + */ public String getCreatorCaisiProviderId() { return pcGetcreatorCaisiProviderId(this); } - + + /** + * Sets the CAISI provider identifier for the healthcare provider who created this link. + * + * This value is required for audit purposes and cannot be null. It identifies the provider + * within the CAISI system at their facility who established this demographic link. + * Maximum length is 16 characters. + * + * @param creatorCaisiProviderId String the CAISI provider identifier for the creator of this link (required, cannot be null, max 16 characters) + */ public void setCreatorCaisiProviderId(final String creatorCaisiProviderId) { pcSetcreatorCaisiProviderId(this, creatorCaisiProviderId); } - + + /** + * Retrieves the timestamp when this demographic link was created. + * + * This timestamp records when the link between the two demographic records was established. + * It is required for audit purposes and cannot be null. The timestamp is stored with + * both date and time components (TIMESTAMP type). + * + * @return Date the timestamp when this link was created + */ public Date getCreatedDate() { return pcGetcreatedDate(this); } - + + /** + * Generates a hash code for this demographic link based on its unique identifier. + * + * This implementation uses the ID field to compute the hash code, ensuring consistency + * with the equals method. Two demographic links with the same ID will produce the same + * hash code. + * + * @return int the hash code for this demographic link + */ @Override public int hashCode() { return pcGetid(this).hashCode(); } - + + /** + * Determines whether this demographic link is equal to another object. + * + * Two demographic links are considered equal if they have the same ID. This method + * only compares the ID field and assumes the provided object is a DemographicLink instance. + * + * Note: This implementation does not perform type checking or null checks, which may + * result in ClassCastException or NullPointerException if the parameter is not a valid + * DemographicLink instance. + * + * @param o Object the object to compare with this demographic link + * @return boolean true if the objects have the same ID, false otherwise + */ @Override public boolean equals(final Object o) { return pcGetid(this).equals(((DemographicLink)o).getId()); } - + + /** + * Retrieves the unique identifier for this demographic link. + * + * This is the primary key of the entity, auto-generated using an identity strategy. + * Each demographic link has a unique ID that persists across the lifetime of the record. + * + * @return Integer the unique identifier for this demographic link + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Returns the version of the OpenJPA enhancement contract implemented by this class. + * + * This method is part of the PersistenceCapable interface and is used by OpenJPA to + * determine the version of bytecode enhancement applied to this entity. The value of 2 + * indicates the current enhancement contract version. + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -171,7 +348,19 @@ protected void pcClearFields() { this.integratorDemographicFacilityId1 = null; this.integratorDemographicFacilityId2 = null; } - + + /** + * Creates a new instance of DemographicLink with the specified state manager and object ID. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA during + * entity lifecycle operations. It creates a new instance, optionally clears its fields, + * sets the state manager, and copies key fields from the provided object ID. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean if true, clears all persistent fields before setting the state manager + * @return PersistenceCapable a new DemographicLink instance configured with the specified state + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final DemographicLink demographicLink = new DemographicLink(); if (b) { @@ -181,7 +370,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final demographicLink.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)demographicLink; } - + + /** + * Creates a new instance of DemographicLink with the specified state manager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA during + * entity lifecycle operations. It creates a new instance, optionally clears its fields, + * and sets the state manager. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all persistent fields before setting the state manager + * @return PersistenceCapable a new DemographicLink instance configured with the specified state + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final DemographicLink demographicLink = new DemographicLink(); if (b) { @@ -190,11 +390,30 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final demographicLink.pcStateManager = pcStateManager; return (PersistenceCapable)demographicLink; } - + + /** + * Returns the number of persistent fields managed by OpenJPA for this entity. + * + * This method is part of the OpenJPA enhancement infrastructure and returns the count + * of all persistent fields in this class. The value of 8 represents the eight persistent + * fields defined in DemographicLink. + * + * @return int the number of persistent fields managed by OpenJPA (8) + */ protected static int pcGetManagedFieldCount() { return 8; } - + + /** + * Replaces a single persistent field value from the state manager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to restore field values during entity lifecycle operations (such as rollback or refresh). + * The field is identified by its index, and the value is retrieved from the state manager. + * + * @param n int the index of the field to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - DemographicLink.pcInheritedFieldCount; if (n2 < 0) { @@ -238,13 +457,32 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple persistent field values from the state manager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to restore multiple field values during entity lifecycle operations. It delegates + * to pcReplaceField for each field index in the array. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single persistent field value to the state manager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to retrieve field values during persistence operations (such as flush or detach). + * The field is identified by its index, and the value is provided to the state manager. + * + * @param n int the index of the field to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - DemographicLink.pcInheritedFieldCount; if (n2 < 0) { @@ -288,7 +526,16 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple persistent field values to the state manager. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to retrieve multiple field values during persistence operations. It delegates + * to pcProvideField for each field index in the array. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -338,7 +585,19 @@ protected void pcCopyField(final DemographicLink demographicLink, final int n) { } } } - + + /** + * Copies multiple persistent field values from another DemographicLink instance. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * during entity merge and refresh operations. It validates that both instances share + * the same state manager and copies the specified fields from the source instance. + * + * @param o Object the source DemographicLink instance to copy fields from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source instance has a different state manager + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final DemographicLink demographicLink = (DemographicLink)o; if (demographicLink.pcStateManager != this.pcStateManager) { @@ -351,25 +610,61 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(demographicLink, array[i]); } } - + + /** + * Retrieves the generic context associated with this entity's state manager. + * + * This method is part of the PersistenceCapable interface and returns the generic + * context object from the state manager, which may contain additional state or + * configuration information. Returns null if no state manager is set. + * + * @return Object the generic context from the state manager, or null if no state manager exists + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Retrieves the object ID for this entity from the state manager. + * + * This method is part of the PersistenceCapable interface and returns the unique + * object identifier assigned to this instance by OpenJPA. Returns null if no + * state manager is set. + * + * @return Object the object ID for this entity, or null if no state manager exists + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Determines whether this entity has been marked for deletion. + * + * This method is part of the PersistenceCapable interface and checks if the entity + * is in a deleted state within the current persistence context. Returns false if + * no state manager is set. + * + * @return boolean true if the entity is marked for deletion, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Determines whether this entity has been modified since it was last synchronized with the database. + * + * This method is part of the PersistenceCapable interface and checks if any persistent + * fields have been modified. It performs a dirty check through the RedefinitionHelper + * before querying the state manager. Returns false if no state manager is set. + * + * @return boolean true if the entity has unsaved changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -378,41 +673,114 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Determines whether this entity represents a new record not yet persisted to the database. + * + * This method is part of the PersistenceCapable interface and checks if the entity + * is in a new (transient) state within the persistence context. Returns false if + * no state manager is set. + * + * @return boolean true if the entity is new and not yet persisted, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Determines whether this entity is managed by a persistence context. + * + * This method is part of the PersistenceCapable interface and checks if the entity + * is in a persistent state (either already saved to the database or pending save). + * Returns false if no state manager is set. + * + * @return boolean true if the entity is managed by a persistence context, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Determines whether this entity is participating in a transaction. + * + * This method is part of the PersistenceCapable interface and checks if the entity + * is enrolled in the current transaction scope. Returns false if no state manager is set. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Determines whether this entity is currently being serialized. + * + * This method is part of the PersistenceCapable interface and checks if the entity + * is in the process of serialization. Returns false if no state manager is set. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty to trigger change tracking. + * + * This method is part of the PersistenceCapable interface and notifies the state + * manager that the specified field has been modified. This is used by OpenJPA to + * track changes for optimistic locking and flush operations. Does nothing if no + * state manager is set. + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager associated with this entity. + * + * This method is part of the PersistenceCapable interface and returns the OpenJPA + * state manager responsible for tracking the lifecycle and state of this entity. + * Returns null if the entity is not currently managed. + * + * @return StateManager the state manager for this entity, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for this entity used for optimistic locking. + * + * This method is part of the PersistenceCapable interface and returns the version + * object from the state manager, which is used to detect concurrent modifications. + * Returns null if no state manager is set. + * + * @return Object the version information for optimistic locking, or null if no state manager exists + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + * This method is part of the PersistenceCapable interface and is used by OpenJPA + * to change the state manager associated with this entity. If a state manager already + * exists, it delegates to the current state manager to perform the replacement, + * allowing for state manager chaining. + * + * @param pcStateManager StateManager the new state manager to associate with this entity + * @throws SecurityException if the state manager replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -420,27 +788,84 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + * This method is part of the PersistenceCapable interface but is not implemented + * for this entity type. Attempting to call this method will result in an InternalException. + * + * @param fieldSupplier FieldSupplier the field supplier to read key field values from + * @param o Object the object ID to copy key fields to + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values to an object ID. + * + * This method is part of the PersistenceCapable interface but is not implemented + * for this entity type. Attempting to call this method will result in an InternalException. + * + * @param o Object the object ID to copy key fields to + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to populate the ID field from an IntId object. The field consumer is used to set + * the id field value at the appropriate field index. + * + * @param fieldConsumer FieldConsumer the field consumer to write key field values to + * @param o Object the IntId object to copy the key field from + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(5 + DemographicLink.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key field values from an object ID directly to this entity. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to populate the ID field from an IntId object. The integer ID value is extracted + * from the IntId and assigned to the id field. + * + * @param o Object the IntId object to copy the key field from + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to create an IntId object from a string representation of the ID. The IntId is + * constructed with the DemographicLink class type and the provided string value. + * + * @param o Object the string representation of the ID + * @return Object a new IntId instance for this entity type + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((DemographicLink.class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink != null) ? DemographicLink.class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink : (DemographicLink.class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink = class$("ca.openosp.openo.caisi_integrator.dao.DemographicLink")), (String)o); } - + + /** + * Creates a new object ID instance from this entity's current ID value. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to create an IntId object representing this entity's identity. The IntId is + * constructed with the DemographicLink class type and this entity's id field value. + * + * @return Object a new IntId instance containing this entity's ID + */ public Object pcNewObjectIdInstance() { return new IntId((DemographicLink.class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink != null) ? DemographicLink.class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink : (DemographicLink.class$Lca$openosp$openo$caisi_integrator$dao$DemographicLink = class$("ca.openosp.openo.caisi_integrator.dao.DemographicLink")), this.id); } @@ -572,7 +997,18 @@ private static final void pcSetintegratorDemographicFacilityId2(final Demographi } demographicLink.pcStateManager.settingObjectField((PersistenceCapable)demographicLink, DemographicLink.pcInheritedFieldCount + 7, (Object)demographicLink.integratorDemographicFacilityId2, (Object)integratorDemographicFacilityId2, 0); } - + + /** + * Determines whether this entity is in a detached state. + * + * This method is part of the PersistenceCapable interface and checks if the entity + * has been detached from its persistence context. The determination is based on: + * - If a state manager exists, it delegates to the state manager's isDetached() method + * - If no state manager exists, it checks the detached state field and ID field + * - Returns null if the detached state is ambiguous + * + * @return Boolean true if detached, false if attached, or null if the state cannot be determined + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -596,15 +1032,33 @@ public Boolean pcIsDetached() { return null; } } - + private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * + * This method is part of the PersistenceCapable interface and returns the detached + * state information maintained by OpenJPA for detached entity management. The state + * may be null, DESERIALIZED, or contain version information for optimistic locking. + * + * @return Object the detached state information, or null if not set + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + * This method is part of the PersistenceCapable interface and is called by OpenJPA + * to establish or update the detached state information for this entity. This state + * is used to track entity versions and manage reattachment to persistence contexts. + * + * @param pcDetachedState Object the detached state information to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicPushDate.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicPushDate.java index cae7538cdc8..2c8fd737ebc 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicPushDate.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/DemographicPushDate.java @@ -20,11 +20,44 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; +/** + * JPA entity representing the last push date for demographic data synchronization + * in the CAISI integrator system. + * + *

    This entity tracks when demographic information was last pushed to external + * healthcare facilities or systems. It uses a composite primary key consisting of + * a facility identifier and an integer ID to uniquely identify push date records + * across multiple facilities.

    + * + *

    The class is enhanced by OpenJPA for persistence management and implements + * the PersistenceCapable interface to support JPA bytecode enhancement features + * including field tracking, state management, and optimized database operations.

    + * + *

    Healthcare Context: In healthcare interoperability scenarios, + * tracking when patient demographic data was last synchronized between systems is + * critical for maintaining data consistency and avoiding duplicate updates. This + * entity supports the CAISI (Client Access to Integrated Services and Information) + * integrator functionality.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see org.apache.openjpa.enhance.PersistenceCapable + * @since 2026-01-24 + */ @Entity public class DemographicPushDate extends AbstractModel implements PersistenceCapable { + /** + * Composite primary key containing facility ID and integer identifier. + * This embedded ID uniquely identifies demographic push date records across facilities. + */ @EmbeddedId private FacilityIdIntegerCompositePk id; + + /** + * Timestamp of the last demographic data push operation. + * This field is indexed for efficient querying and cannot be null. + */ @Temporal(TemporalType.TIMESTAMP) @Column(nullable = false) @Index @@ -40,29 +73,64 @@ public class DemographicPushDate extends AbstractModelThe entity implements OpenJPA's PersistenceCapable interface for enhanced persistence + * capabilities and includes automatic field tracking through bytecode enhancement. Data + * caching is explicitly disabled to ensure real-time accuracy of audit records.

    + * + *

    This log is append-only by design - records cannot be updated or deleted after creation, + * enforced through JPA lifecycle callbacks that throw UnsupportedOperationException on + * modification attempts.

    + * + * @see AbstractModel + * @see PersistenceCapable + * @see ActionPrefix + * @see DataActionValue + * @since 2026-01-24 + */ @Entity @DataCache(enabled = false) public class EventLog extends AbstractModel implements PersistenceCapable @@ -57,6 +80,13 @@ public class EventLog extends AbstractModel implements PersistenceCapable private transient Object pcDetachedState; private static final long serialVersionUID; + /** + * Constructs a new EventLog with default values. + * + * Initializes a new event log entry with the current timestamp and null values for + * source, action, and parameters. The timestamp is set to the current system time + * at the moment of construction. + */ public EventLog() { this.id = null; this.date = new GregorianCalendar(); @@ -65,53 +95,122 @@ public EventLog() { this.parameters = null; } + /** + * Gets the unique identifier for this event log entry. + * + * @return Long the unique identifier, or null if not yet persisted + */ @Override public Long getId() { return pcGetid(this); } + /** + * Gets the timestamp when this event occurred. + * + * @return Calendar the event timestamp, never null + */ public Calendar getDate() { return pcGetdate(this); } + /** + * Sets the timestamp when this event occurred. + * + * @param date Calendar the event timestamp, must not be null + */ public void setDate(final Calendar date) { pcSetdate(this, date); } + /** + * Gets the source system or component that generated this event. + * + * @return String the event source identifier, may be null + */ public String getSource() { return pcGetsource(this); } + /** + * Sets the source system or component that generated this event. + * + * @param source String the event source identifier, may be null + */ public void setSource(final String source) { pcSetsource(this, source); } + /** + * Gets the action type that was performed. + * + * Typically formatted as "PREFIX.VALUE" where PREFIX is from ActionPrefix enum + * (DATA, LOGIC, PERFORMANCE) and VALUE describes the specific operation. + * + * @return String the action identifier, never null + */ public String getAction() { return pcGetaction(this); } + /** + * Sets the action type that was performed. + * + * @param action String the action identifier, must not be null + */ public void setAction(final String action) { pcSetaction(this, action); } + /** + * Gets additional parameters or context for this event. + * + * @return String optional event parameters or metadata, may be null + */ public String getParameters() { return pcGetparameters(this); } + /** + * Sets additional parameters or context for this event. + * + * @param parameters String optional event parameters or metadata, may be null + */ public void setParameters(final String parameters) { pcSetparameters(this, parameters); } + /** + * JPA lifecycle callback that prevents deletion of event log entries. + * + * This method enforces the immutability of audit logs by throwing an exception + * whenever an attempt is made to delete an event log record. + * + * @throws UnsupportedOperationException always thrown to prevent deletion + */ @PreRemove protected void jpaPreventDelete() { throw new UnsupportedOperationException("Remove is not allowed for this type of item."); } + /** + * JPA lifecycle callback that prevents updates to event log entries. + * + * This method enforces the immutability of audit logs by throwing an exception + * whenever an attempt is made to modify an existing event log record. + * + * @throws UnsupportedOperationException always thrown to prevent updates + */ @PreUpdate protected void jpaPreventUpdate() { throw new UnsupportedOperationException("Update is not allowed for this type of item."); } + /** + * Gets the OpenJPA enhancement contract version for this persistent class. + * + * @return int the enhancement contract version, always 2 + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -133,6 +232,12 @@ public int pcGetEnhancementContractVersion() { } } + /** + * Clears all persistent fields to null values. + * + * This method is used internally by OpenJPA during persistence operations + * to reset the entity state. + */ protected void pcClearFields() { this.action = null; this.date = null; @@ -141,6 +246,14 @@ protected void pcClearFields() { this.source = null; } + /** + * Creates a new instance of EventLog with the specified state manager and object ID. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean if true, clears all fields after construction + * @return PersistenceCapable the newly created EventLog instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final EventLog eventLog = new EventLog(); if (b) { @@ -151,6 +264,13 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final return (PersistenceCapable)eventLog; } + /** + * Creates a new instance of EventLog with the specified state manager. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all fields after construction + * @return PersistenceCapable the newly created EventLog instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final EventLog eventLog = new EventLog(); if (b) { @@ -160,10 +280,21 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final return (PersistenceCapable)eventLog; } + /** + * Gets the count of managed persistent fields in this entity. + * + * @return int the number of managed fields, always 5 (action, date, id, parameters, source) + */ protected static int pcGetManagedFieldCount() { return 5; } + /** + * Replaces a single field value using the state manager. + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - EventLog.pcInheritedFieldCount; if (n2 < 0) { @@ -196,12 +327,23 @@ public void pcReplaceField(final int n) { } } + /** + * Replaces multiple field values using the state manager. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a single field value to the state manager. + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - EventLog.pcInheritedFieldCount; if (n2 < 0) { @@ -234,12 +376,24 @@ public void pcProvideField(final int n) { } } + /** + * Provides multiple field values to the state manager. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } + /** + * Copies a single field value from another EventLog instance. + * + * @param eventLog EventLog the source instance to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final EventLog eventLog, final int n) { final int n2 = n - EventLog.pcInheritedFieldCount; if (n2 < 0) { @@ -272,6 +426,14 @@ protected void pcCopyField(final EventLog eventLog, final int n) { } } + /** + * Copies multiple field values from another EventLog instance. + * + * @param o Object the source EventLog instance to copy from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if state managers don't match + * @throws IllegalStateException if state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final EventLog eventLog = (EventLog)o; if (eventLog.pcStateManager != this.pcStateManager) { @@ -285,6 +447,11 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Gets the generic context from the state manager. + * + * @return Object the generic context, or null if no state manager + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; @@ -292,6 +459,11 @@ public Object pcGetGenericContext() { return this.pcStateManager.getGenericContext(); } + /** + * Fetches the object ID from the state manager. + * + * @return Object the object ID, or null if no state manager + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; @@ -299,10 +471,20 @@ public Object pcFetchObjectId() { return this.pcStateManager.fetchObjectId(); } + /** + * Checks if this instance is marked as deleted in the persistence context. + * + * @return boolean true if deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } + /** + * Checks if this instance has been modified since it was loaded or last persisted. + * + * @return boolean true if the instance has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -312,22 +494,47 @@ public boolean pcIsDirty() { return pcStateManager.isDirty(); } + /** + * Checks if this instance is newly created and not yet persisted. + * + * @return boolean true if new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } + /** + * Checks if this instance is managed by a persistence context. + * + * @return boolean true if persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } + /** + * Checks if this instance is part of an active transaction. + * + * @return boolean true if transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } + /** + * Checks if this instance is currently being serialized. + * + * @return boolean true if serializing, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } + /** + * Marks the specified field as dirty (modified). + * + * @param s String the name of the field to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; @@ -335,10 +542,20 @@ public void pcDirty(final String s) { this.pcStateManager.dirty(s); } + /** + * Gets the current state manager for this instance. + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } + /** + * Gets the version identifier for optimistic locking. + * + * @return Object the version identifier, or null if no state manager + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; @@ -346,6 +563,12 @@ public Object pcGetVersion() { return this.pcStateManager.getVersion(); } + /** + * Replaces the current state manager with a new one. + * + * @param pcStateManager StateManager the new state manager to use + * @throws SecurityException if the replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -354,26 +577,61 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key fields to an object ID using a field supplier. + * + * @param fieldSupplier FieldSupplier the field supplier to use + * @param o Object the object ID to copy to + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } + /** + * Copies key fields to an object ID. + * + * @param o Object the object ID to copy to + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } + /** + * Copies key fields from an object ID using a field consumer. + * + * @param fieldConsumer FieldConsumer the field consumer to use + * @param o Object the object ID to copy from (must be a LongId) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(2 + EventLog.pcInheritedFieldCount, (Object)Long.valueOf(((LongId)o).getId())); } + /** + * Copies key fields from an object ID. + * + * @param o Object the object ID to copy from (must be a LongId) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Long.valueOf(((LongId)o).getId()); } + /** + * Creates a new object ID instance from a string. + * + * @param o Object the string representation of the ID + * @return Object a new LongId instance + */ public Object pcNewObjectIdInstance(final Object o) { return new LongId((EventLog.class$Lca$openosp$openo$caisi_integrator$dao$EventLog != null) ? EventLog.class$Lca$openosp$openo$caisi_integrator$dao$EventLog : (EventLog.class$Lca$openosp$openo$caisi_integrator$dao$EventLog = class$("ca.openosp.openo.caisi_integrator.dao.EventLog")), (String)o); } + /** + * Creates a new object ID instance using this entity's current ID. + * + * @return Object a new LongId instance + */ public Object pcNewObjectIdInstance() { return new LongId((EventLog.class$Lca$openosp$openo$caisi_integrator$dao$EventLog != null) ? EventLog.class$Lca$openosp$openo$caisi_integrator$dao$EventLog : (EventLog.class$Lca$openosp$openo$caisi_integrator$dao$EventLog = class$("ca.openosp.openo.caisi_integrator.dao.EventLog")), this.id); } @@ -458,6 +716,14 @@ private static final void pcSetsource(final EventLog eventLog, final String sour eventLog.pcStateManager.settingStringField((PersistenceCapable)eventLog, EventLog.pcInheritedFieldCount + 4, eventLog.source, source, 0); } + /** + * Checks if this instance is in a detached state. + * + * A detached instance has been previously persisted but is no longer managed + * by an active persistence context. + * + * @return Boolean true if detached, false if attached, null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -482,18 +748,39 @@ public Boolean pcIsDetached() { } } + /** + * Determines if the detached state is definitively known. + * + * @return boolean always returns false + */ private boolean pcisDetachedStateDefinitive() { return false; } + /** + * Gets the detached state marker for this instance. + * + * @return Object the detached state marker, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } + /** + * Sets the detached state marker for this instance. + * + * @param pcDetachedState Object the detached state marker to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } + /** + * Custom serialization method for this persistent object. + * + * @param objectOutputStream ObjectOutputStream the output stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -502,23 +789,54 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE } } + /** + * Custom deserialization method for this persistent object. + * + * @param objectInputStream ObjectInputStream the input stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if a class cannot be found during deserialization + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); } + /** + * Enumeration of event action prefixes for categorizing log entries. + * + * Action prefixes categorize events into broad operational areas to enable + * filtering and analysis of system behavior. + */ public enum ActionPrefix { - DATA, - LOGIC, + /** Data-related operations such as reads, writes, and searches */ + DATA, + + /** Business logic and workflow operations */ + LOGIC, + + /** Performance monitoring and metrics collection */ PERFORMANCE; } + /** + * Enumeration of data action values for logging specific data operations. + * + * These values are typically combined with the DATA prefix to create + * complete action identifiers (e.g., "DATA.READ", "DATA.WRITE"). + */ public enum DataActionValue { - READ, - WRITE, - DELETE, + /** Data retrieval operation */ + READ, + + /** Data creation or modification operation */ + WRITE, + + /** Data deletion operation */ + DELETE, + + /** Search query result */ SEARCH_RESULT; } } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/Facility.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/Facility.java index 09dbdde6fe2..636e5ec4729 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/Facility.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/Facility.java @@ -27,6 +27,27 @@ import javax.persistence.Entity; import ca.openosp.openo.caisi_integrator.util.Named; +/** + * Represents a healthcare facility entity in the CAISI Integrator system. + * + *

    This entity manages facility authentication and tracking for the OpenO EMR CAISI integrator module, + * which enables inter-facility data sharing and communication across multiple healthcare installations. + * Each facility maintains its own credentials, login tracking, and enabled/disabled status for secure + * system integration.

    + * + *

    The class is JPA-enhanced using OpenJPA for persistent field management and implements the + * PersistenceCapable interface to support advanced ORM features including field-level state tracking, + * detachment, and serialization.

    + * + *

    Security Note: Passwords are stored as SHA-1 hashed byte arrays and never + * returned in plain text. All password operations use secure hashing via {@link EncryptionUtils}.

    + * + * @see AbstractModel + * @see Named + * @see PersistenceCapable + * @see EncryptionUtils + * @since 2026-01-24 + */ @Entity(name = "IntegratorFacility") public class Facility extends AbstractModel implements Named, PersistenceCapable { @@ -55,7 +76,14 @@ public class Facility extends AbstractModel implements Named, Persisten static /* synthetic */ Class class$L$B; static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$Facility; private transient Object pcDetachedState; - + + /** + * Constructs a new Facility instance with default values. + * + *

    Initializes all fields to their default values: id, name, password, and lastLogin + * are set to null, and disabled is set to false. This constructor is used by JPA for + * entity instantiation.

    + */ public Facility() { this.id = null; this.name = null; @@ -63,20 +91,59 @@ public Facility() { this.lastLogin = null; this.disabled = false; } - + + /** + * Retrieves the unique identifier for this facility. + * + *

    This method is persistence-aware and will properly handle field access tracking + * when the entity is managed by the JPA persistence context.

    + * + * @return Integer the unique facility identifier, or null if not yet persisted + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Retrieves the unique name of this facility. + * + *

    The facility name is a unique identifier (max 32 characters) used for facility + * identification and authentication in the CAISI integrator system.

    + * + * @return String the facility name, or null if not set + */ public String getName() { return pcGetname(this); } - + + /** + * Sets the unique name for this facility. + * + *

    The provided name will be validated and normalized using {@link MiscUtils#validateAndNormaliseUserName(String)} + * to ensure it meets the required format and length constraints (max 32 characters).

    + * + * @param name String the facility name to set (will be validated and normalized) + * @throws IllegalArgumentException if the name fails validation + */ public void setName(final String name) { pcSetname(this, MiscUtils.validateAndNormaliseUserName(name)); } - + + /** + * Sets the password for this facility using secure SHA-1 hashing. + * + *

    The provided plain-text password is immediately hashed using SHA-1 via {@link EncryptionUtils#getSha1(String)} + * and stored as a byte array. The plain-text password is never persisted. Debug logging is enabled + * to track password operations when the logger is in DEBUG mode.

    + * + *

    Security Note: This method stores the password as a SHA-1 hash. While SHA-1 + * is considered cryptographically weak for some applications, it is used here for facility authentication + * in the integrator system.

    + * + * @param password String the plain-text password to hash and store + * @throws IllegalArgumentException if password is null + */ public void setPassword(final String password) { if (password == null) { throw new IllegalArgumentException("password can't be null"); @@ -87,15 +154,44 @@ public void setPassword(final String password) { Facility.logger.debug((Object)("setPassword provided pw enc : " + Arrays.toString(EncryptionUtils.getSha1(password)))); } } - + + /** + * Retrieves the facility password. + * + *

    Security Note: This method always returns null to prevent password exposure. + * The actual hashed password is stored internally but cannot be retrieved. Use {@link #checkPassword(String)} + * to verify passwords or {@link #getPasswordAsBase64()} to get the Base64-encoded hash for system integration.

    + * + * @return String always returns null for security reasons + */ public String getPassword() { return null; } - + + /** + * Retrieves the hashed password as a Base64-encoded string. + * + *

    This method is used for secure password transmission in inter-facility communication + * within the CAISI integrator system. The returned value is the Base64 encoding of the + * SHA-1 hashed password bytes.

    + * + * @return String the Base64-encoded password hash + * @throws NullPointerException if password has not been set + */ public String getPasswordAsBase64() { return DatatypeConverter.printBase64Binary(pcGetpassword(this)); } - + + /** + * Verifies if the provided password matches the stored hashed password. + * + *

    This method hashes the provided plain-text password using SHA-1 and compares it + * byte-for-byte with the stored password hash. Debug logging is enabled to track + * password verification attempts when the logger is in DEBUG mode.

    + * + * @param password String the plain-text password to verify + * @return boolean true if the provided password matches the stored hash, false otherwise + */ public boolean checkPassword(final String password) { if (Facility.logger.isDebugEnabled()) { Facility.logger.debug((Object)("provided pw : " + password)); @@ -104,19 +200,52 @@ public boolean checkPassword(final String password) { } return password != null && Arrays.equals(pcGetpassword(this), EncryptionUtils.getSha1(password)); } - + + /** + * Retrieves the timestamp of the last successful login for this facility. + * + *

    This field tracks facility authentication activity in the CAISI integrator system + * and can be used for security auditing and session management.

    + * + * @return Calendar the last login timestamp, or null if the facility has never logged in + */ public Calendar getLastLogin() { return pcGetlastLogin(this); } - + + /** + * Sets the timestamp of the last successful login for this facility. + * + *

    This method should be called after successful facility authentication to update + * the login tracking timestamp.

    + * + * @param lastLogin Calendar the timestamp of the last login, or null to clear + */ public void setLastLogin(final Calendar lastLogin) { pcSetlastLogin(this, lastLogin); } - + + /** + * Checks if this facility is currently disabled. + * + *

    Disabled facilities are not allowed to authenticate or participate in the CAISI + * integrator system. This flag provides an administrative control to temporarily or + * permanently revoke facility access without deleting the facility record.

    + * + * @return boolean true if the facility is disabled, false if enabled + */ public boolean isDisabled() { return pcGetdisabled(this); } - + + /** + * Sets the disabled status for this facility. + * + *

    Setting this to true will prevent the facility from authenticating or participating + * in the CAISI integrator system. Setting to false will re-enable the facility.

    + * + * @param disabled boolean true to disable the facility, false to enable it + */ public void setDisabled(final boolean disabled) { pcSetdisabled(this, disabled); } @@ -128,7 +257,16 @@ public void setDisabled(final boolean disabled) { Facility.pcFieldFlags = new byte[] { 26, 26, 26, 26, 26 }; PCRegistry.register((Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility != null) ? Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility : (Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility = class$("ca.openosp.openo.caisi_integrator.dao.Facility")), Facility.pcFieldNames, Facility.pcFieldTypes, Facility.pcFieldFlags, Facility.pcPCSuperclass, "Facility", (PersistenceCapable)new Facility()); } - + + /** + * Returns the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to verify that the entity bytecode enhancement is compatible with the current + * OpenJPA version.

    + * + * @return int the enhancement contract version (currently 2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -149,7 +287,19 @@ protected void pcClearFields() { this.name = null; this.password = null; } - + + /** + * Creates a new Facility instance with the specified state manager and object ID. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to create new managed instances during entity loading and object graph navigation. + * The instance is initialized with the provided StateManager and object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with this instance + * @param o Object the object ID containing the primary key value + * @param b boolean true to clear all fields to default values, false to leave uninitialized + * @return PersistenceCapable a new Facility instance with the specified configuration + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final Facility facility = new Facility(); if (b) { @@ -159,7 +309,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final facility.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)facility; } - + + /** + * Creates a new Facility instance with the specified state manager. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to create new managed instances. Unlike the three-parameter version, this does not + * copy key fields from an object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with this instance + * @param b boolean true to clear all fields to default values, false to leave uninitialized + * @return PersistenceCapable a new Facility instance with the specified configuration + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final Facility facility = new Facility(); if (b) { @@ -172,7 +333,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final protected static int pcGetManagedFieldCount() { return 5; } - + + /** + * Replaces a single persistent field value from the state manager. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to restore field values during entity loading, rollback, and refresh operations. + * The field index is adjusted for inheritance and mapped to the appropriate field.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - Facility.pcInheritedFieldCount; if (n2 < 0) { @@ -204,13 +375,33 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple persistent field values from the state manager. + * + *

    This method is part of the PersistenceCapable interface and provides a batch + * operation for replacing multiple fields at once. It delegates to {@link #pcReplaceField(int)} + * for each field index in the array.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single persistent field value to the state manager. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to capture field values during operations like flush, serialization, and detachment. + * The field index is adjusted for inheritance and the appropriate field value is + * provided to the state manager.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - Facility.pcInheritedFieldCount; if (n2 < 0) { @@ -242,7 +433,16 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple persistent field values to the state manager. + * + *

    This method is part of the PersistenceCapable interface and provides a batch + * operation for providing multiple fields at once. It delegates to {@link #pcProvideField(int)} + * for each field index in the array.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -280,7 +480,19 @@ protected void pcCopyField(final Facility facility, final int n) { } } } - + + /** + * Copies multiple persistent field values from another Facility instance. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * for operations like merge and refresh. It copies the specified fields from the + * source object to this instance. Both objects must be managed by the same state manager.

    + * + * @param o Object the source Facility instance to copy fields from + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the objects have different state managers + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final Facility facility = (Facility)o; if (facility.pcStateManager != this.pcStateManager) { @@ -293,25 +505,57 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(facility, array[i]); } } - + + /** + * Retrieves the generic context from the state manager. + * + *

    This method is part of the PersistenceCapable interface and provides access to + * OpenJPA's generic context object, which can be used for custom state management.

    + * + * @return Object the generic context from the state manager, or null if not managed + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Retrieves the object ID for this entity. + * + *

    This method is part of the PersistenceCapable interface and returns the JPA + * object ID that uniquely identifies this entity instance within the persistence context.

    + * + * @return Object the object ID, or null if not managed + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been marked for deletion. + * + *

    This method is part of the PersistenceCapable interface and indicates whether + * this entity has been deleted within the current transaction.

    + * + * @return boolean true if deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has unsaved changes. + * + *

    This method is part of the PersistenceCapable interface and indicates whether + * any fields have been modified since the last flush or load operation.

    + * + * @return boolean true if any fields have been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -320,41 +564,106 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this is a new entity that has not yet been persisted to the database. + * + *

    This method is part of the PersistenceCapable interface and indicates whether + * this entity was created in the current transaction and has not yet been flushed.

    + * + * @return boolean true if this is a new unpersisted entity, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by a persistence context). + * + *

    This method is part of the PersistenceCapable interface and indicates whether + * this entity is currently managed by OpenJPA and will be persisted to the database.

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is transactional. + * + *

    This method is part of the PersistenceCapable interface and indicates whether + * this entity is participating in the current transaction and will be tracked for changes.

    + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + *

    This method is part of the PersistenceCapable interface and is used during + * serialization to determine whether to include detached state information.

    + * + * @return boolean true if the entity is currently being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty (modified) by name. + * + *

    This method is part of the PersistenceCapable interface and notifies the state + * manager that the specified field has been modified and should be tracked for updates.

    + * + * @param s String the name of the field that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager associated with this entity. + * + *

    This method is part of the PersistenceCapable interface and provides access to + * the OpenJPA StateManager that tracks this entity's persistence state.

    + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for this entity. + * + *

    This method is part of the PersistenceCapable interface and returns the version + * object used for optimistic locking, if configured.

    + * + * @return Object the version object, or null if not managed or versioning not enabled + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager for this entity. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to transfer entity management between persistence contexts or to detach entities.

    + * + * @param pcStateManager StateManager the new state manager to associate with this entity + * @throws SecurityException if state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -362,27 +671,83 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * + *

    This method is part of the PersistenceCapable interface. This implementation + * throws InternalException as it is not supported for entities with single-field + * primary keys (ID is auto-generated).

    + * + * @param fieldSupplier FieldSupplier the field supplier to receive key field values + * @param o Object the object ID to populate + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + *

    This method is part of the PersistenceCapable interface. This implementation + * throws InternalException as it is not supported for entities with single-field + * primary keys (ID is auto-generated).

    + * + * @param o Object the object ID to populate + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to extract the primary key value from an IntId object and provide it to the field + * consumer for entity initialization.

    + * + * @param fieldConsumer FieldConsumer the field consumer to store key field values + * @param o Object the IntId object containing the primary key value + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(1 + Facility.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key fields from an object ID directly into this entity. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to extract the primary key value from an IntId object and set it directly on this entity.

    + * + * @param o Object the IntId object containing the primary key value + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to create IntId instances from string representations of primary keys.

    + * + * @param o Object the string representation of the primary key + * @return Object a new IntId instance for this entity type + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility != null) ? Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility : (Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility = class$("ca.openosp.openo.caisi_integrator.dao.Facility")), (String)o); } - + + /** + * Creates a new object ID instance using this entity's current primary key. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to create IntId instances containing this entity's current primary key value.

    + * + * @return Object a new IntId instance containing this entity's ID + */ public Object pcNewObjectIdInstance() { return new IntId((Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility != null) ? Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility : (Facility.class$Lca$openosp$openo$caisi_integrator$dao$Facility = class$("ca.openosp.openo.caisi_integrator.dao.Facility")), this.id); } @@ -466,7 +831,17 @@ private static final void pcSetpassword(final Facility facility, final byte[] pa } facility.pcStateManager.settingObjectField((PersistenceCapable)facility, Facility.pcInheritedFieldCount + 4, (Object)facility.password, (Object)password, 0); } - + + /** + * Determines whether this entity is in a detached state. + * + *

    This method is part of the PersistenceCapable interface and checks if the entity + * has been detached from its persistence context. A detached entity has been loaded + * but is no longer managed, often used for transferring entities between layers or + * for lazy loading outside a transaction.

    + * + * @return Boolean true if detached, false if attached, or null if state cannot be determined + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -494,11 +869,28 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * + *

    This method is part of the PersistenceCapable interface and returns the state + * information stored when the entity was detached. This is used by OpenJPA to track + * which fields have been loaded and modified in detached entities.

    + * + * @return Object the detached state, or null if not detached or PersistenceCapable.DESERIALIZED if deserialized + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + *

    This method is part of the PersistenceCapable interface and is used by OpenJPA + * to store state information when detaching entities or to mark deserialized entities.

    + * + * @param pcDetachedState Object the detached state to store, or PersistenceCapable.DESERIALIZED for deserialized entities + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdDemographicIssueCompositePk.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdDemographicIssueCompositePk.java index 468ca574817..c77a6407020 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdDemographicIssueCompositePk.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdDemographicIssueCompositePk.java @@ -17,6 +17,39 @@ import org.apache.openjpa.enhance.PersistenceCapable; import java.io.Serializable; +/** + * Composite primary key for facility-demographic-issue associations in the CAISI Integrator system. + * + *

    This embeddable class represents a unique composite key that identifies a specific medical issue + * or health condition associated with a patient (demographic) at a particular healthcare facility + * within the CAISI (Client Access to Integrated Services and Information) Integrator framework. + * The composite key ensures that each combination of facility, patient, code type, and issue code + * is unique across the integrated healthcare system.

    + * + *

    The class is enhanced by Apache OpenJPA for persistence capabilities, implementing the + * PersistenceCapable interface to support JPA entity management. All OpenJPA-generated methods + * (prefixed with 'pc') are used internally by the persistence framework for state management, + * field access tracking, and object lifecycle operations.

    + * + *

    Key Components:

    + *
      + *
    • integratorFacilityId - Identifies the healthcare facility in the integrator system
    • + *
    • caisiDemographicId - Identifies the patient/demographic record
    • + *
    • codeType - The medical coding system used (ICD9, ICD10, SNOMED, etc.)
    • + *
    • issueCode - The specific medical code within the coding system
    • + *
    + * + *

    Healthcare Context:

    + *

    In Canadian healthcare systems, the CAISI Integrator enables data sharing and integration + * across multiple healthcare facilities. This composite key structure supports tracking of various + * medical issues (diagnoses, preventions, medications) using different standardized coding systems, + * ensuring data consistency and preventing duplicate entries across the integrated network.

    + * + * @see ca.openosp.openo.caisi_integrator.util.CodeType + * @see org.apache.openjpa.enhance.PersistenceCapable + * + * @since 2026-01-24 + */ @Embeddable public class FacilityIdDemographicIssueCompositePk implements Serializable, PersistenceCapable { @@ -41,56 +74,158 @@ public class FacilityIdDemographicIssueCompositePk implements Serializable, Pers static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$FacilityIdDemographicIssueCompositePk; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor that initializes all composite key fields to null. + * + *

    This no-argument constructor is required by JPA for entity instantiation + * and is used by the persistence framework during object creation and deserialization.

    + */ public FacilityIdDemographicIssueCompositePk() { this.integratorFacilityId = null; this.caisiDemographicId = null; this.codeType = null; this.issueCode = null; } - + + /** + * Retrieves the integrator facility identifier. + * + *

    The facility ID identifies which healthcare facility within the CAISI Integrator + * network this issue record belongs to. This enables multi-facility data integration + * while maintaining facility-specific patient issue tracking.

    + * + * @return Integer the unique identifier of the healthcare facility in the integrator system, + * or null if not set + */ public Integer getIntegratorFacilityId() { return pcGetintegratorFacilityId(this); } - + + /** + * Sets the integrator facility identifier. + * + * @param integratorFacilityId Integer the unique identifier of the healthcare facility + * in the integrator system + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { pcSetintegratorFacilityId(this, integratorFacilityId); } - + + /** + * Retrieves the CAISI demographic identifier. + * + *

    The demographic ID uniquely identifies the patient within the CAISI system. + * This links the medical issue to a specific patient's healthcare record.

    + * + * @return Integer the unique identifier of the patient/demographic record, + * or null if not set + */ public Integer getCaisiDemographicId() { return pcGetcaisiDemographicId(this); } - + + /** + * Sets the CAISI demographic identifier. + * + * @param caisiDemographicId Integer the unique identifier of the patient/demographic record + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { pcSetcaisiDemographicId(this, caisiDemographicId); } - + + /** + * Retrieves the medical issue code. + * + *

    The issue code is the specific medical code within the coding system defined by + * the codeType field. For example, if codeType is ICD10, this might be "E11.9" for + * Type 2 diabetes mellitus without complications.

    + * + * @return String the medical issue code (maximum 64 characters), + * or null if not set + */ public String getIssueCode() { return pcGetissueCode(this); } - + + /** + * Sets the medical issue code. + * + * @param issueCode String the medical issue code (maximum 64 characters) + */ public void setIssueCode(final String issueCode) { pcSetissueCode(this, issueCode); } - + + /** + * Retrieves the medical coding system type. + * + *

    The code type specifies which standardized medical coding system is being used + * for the issue code. Supported types include ICD9, ICD10, SNOMED, SNOMED_CORE, + * DRUG, PREVENTION, CUSTOM_ISSUE, and SYSTEM.

    + * + * @return CodeType the medical coding system enumeration value, + * or null if not set + */ public CodeType getCodeType() { return pcGetcodeType(this); } - + + /** + * Sets the medical coding system type. + * + * @param codeType CodeType the medical coding system enumeration value + */ public void setCodeType(final CodeType codeType) { pcSetcodeType(this, codeType); } - + + /** + * Returns a string representation of this composite key. + * + *

    The format is: facilityId:demographicId:codeType:issueCode

    + *

    Example: "123:456:ICD10:E11.9"

    + * + * @return String representation in colon-delimited format + */ @Override public String toString() { return "" + pcGetintegratorFacilityId(this) + ':' + pcGetcaisiDemographicId(this) + ':' + pcGetcodeType(this) + ':' + pcGetissueCode(this); } - + + /** + * Returns a hash code value for this composite key. + * + *

    Note: This implementation only uses caisiDemographicId for the hash code, + * which may lead to hash collisions when the same demographic has multiple issues. + * This is acceptable for the current use case but may impact performance in large + * hash-based collections.

    + * + * @return int hash code based on the demographic ID + */ @Override public int hashCode() { return pcGetcaisiDemographicId(this); } - + + /** + * Compares this composite key with another object for equality. + * + *

    Two FacilityIdDemographicIssueCompositePk instances are considered equal if all four + * component fields match:

    + *
      + *
    • integratorFacilityId must be equal
    • + *
    • caisiDemographicId must be equal
    • + *
    • issueCode must be equal
    • + *
    • codeType must be the same enum value
    • + *
    + * + *

    If any RuntimeException occurs during comparison (e.g., NullPointerException, + * ClassCastException), the method returns false rather than propagating the exception.

    + * + * @param o Object the object to compare with + * @return boolean true if the objects are equal, false otherwise + */ @Override public boolean equals(final Object o) { try { @@ -101,7 +236,15 @@ public boolean equals(final Object o) { return false; } } - + + /** + * Returns the OpenJPA enhancement contract version. + * + *

    This method is part of the OpenJPA persistence capability framework and is used + * by the persistence provider to verify bytecode enhancement compatibility.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -129,7 +272,18 @@ protected void pcClearFields() { this.integratorFacilityId = null; this.issueCode = null; } - + + /** + * Creates a new instance managed by the specified StateManager with an object ID. + * + *

    This OpenJPA callback method creates a new entity instance, optionally clears its fields, + * assigns the provided StateManager, and initializes key fields from the given object identifier.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param o Object the object identifier to copy key fields from + * @param b boolean if true, clears all fields after instantiation + * @return PersistenceCapable the newly created and initialized instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final FacilityIdDemographicIssueCompositePk facilityIdDemographicIssueCompositePk = new FacilityIdDemographicIssueCompositePk(); if (b) { @@ -139,7 +293,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final facilityIdDemographicIssueCompositePk.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)facilityIdDemographicIssueCompositePk; } - + + /** + * Creates a new instance managed by the specified StateManager. + * + *

    This OpenJPA callback method creates a new entity instance, optionally clears its fields, + * and assigns the provided StateManager for persistence lifecycle management.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param b boolean if true, clears all fields after instantiation + * @return PersistenceCapable the newly created and initialized instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final FacilityIdDemographicIssueCompositePk facilityIdDemographicIssueCompositePk = new FacilityIdDemographicIssueCompositePk(); if (b) { @@ -152,7 +316,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final protected static int pcGetManagedFieldCount() { return 4; } - + + /** + * Replaces a single persistent field with a value from the StateManager. + * + *

    This OpenJPA callback method is invoked during entity lifecycle operations + * to update field values managed by the persistence framework. The field index + * is relative to the inherited field count.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcReplaceField(final int n) { final int n2 = n - FacilityIdDemographicIssueCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -180,13 +354,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple persistent fields with values from the StateManager. + * + *

    This OpenJPA callback method invokes pcReplaceField for each field index + * in the provided array, enabling batch field updates during persistence operations.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single persistent field value to the StateManager. + * + *

    This OpenJPA callback method is invoked during persistence operations to supply + * field values to the persistence framework for state tracking and database synchronization.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcProvideField(final int n) { final int n2 = n - FacilityIdDemographicIssueCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -214,7 +405,15 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple persistent field values to the StateManager. + * + *

    This OpenJPA callback method invokes pcProvideField for each field index + * in the provided array, enabling batch field value transfer to the persistence framework.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -248,7 +447,18 @@ protected void pcCopyField(final FacilityIdDemographicIssueCompositePk facilityI } } } - + + /** + * Copies multiple persistent fields from another instance. + * + *

    This OpenJPA callback method copies field values from the source object to this instance + * for the specified field indices. Both objects must share the same StateManager.

    + * + * @param o Object the source object to copy fields from (must be FacilityIdDemographicIssueCompositePk) + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source object has a different StateManager + * @throws IllegalStateException if the StateManager is null + */ public void pcCopyFields(final Object o, final int[] array) { final FacilityIdDemographicIssueCompositePk facilityIdDemographicIssueCompositePk = (FacilityIdDemographicIssueCompositePk)o; if (facilityIdDemographicIssueCompositePk.pcStateManager != this.pcStateManager) { @@ -261,25 +471,54 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(facilityIdDemographicIssueCompositePk, array[i]); } } - + + /** + * Retrieves the generic context from the StateManager. + * + *

    This method provides access to the OpenJPA generic context associated with + * the persistence state manager.

    + * + * @return Object the generic context, or null if no StateManager is present + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Retrieves the JPA object identifier for this entity. + * + *

    This method returns the persistence identity of this object as managed by OpenJPA.

    + * + * @return Object the object identifier, or null if no StateManager is present + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity is marked for deletion. + * + * @return boolean true if the entity is deleted in the current persistence context, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified (dirty state). + * + *

    This method performs a dirty check via the RedefinitionHelper and determines + * if any persistent fields have been modified since the last synchronization with + * the database.

    + * + * @return boolean true if the entity has unsaved changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -288,41 +527,93 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + * @return boolean true if the entity is new (not yet saved to database), false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is managed by the persistence context. + * + * @return boolean true if the entity is persistent (managed), false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is participating in a transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks the specified field as dirty (modified). + * + *

    This method notifies the StateManager that a field has been changed, + * ensuring proper change tracking and database synchronization.

    + * + * @param s String the name of the field that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA StateManager for this entity. + * + *

    The StateManager manages the persistence lifecycle and state transitions + * for this entity instance.

    + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for optimistic locking. + * + * @return Object the version value, or null if no StateManager is present + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current StateManager with a new one. + * + *

    This method is used during entity lifecycle transitions to change the StateManager + * responsible for managing this entity's persistence state. If a StateManager already exists, + * it delegates the replacement to the existing manager; otherwise, it directly assigns + * the new StateManager.

    + * + * @param pcStateManager StateManager the new StateManager to use + * @throws SecurityException if the StateManager replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -330,23 +621,74 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies primary key fields to an object identifier using a FieldSupplier. + * + *

    This method is intentionally empty as composite keys in this implementation + * handle identity through direct field comparison rather than separate ID objects.

    + * + * @param fieldSupplier FieldSupplier the field supplier (unused) + * @param o Object the target object identifier (unused) + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { } - + + /** + * Copies primary key fields to an object identifier. + * + *

    This method is intentionally empty as composite keys in this implementation + * handle identity through direct field comparison rather than separate ID objects.

    + * + * @param o Object the target object identifier (unused) + */ public void pcCopyKeyFieldsToObjectId(final Object o) { } - + + /** + * Copies primary key fields from an object identifier using a FieldConsumer. + * + *

    This method is intentionally empty as composite keys in this implementation + * handle identity through direct field comparison rather than separate ID objects.

    + * + * @param fieldConsumer FieldConsumer the field consumer (unused) + * @param o Object the source object identifier (unused) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { } - + + /** + * Copies primary key fields from an object identifier. + * + *

    This method is intentionally empty as composite keys in this implementation + * handle identity through direct field comparison rather than separate ID objects.

    + * + * @param o Object the source object identifier (unused) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { } - + + /** + * Creates a new object identifier instance. + * + *

    This implementation returns null as the composite key itself serves as + * the identity, eliminating the need for a separate ID class.

    + * + * @return Object always returns null + */ public Object pcNewObjectIdInstance() { return null; } - + + /** + * Creates a new object identifier instance based on a source object. + * + *

    This implementation returns null as the composite key itself serves as + * the identity, eliminating the need for a separate ID class.

    + * + * @param o Object the source object (unused) + * @return Object always returns null + */ public Object pcNewObjectIdInstance(final Object o) { return null; } @@ -414,7 +756,23 @@ private static final void pcSetissueCode(final FacilityIdDemographicIssueComposi } facilityIdDemographicIssueCompositePk.pcStateManager.settingStringField((PersistenceCapable)facilityIdDemographicIssueCompositePk, FacilityIdDemographicIssueCompositePk.pcInheritedFieldCount + 3, facilityIdDemographicIssueCompositePk.issueCode, issueCode, 0); } - + + /** + * Checks if this entity is in a detached state. + * + *

    A detached entity is one that was previously managed by a persistence context + * but is no longer associated with it. This method checks both the StateManager + * and the detached state marker to determine the detachment status.

    + * + *

    Return values:

    + *
      + *
    • Boolean.TRUE - entity is definitely detached
    • + *
    • Boolean.FALSE - entity is definitely not detached
    • + *
    • null - detached state is indeterminate
    • + *
    + * + * @return Boolean the detached state (TRUE, FALSE, or null if indeterminate) + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -439,11 +797,28 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state marker. + * + *

    The detached state is an internal marker used by OpenJPA to track whether + * an entity has been detached from its persistence context. This is used during + * serialization and merge operations.

    + * + * @return Object the detached state marker, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state marker. + * + *

    This method is used by OpenJPA during entity lifecycle transitions, + * particularly during serialization and deserialization operations.

    + * + * @param pcDetachedState Object the detached state marker to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdIntegerCompositePk.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdIntegerCompositePk.java index 44ef65a91b9..2f1bb4753b2 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdIntegerCompositePk.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdIntegerCompositePk.java @@ -13,6 +13,27 @@ import javax.persistence.Embeddable; import java.io.Serializable; +/** + * Composite primary key class for CAISI Integrator facility-based entities. + * + * This embeddable key combines a facility identifier with an item identifier to uniquely + * identify entities across multiple healthcare facilities in the CAISI (Community Access + * Information Systems Integration) network. The class is enhanced by Apache OpenJPA for + * persistence management and implements state tracking for detached entities. + * + * The composite key structure enables: + *
      + *
    • Cross-facility data sharing in multi-site healthcare deployments
    • + *
    • Unique identification of shared clinical data (demographics, appointments, etc.)
    • + *
    • Integration with the Integrator system for inter-EMR communication
    • + *
    + * + * This class is bytecode-enhanced by OpenJPA at build time to implement transparent + * persistence capabilities including field-level change tracking, lazy loading, and + * detached state management. + * + * @since 2026-01-24 + */ @Embeddable public class FacilityIdIntegerCompositePk implements Serializable, Comparable, PersistenceCapable { @@ -30,12 +51,28 @@ public class FacilityIdIntegerCompositePk implements Serializable, Comparable + *
  • Composite key combining facility ID and lab result ID
  • + *
  • OpenJPA enhancement for transparent persistence
  • + *
  • Serialization support for distributed operations
  • + *
  • State management for detached entity handling
  • + *
  • Indexed fields for optimized database queries
  • + * + * + * @since 2026-01-24 + */ @Embeddable public class FacilityIdLabResultCompositePk implements Serializable, PersistenceCapable { @@ -34,12 +58,32 @@ public class FacilityIdLabResultCompositePk implements Serializable, Persistence static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$FacilityIdLabResultCompositePk; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor for JPA persistence framework. + * + * Creates a new composite primary key instance with null field values. + * This constructor is required by JPA specification for entity instantiation + * during query result materialization and entity lifecycle operations. + */ public FacilityIdLabResultCompositePk() { this.integratorFacilityId = null; this.labResultId = null; } - + + /** + * Parameterized constructor for creating composite primary keys with specified values. + * + * Creates a new composite primary key instance initialized with the provided + * facility identifier and lab result identifier. This constructor is typically + * used when creating new lab result entities or performing queries based on + * known composite key values. + * + * @param integratorFacilityId Integer the unique identifier for the healthcare facility + * within the CAISI integrator system + * @param labResultId String the unique identifier for the laboratory result, maximum + * length 64 characters, will be trimmed to null if blank + */ public FacilityIdLabResultCompositePk(final Integer integratorFacilityId, final String labResultId) { this.integratorFacilityId = null; this.labResultId = null; @@ -47,32 +91,106 @@ public FacilityIdLabResultCompositePk(final Integer integratorFacilityId, final this.labResultId = labResultId; } + /** + * Retrieves the integrator facility identifier component of this composite key. + * + * This method returns the facility identifier that represents a specific healthcare + * facility within the CAISI integrator system. The facility ID is part of the composite + * key used to uniquely identify lab results across multiple facilities. + * + * @return Integer the integrator facility identifier, or null if not set + */ public Integer getIntegratorFacilityId() { return pcGetintegratorFacilityId(this); } - + + /** + * Sets the integrator facility identifier component of this composite key. + * + * Updates the facility identifier for this composite key. This method triggers + * OpenJPA state management to track field modifications for persistence operations. + * + * @param integratorFacilityId Integer the integrator facility identifier to set + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { pcSetintegratorFacilityId(this, integratorFacilityId); } - + + /** + * Retrieves the lab result identifier component of this composite key. + * + * This method returns the lab result identifier that uniquely identifies a specific + * laboratory result within a facility. Combined with the facility ID, this forms + * the complete composite primary key for lab result entities. + * + * @return String the lab result identifier (maximum 64 characters), or null if not set + */ public String getLabResultId() { return pcGetlabResultId(this); } - + + /** + * Sets the lab result identifier component of this composite key. + * + * Updates the lab result identifier for this composite key. The provided value + * is automatically trimmed to null if it contains only whitespace, ensuring + * consistent handling of blank values. This method triggers OpenJPA state + * management to track field modifications. + * + * @param labResultId String the lab result identifier to set (maximum 64 characters), + * will be trimmed to null if blank + */ public void setLabResultId(final String labResultId) { pcSetlabResultId(this, StringUtils.trimToNull(labResultId)); } + /** + * Returns a string representation of this composite primary key. + * + * The string format is "facilityId:labResultId" which provides a human-readable + * representation of the composite key components. This format is useful for + * logging and debugging purposes. + * + * @return String the composite key in format "facilityId:labResultId" + */ @Override public String toString() { return "" + pcGetintegratorFacilityId(this) + ':' + pcGetlabResultId(this); } - + + /** + * Computes the hash code for this composite primary key. + * + * The hash code is based solely on the lab result identifier component. + * This implementation provides consistent hashing for use in hash-based + * collections such as HashMap and HashSet. + * + * Note: This implementation only uses labResultId for hashing. This may + * lead to hash collisions when multiple facilities have lab results with + * the same identifier. + * + * @return int the hash code value derived from the lab result identifier + */ @Override public int hashCode() { return pcGetlabResultId(this).hashCode(); } - + + /** + * Determines whether this composite key is equal to another object. + * + * Two composite keys are considered equal if they are both instances of + * FacilityIdLabResultCompositePk and have equal facility IDs and lab result IDs. + * This method is essential for entity identity comparison in JPA operations + * and collection membership testing. + * + * The method safely handles type casting and null values by catching runtime + * exceptions and returning false for any comparison failures. + * + * @param o Object the object to compare with this composite key + * @return boolean true if the objects are equal composite keys with matching + * facility IDs and lab result IDs, false otherwise + */ @Override public boolean equals(final Object o) { try { @@ -84,6 +202,15 @@ public boolean equals(final Object o) { } } + /** + * Returns the OpenJPA enhancement contract version for this persistence capable class. + * + * This method indicates the version of the OpenJPA enhancement contract that + * this class implements. The version number ensures compatibility between the + * enhanced bytecode and the OpenJPA runtime environment. + * + * @return int the enhancement contract version number (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -105,11 +232,31 @@ public int pcGetEnhancementContractVersion() { } } + /** + * Clears all persistent field values to their default null state. + * + * This protected method resets both the integrator facility ID and lab result ID + * fields to null. It is used internally by OpenJPA during entity lifecycle operations + * such as creating new instances and clearing entity state. + */ protected void pcClearFields() { this.integratorFacilityId = null; this.labResultId = null; } - + + /** + * Creates a new persistence capable instance with object ID initialization. + * + * This factory method creates a new instance of the composite key, optionally + * clears its fields, assigns the provided state manager, and copies key field + * values from the specified object ID. This method is used by OpenJPA during + * entity materialization from database queries. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID from which to copy key field values + * @param b boolean if true, clears all fields to null before initialization + * @return PersistenceCapable the newly created composite key instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final FacilityIdLabResultCompositePk facilityIdLabResultCompositePk = new FacilityIdLabResultCompositePk(); if (b) { @@ -119,7 +266,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final facilityIdLabResultCompositePk.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)facilityIdLabResultCompositePk; } - + + /** + * Creates a new persistence capable instance with state manager initialization. + * + * This factory method creates a new instance of the composite key, optionally + * clears its fields, and assigns the provided state manager. This method is + * used by OpenJPA during entity instantiation and detachment operations. + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all fields to null after creation + * @return PersistenceCapable the newly created composite key instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final FacilityIdLabResultCompositePk facilityIdLabResultCompositePk = new FacilityIdLabResultCompositePk(); if (b) { @@ -129,10 +287,29 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final return (PersistenceCapable)facilityIdLabResultCompositePk; } + /** + * Returns the total number of managed persistent fields in this class. + * + * This method returns the count of fields that are managed by the OpenJPA + * persistence framework for this composite key class. The composite key + * has two managed fields: integratorFacilityId and labResultId. + * + * @return int the number of managed persistent fields (2) + */ protected static int pcGetManagedFieldCount() { return 2; } - + + /** + * Replaces a single managed field value from the state manager. + * + * This method is used by OpenJPA to restore field values during entity + * detachment and reattachment operations. It delegates to the state manager + * to retrieve the appropriate value based on field index. + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcReplaceField(final int n) { final int n2 = n - FacilityIdLabResultCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -152,13 +329,33 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple managed field values from the state manager. + * + * This method iterates through the provided array of field indices and + * replaces each corresponding field value by delegating to pcReplaceField. + * Used by OpenJPA during bulk field restoration operations. + * + * @param array int[] array of absolute field indices to replace + * @throws IllegalArgumentException if any field index is invalid + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a single managed field value to the state manager. + * + * This method is used by OpenJPA to retrieve field values during persistence + * operations such as flushing changes to the database. It provides the current + * value of the specified field to the state manager based on field index. + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcProvideField(final int n) { final int n2 = n - FacilityIdLabResultCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -178,13 +375,35 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple managed field values to the state manager. + * + * This method iterates through the provided array of field indices and + * provides each corresponding field value to the state manager by delegating + * to pcProvideField. Used by OpenJPA during bulk field retrieval operations. + * + * @param array int[] array of absolute field indices to provide + * @throws IllegalArgumentException if any field index is invalid + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } + /** + * Copies a single field value from another composite key instance. + * + * This protected method copies the value of a specified field from the source + * composite key to this instance. Used internally by OpenJPA during entity + * merging and state synchronization operations. + * + * @param facilityIdLabResultCompositePk FacilityIdLabResultCompositePk the source + * composite key from which to copy the field + * @param n int the absolute field index to copy + * @throws IllegalArgumentException if the field index is invalid or out of range + */ protected void pcCopyField(final FacilityIdLabResultCompositePk facilityIdLabResultCompositePk, final int n) { final int n2 = n - FacilityIdLabResultCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -204,7 +423,19 @@ protected void pcCopyField(final FacilityIdLabResultCompositePk facilityIdLabRes } } } - + + /** + * Copies multiple field values from another persistence capable object. + * + * This method copies values for the specified fields from the source object + * to this instance. Both objects must be managed by the same state manager, + * and the state manager must not be null. + * + * @param o Object the source persistence capable object from which to copy fields + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final FacilityIdLabResultCompositePk facilityIdLabResultCompositePk = (FacilityIdLabResultCompositePk)o; if (facilityIdLabResultCompositePk.pcStateManager != this.pcStateManager) { @@ -218,24 +449,61 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Retrieves the generic context from the associated state manager. + * + * The generic context provides access to the persistence context and related + * infrastructure managed by OpenJPA. Returns null if this instance is not + * currently associated with a state manager. + * + * @return Object the generic context from the state manager, or null if no + * state manager is associated + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Retrieves the object identifier for this persistence capable instance. + * + * The object ID uniquely identifies this composite key within the persistence + * context. Returns null if this instance is not currently managed by a state + * manager or does not have an assigned object ID. + * + * @return Object the object identifier for this instance, or null if not available + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this persistence capable instance has been deleted. + * + * An instance is considered deleted if it is managed by a state manager + * and the state manager indicates the instance is marked for deletion. + * + * @return boolean true if this instance is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this persistence capable instance has been modified. + * + * An instance is considered dirty if it has been modified since it was + * loaded or last synchronized with the database. This method performs + * a dirty check through the OpenJPA redefinition helper before querying + * the state manager. + * + * @return boolean true if this instance has unsaved modifications, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -244,41 +512,112 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this persistence capable instance is newly created. + * + * An instance is considered new if it has been created within the current + * transaction but has not yet been persisted to the database. + * + * @return boolean true if this instance is new and not yet persisted, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this persistence capable instance is persistent. + * + * An instance is considered persistent if it is associated with a database + * record and managed by the persistence context. + * + * @return boolean true if this instance is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this persistence capable instance is transactional. + * + * An instance is considered transactional if it is participating in the + * current transaction and any changes will be synchronized with the database + * upon transaction commit. + * + * @return boolean true if this instance is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this persistence capable instance is currently being serialized. + * + * This method indicates whether the instance is in the process of serialization, + * which affects how certain persistence operations are handled during the + * serialization lifecycle. + * + * @return boolean true if this instance is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty in the state manager. + * + * This method notifies the state manager that a field has been modified, + * triggering change tracking for persistence operations. If no state manager + * is associated, the call is silently ignored. + * + * @param s String the name of the field to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager associated with this persistence capable instance. + * + * The state manager is responsible for tracking entity state, managing persistence + * operations, and coordinating with the OpenJPA persistence context. + * + * @return StateManager the state manager for this instance, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for this persistence capable instance. + * + * The version is used for optimistic locking to detect concurrent modifications. + * Returns null if this instance is not managed by a state manager or does not + * have version tracking enabled. + * + * @return Object the version information, or null if not available + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + * This method is used during entity detachment and reattachment operations to + * transfer management responsibility between different persistence contexts. + * If a state manager is already present, it delegates the replacement to the + * existing state manager for proper coordination. + * + * @param pcStateManager StateManager the new state manager to associate with this instance + * @throws SecurityException if the state manager replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -286,23 +625,85 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + * This method is used to populate an object ID with key field values from + * this composite key instance using the provided field supplier for value + * extraction. Since this class is itself an embeddable composite key, this + * method has no implementation as the composite key serves as its own identifier. + * + * @param fieldSupplier FieldSupplier the supplier for extracting field values + * @param o Object the target object ID to populate + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { } - + + /** + * Copies key field values to an object ID. + * + * This method is used to populate an object ID with key field values from + * this composite key instance. Since this class is itself an embeddable + * composite key, this method has no implementation as the composite key + * serves as its own identifier. + * + * @param o Object the target object ID to populate + */ public void pcCopyKeyFieldsToObjectId(final Object o) { } - + + /** + * Copies key field values from an object ID using a field consumer. + * + * This method is used to populate this composite key instance with values + * from an object ID using the provided field consumer for value consumption. + * Since this class is itself an embeddable composite key, this method has + * no implementation as the composite key serves as its own identifier. + * + * @param fieldConsumer FieldConsumer the consumer for processing field values + * @param o Object the source object ID from which to copy values + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { } - + + /** + * Copies key field values from an object ID. + * + * This method is used to populate this composite key instance with values + * from an object ID. Since this class is itself an embeddable composite key, + * this method has no implementation as the composite key serves as its own + * identifier. + * + * @param o Object the source object ID from which to copy values + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { } - + + /** + * Creates a new object ID instance for this persistence capable class. + * + * This method would normally return a new instance of the object ID class + * used to identify entities of this type. Since this class is itself an + * embeddable composite key that serves as its own identifier, this method + * returns null. + * + * @return Object always returns null for embeddable composite keys + */ public Object pcNewObjectIdInstance() { return null; } - + + /** + * Creates a new object ID instance initialized with a value. + * + * This method would normally return a new instance of the object ID class + * initialized with the provided value. Since this class is itself an embeddable + * composite key that serves as its own identifier, this method returns null. + * + * @param o Object the value to initialize the object ID with + * @return Object always returns null for embeddable composite keys + */ public Object pcNewObjectIdInstance(final Object o) { return null; } @@ -338,7 +739,20 @@ private static final void pcSetlabResultId(final FacilityIdLabResultCompositePk } facilityIdLabResultCompositePk.pcStateManager.settingStringField((PersistenceCapable)facilityIdLabResultCompositePk, FacilityIdLabResultCompositePk.pcInheritedFieldCount + 1, facilityIdLabResultCompositePk.labResultId, labResultId, 0); } - + + /** + * Checks whether this persistence capable instance is in a detached state. + * + * A detached instance is one that was previously managed by a persistence + * context but is no longer associated with an active state manager. This method + * returns a Boolean (not boolean) to support tri-state logic: TRUE if definitely + * detached, FALSE if definitely not detached, or null if the state is indeterminate. + * + * The determination is made by checking the state manager status if present, or + * by examining the detached state field if no state manager is associated. + * + * @return Boolean TRUE if detached, FALSE if not detached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -359,19 +773,60 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Determines whether the detached state can be definitively determined. + * + * This private method indicates whether the detached state field provides + * definitive information about the detachment status. For this composite key + * class, this always returns false, indicating that detachment state may be + * indeterminate when no state manager is present. + * + * @return boolean always returns false for this implementation + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state marker for this persistence capable instance. + * + * The detached state is used to track whether an instance has been detached + * from its persistence context. Common values include null (not detached), + * DESERIALIZED (created through deserialization), or other state manager + * specific markers. + * + * @return Object the detached state marker, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state marker for this persistence capable instance. + * + * This method is used by OpenJPA to mark instances as detached and track + * their detachment status. The detached state is set during serialization + * and detachment operations to maintain proper entity lifecycle management. + * + * @param pcDetachedState Object the detached state marker to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method for writing this object to an output stream. + * + * This method handles the special serialization requirements for persistence + * capable objects. If the instance is being serialized as part of a persistence + * operation, the detached state is cleared to null after writing the object. + * This ensures proper detachment semantics when instances are transferred across + * JVM boundaries. + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -379,7 +834,19 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method for reading this object from an input stream. + * + * This method handles the special deserialization requirements for persistence + * capable objects. Upon deserialization, the detached state is set to DESERIALIZED + * to indicate that this instance was created through deserialization and may require + * reattachment to a persistence context before use. + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdStringCompositePk.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdStringCompositePk.java index 1f14911ed40..d193e06a3ce 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdStringCompositePk.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/FacilityIdStringCompositePk.java @@ -15,6 +15,27 @@ import org.apache.openjpa.enhance.PersistenceCapable; import java.io.Serializable; +/** + * Composite primary key for CAISI integrator facility mapping entities. + * + *

    This embeddable class represents a composite primary key consisting of an integrator facility ID + * and a CAISI item ID. It is used in the CAISI integrator system to uniquely identify healthcare + * facility mappings across different EMR installations.

    + * + *

    The class is OpenJPA-enhanced for persistence capabilities, implementing both {@link Serializable} + * and {@link PersistenceCapable} interfaces. The OpenJPA enhancement provides automatic field tracking, + * state management, and dirty checking for JPA persistence operations.

    + * + *

    Both key fields are indexed for optimal query performance in facility lookup operations:

    + *
      + *
    • integratorFacilityId - Integer identifier for the integrator facility
    • + *
    • caisiItemId - String identifier (max 16 characters) for the CAISI item
    • + *
    + * + * @see javax.persistence.Embeddable + * @see org.apache.openjpa.enhance.PersistenceCapable + * @since 2026-01-24 + */ @Embeddable public class FacilityIdStringCompositePk implements Serializable, PersistenceCapable { @@ -34,45 +55,119 @@ public class FacilityIdStringCompositePk implements Serializable, PersistenceCap static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$FacilityIdStringCompositePk; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor creating an empty composite key. + * + *

    Initializes both key fields to null. This constructor is required by JPA + * for entity instantiation and OpenJPA enhancement.

    + */ public FacilityIdStringCompositePk() { this.integratorFacilityId = null; this.caisiItemId = null; } - + + /** + * Constructs a composite key with specified facility and item identifiers. + * + *

    Creates a new composite key initialized with the provided integrator facility ID + * and CAISI item ID. This constructor is used when creating new facility mappings + * in the integrator system.

    + * + * @param integratorFacilityId Integer the integrator facility identifier + * @param caisiItemId String the CAISI item identifier (max 16 characters) + */ public FacilityIdStringCompositePk(final Integer integratorFacilityId, final String caisiItemId) { this.integratorFacilityId = null; this.caisiItemId = null; this.integratorFacilityId = integratorFacilityId; this.caisiItemId = caisiItemId; } - + + /** + * Gets the integrator facility identifier. + * + *

    This method is OpenJPA-enhanced to provide automatic field access tracking + * through the StateManager for persistence operations.

    + * + * @return Integer the integrator facility ID, or null if not set + */ public Integer getIntegratorFacilityId() { return pcGetintegratorFacilityId(this); } - + + /** + * Sets the integrator facility identifier. + * + *

    This method is OpenJPA-enhanced to provide automatic dirty checking and + * state management through the StateManager for persistence operations.

    + * + * @param integratorFacilityId Integer the integrator facility ID to set + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { pcSetintegratorFacilityId(this, integratorFacilityId); } - + + /** + * Gets the CAISI item identifier. + * + *

    This method is OpenJPA-enhanced to provide automatic field access tracking + * through the StateManager for persistence operations.

    + * + * @return String the CAISI item ID (max 16 characters), or null if not set + */ public String getCaisiItemId() { return pcGetcaisiItemId(this); } - + + /** + * Sets the CAISI item identifier. + * + *

    This method is OpenJPA-enhanced to provide automatic dirty checking and + * state management. The input string is trimmed to null using Apache Commons + * StringUtils to ensure consistent handling of empty strings.

    + * + * @param caisiItemId String the CAISI item ID to set (max 16 characters), will be trimmed to null if empty + */ public void setCaisiItemId(final String caisiItemId) { pcSetcaisiItemId(this, StringUtils.trimToNull(caisiItemId)); } - + + /** + * Returns a string representation of the composite key. + * + *

    Format: "integratorFacilityId:caisiItemId"

    + * + * @return String the composite key formatted as "facilityId:itemId" + */ @Override public String toString() { return "" + pcGetintegratorFacilityId(this) + ':' + pcGetcaisiItemId(this); } - + + /** + * Generates a hash code based on the CAISI item ID. + * + *

    Uses only the caisiItemId field for hash code generation. This method + * may throw NullPointerException if caisiItemId is null.

    + * + * @return int the hash code of the CAISI item ID + */ @Override public int hashCode() { return pcGetcaisiItemId(this).hashCode(); } - + + /** + * Compares this composite key with another object for equality. + * + *

    Two composite keys are considered equal if both their integrator facility IDs + * and CAISI item IDs are equal. Returns false if the comparison fails due to + * type mismatch, null values, or any runtime exception.

    + * + * @param o Object the object to compare with + * @return boolean true if both keys are equal, false otherwise + */ @Override public boolean equals(final Object o) { try { @@ -83,11 +178,27 @@ public boolean equals(final Object o) { return false; } } - + + /** + * Gets the OpenJPA enhancement contract version. + * + *

    Returns the version of the OpenJPA enhancement contract this class implements. + * This is used by OpenJPA to ensure compatibility between enhanced classes and the + * persistence runtime.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } - + + /** + * Static initializer for OpenJPA persistence capabilities. + * + *

    Registers this class with the OpenJPA PCRegistry, defining field names, types, + * and flags for persistence operations. This is automatically generated by the + * OpenJPA enhancement process.

    + */ static { serialVersionUID = -3604093556893062689L; FacilityIdStringCompositePk.pcFieldNames = new String[] { "caisiItemId", "integratorFacilityId" }; @@ -95,7 +206,18 @@ public int pcGetEnhancementContractVersion() { FacilityIdStringCompositePk.pcFieldFlags = new byte[] { 26, 26 }; PCRegistry.register((FacilityIdStringCompositePk.class$Lca$openosp$openo$caisi_integrator$dao$FacilityIdStringCompositePk != null) ? FacilityIdStringCompositePk.class$Lca$openosp$openo$caisi_integrator$dao$FacilityIdStringCompositePk : (FacilityIdStringCompositePk.class$Lca$openosp$openo$caisi_integrator$dao$FacilityIdStringCompositePk = class$("ca.openosp.openo.caisi_integrator.dao.FacilityIdStringCompositePk")), FacilityIdStringCompositePk.pcFieldNames, FacilityIdStringCompositePk.pcFieldTypes, FacilityIdStringCompositePk.pcFieldFlags, FacilityIdStringCompositePk.pcPCSuperclass, (String)null, (PersistenceCapable)new FacilityIdStringCompositePk()); } - + + /** + * Helper method for loading classes by name. + * + *

    Used by OpenJPA enhancement to load field type classes dynamically. + * Converts ClassNotFoundException to NoClassDefFoundError for enhanced + * static initialization.

    + * + * @param className String the fully qualified class name to load + * @return Class the loaded class + * @throws NoClassDefFoundError if the class cannot be found + */ static /* synthetic */ Class class$(final String className) { try { return Class.forName(className); @@ -104,12 +226,30 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to null. + * + *

    This method is used by OpenJPA during entity initialization and detachment + * operations to reset field values.

    + */ protected void pcClearFields() { this.caisiItemId = null; this.integratorFacilityId = null; } - + + /** + * Creates a new instance with a StateManager and object ID. + * + *

    This method is called by OpenJPA to create new managed instances during + * persistence operations. The instance is initialized with the provided StateManager + * and optionally has its fields cleared and key fields copied from the object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean true to clear fields before initialization + * @return PersistenceCapable the newly created managed instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final FacilityIdStringCompositePk facilityIdStringCompositePk = new FacilityIdStringCompositePk(); if (b) { @@ -119,7 +259,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final facilityIdStringCompositePk.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)facilityIdStringCompositePk; } - + + /** + * Creates a new instance with a StateManager. + * + *

    This method is called by OpenJPA to create new managed instances during + * persistence operations. The instance is initialized with the provided StateManager + * and optionally has its fields cleared.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean true to clear fields before initialization + * @return PersistenceCapable the newly created managed instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final FacilityIdStringCompositePk facilityIdStringCompositePk = new FacilityIdStringCompositePk(); if (b) { @@ -128,11 +279,29 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final facilityIdStringCompositePk.pcStateManager = pcStateManager; return (PersistenceCapable)facilityIdStringCompositePk; } - + + /** + * Gets the count of managed persistent fields. + * + *

    Returns the number of fields managed by OpenJPA for this entity. + * This composite key has 2 managed fields: caisiItemId and integratorFacilityId.

    + * + * @return int the number of managed fields (2) + */ protected static int pcGetManagedFieldCount() { return 2; } - + + /** + * Replaces a single field value from the StateManager. + * + *

    This method is called by OpenJPA to replace a field's value during + * entity loading and refresh operations. The field index is adjusted by + * the inherited field count to determine which field to replace.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - FacilityIdStringCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -152,13 +321,33 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values from the StateManager. + * + *

    This method is called by OpenJPA to replace multiple field values during + * entity loading and refresh operations. It iterates through the provided field + * indices and replaces each field.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single field value to the StateManager. + * + *

    This method is called by OpenJPA to provide a field's current value to + * the StateManager during persistence operations such as flush and commit. + * The field index is adjusted by the inherited field count to determine + * which field to provide.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - FacilityIdStringCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -178,13 +367,33 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the StateManager. + * + *

    This method is called by OpenJPA to provide multiple field values to + * the StateManager during persistence operations. It iterates through the + * provided field indices and provides each field value.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another instance. + * + *

    This method is called by OpenJPA to copy field values between instances + * during merge and refresh operations. The field index is adjusted by the + * inherited field count to determine which field to copy.

    + * + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the source instance to copy from + * @param n int the absolute field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final FacilityIdStringCompositePk facilityIdStringCompositePk, final int n) { final int n2 = n - FacilityIdStringCompositePk.pcInheritedFieldCount; if (n2 < 0) { @@ -204,7 +413,19 @@ protected void pcCopyField(final FacilityIdStringCompositePk facilityIdStringCom } } } - + + /** + * Copies multiple field values from another instance. + * + *

    This method is called by OpenJPA to copy multiple field values between + * instances during merge and refresh operations. Both instances must share + * the same StateManager and have a non-null StateManager.

    + * + * @param o Object the source instance to copy from + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source has a different StateManager + * @throws IllegalStateException if the StateManager is null + */ public void pcCopyFields(final Object o, final int[] array) { final FacilityIdStringCompositePk facilityIdStringCompositePk = (FacilityIdStringCompositePk)o; if (facilityIdStringCompositePk.pcStateManager != this.pcStateManager) { @@ -217,25 +438,54 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(facilityIdStringCompositePk, array[i]); } } - + + /** + * Gets the generic context from the StateManager. + * + *

    Returns the generic context object from the associated StateManager, + * or null if there is no StateManager.

    + * + * @return Object the generic context, or null if no StateManager + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID from the StateManager. + * + *

    Returns the object ID for this persistent instance, or null if there + * is no StateManager.

    + * + * @return Object the object ID, or null if no StateManager + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this instance is marked for deletion. + * + * @return boolean true if the instance is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this instance has been modified. + * + *

    Performs a dirty check through the OpenJPA RedefinitionHelper to ensure + * accurate state tracking before checking the StateManager's dirty flag.

    + * + * @return boolean true if the instance has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -244,41 +494,91 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this instance is newly created. + * + * @return boolean true if the instance is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this instance is persistent. + * + * @return boolean true if the instance is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this instance is transactional. + * + * @return boolean true if the instance is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this instance is being serialized. + * + * @return boolean true if the instance is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty. + * + *

    Notifies the StateManager that a field has been modified. If there is + * no StateManager, this method has no effect.

    + * + * @param s String the name of the field that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Gets the associated StateManager. + * + * @return StateManager the state manager for this instance, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Gets the version object from the StateManager. + * + *

    Returns the version object used for optimistic locking, or null if + * there is no StateManager.

    + * + * @return Object the version object, or null if no StateManager + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the StateManager for this instance. + * + *

    If a StateManager is already present, it delegates the replacement to + * the existing StateManager. Otherwise, the new StateManager is assigned directly.

    + * + * @param pcStateManager StateManager the new state manager to associate with this instance + * @throws SecurityException if the replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -286,27 +586,87 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a FieldSupplier. + * + *

    This method is part of the OpenJPA PersistenceCapable contract but is not + * implemented for this embeddable composite key class.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use + * @param o Object the target object ID + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { } - + + /** + * Copies key fields to an object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable contract but is not + * implemented for this embeddable composite key class.

    + * + * @param o Object the target object ID + */ public void pcCopyKeyFieldsToObjectId(final Object o) { } - + + /** + * Copies key fields from an object ID using a FieldConsumer. + * + *

    This method is part of the OpenJPA PersistenceCapable contract but is not + * implemented for this embeddable composite key class.

    + * + * @param fieldConsumer FieldConsumer the field consumer to use + * @param o Object the source object ID + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { } - + + /** + * Copies key fields from an object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable contract but is not + * implemented for this embeddable composite key class.

    + * + * @param o Object the source object ID + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { } - + + /** + * Creates a new object ID instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract but returns + * null for this embeddable composite key class.

    + * + * @return Object always returns null + */ public Object pcNewObjectIdInstance() { return null; } - + + /** + * Creates a new object ID instance based on a source object. + * + *

    This method is part of the OpenJPA PersistenceCapable contract but returns + * null for this embeddable composite key class.

    + * + * @param o Object the source object + * @return Object always returns null + */ public Object pcNewObjectIdInstance(final Object o) { return null; } - + + /** + * Static helper to get the CAISI item ID with StateManager tracking. + * + *

    This OpenJPA-enhanced accessor notifies the StateManager when the field + * is accessed, enabling proper lazy loading and change tracking.

    + * + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the instance to get the field from + * @return String the CAISI item ID + */ private static final String pcGetcaisiItemId(final FacilityIdStringCompositePk facilityIdStringCompositePk) { if (facilityIdStringCompositePk.pcStateManager == null) { return facilityIdStringCompositePk.caisiItemId; @@ -314,7 +674,16 @@ private static final String pcGetcaisiItemId(final FacilityIdStringCompositePk f facilityIdStringCompositePk.pcStateManager.accessingField(FacilityIdStringCompositePk.pcInheritedFieldCount + 0); return facilityIdStringCompositePk.caisiItemId; } - + + /** + * Static helper to set the CAISI item ID with StateManager tracking. + * + *

    This OpenJPA-enhanced mutator notifies the StateManager when the field + * is modified, enabling proper dirty tracking and cascade operations.

    + * + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the instance to set the field on + * @param caisiItemId String the new CAISI item ID value + */ private static final void pcSetcaisiItemId(final FacilityIdStringCompositePk facilityIdStringCompositePk, final String caisiItemId) { if (facilityIdStringCompositePk.pcStateManager == null) { facilityIdStringCompositePk.caisiItemId = caisiItemId; @@ -322,7 +691,16 @@ private static final void pcSetcaisiItemId(final FacilityIdStringCompositePk fac } facilityIdStringCompositePk.pcStateManager.settingStringField((PersistenceCapable)facilityIdStringCompositePk, FacilityIdStringCompositePk.pcInheritedFieldCount + 0, facilityIdStringCompositePk.caisiItemId, caisiItemId, 0); } - + + /** + * Static helper to get the integrator facility ID with StateManager tracking. + * + *

    This OpenJPA-enhanced accessor notifies the StateManager when the field + * is accessed, enabling proper lazy loading and change tracking.

    + * + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the instance to get the field from + * @return Integer the integrator facility ID + */ private static final Integer pcGetintegratorFacilityId(final FacilityIdStringCompositePk facilityIdStringCompositePk) { if (facilityIdStringCompositePk.pcStateManager == null) { return facilityIdStringCompositePk.integratorFacilityId; @@ -330,7 +708,16 @@ private static final Integer pcGetintegratorFacilityId(final FacilityIdStringCom facilityIdStringCompositePk.pcStateManager.accessingField(FacilityIdStringCompositePk.pcInheritedFieldCount + 1); return facilityIdStringCompositePk.integratorFacilityId; } - + + /** + * Static helper to set the integrator facility ID with StateManager tracking. + * + *

    This OpenJPA-enhanced mutator notifies the StateManager when the field + * is modified, enabling proper dirty tracking and cascade operations.

    + * + * @param facilityIdStringCompositePk FacilityIdStringCompositePk the instance to set the field on + * @param integratorFacilityId Integer the new integrator facility ID value + */ private static final void pcSetintegratorFacilityId(final FacilityIdStringCompositePk facilityIdStringCompositePk, final Integer integratorFacilityId) { if (facilityIdStringCompositePk.pcStateManager == null) { facilityIdStringCompositePk.integratorFacilityId = integratorFacilityId; @@ -338,7 +725,19 @@ private static final void pcSetintegratorFacilityId(final FacilityIdStringCompos } facilityIdStringCompositePk.pcStateManager.settingObjectField((PersistenceCapable)facilityIdStringCompositePk, FacilityIdStringCompositePk.pcInheritedFieldCount + 1, (Object)facilityIdStringCompositePk.integratorFacilityId, (Object)integratorFacilityId, 0); } - + + /** + * Checks if this instance is in a detached state. + * + *

    Returns a three-state Boolean indicating detachment status:

    + *
      + *
    • TRUE - Instance is definitely detached
    • + *
    • FALSE - Instance is definitely not detached
    • + *
    • null - Detachment status cannot be determined definitively
    • + *
    + * + * @return Boolean the detachment state, or null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -359,19 +758,53 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive. + * + *

    Always returns false for this class, indicating that detachment status + * cannot be determined definitively without a StateManager.

    + * + * @return boolean always returns false + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Gets the detached state object. + * + *

    The detached state tracks whether this instance was detached from a + * persistence context and holds information needed for reattachment.

    + * + * @return Object the detached state object + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object. + * + *

    Used by OpenJPA to mark this instance as detached and store information + * needed for reattachment to a persistence context.

    + * + * @param pcDetachedState Object the detached state object to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method. + * + *

    Handles serialization for this persistent object. If the instance is + * being serialized as part of a persistence operation, the detached state + * is cleared after writing the object.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -379,7 +812,18 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method. + * + *

    Handles deserialization for this persistent object. Sets the detached + * state to DESERIALIZED to indicate that this instance was loaded from + * serialization rather than from the database.

    + * + * @param objectInputStream ObjectInputStream the stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if a class cannot be found during deserialization + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/HomelessPopulationReport.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/HomelessPopulationReport.java index ab5e51bcb97..262e2df162f 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/HomelessPopulationReport.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/HomelessPopulationReport.java @@ -22,6 +22,28 @@ import javax.persistence.Id; import javax.persistence.Entity; +/** + * JPA entity representing a homeless population report for the CAISI (Client Access to Integrated Services and Information) integrator module. + * This entity tracks statistical data about homeless clients including demographics, healthcare utilization patterns, and prevalence + * of various medical and mental health conditions. The data supports healthcare planning and resource allocation for vulnerable populations. + * + *

    This class is enhanced by OpenJPA for persistence and includes automated field management through the PersistenceCapable interface. + * All field access is mediated through the StateManager to enable transparent persistence, change tracking, and lazy loading.

    + * + *

    Healthcare Context: This report aggregates data for homeless population health surveillance, tracking: + *

      + *
    • Client counts and service utilization patterns over time
    • + *
    • Mortality statistics
    • + *
    • Prevalence of chronic conditions (HIV, cancer, diabetes, liver disease)
    • + *
    • Mental health conditions (schizophrenia, bipolar disorder, depression, cognitive disabilities)
    • + *
    • Acute conditions (pneumonia, influenza)
    • + *
    + *

    + * + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class HomelessPopulationReport extends AbstractModel implements PersistenceCapable { @@ -77,161 +99,371 @@ public class HomelessPopulationReport extends AbstractModel implements static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor creating a new HomelessPopulationReport instance with null id and reportTime. + * All statistical fields are initialized to their default values (0 for primitive integers). + */ public HomelessPopulationReport() { this.id = null; this.reportTime = null; } - + + /** + * Retrieves the unique identifier for this homeless population report. + * + * @return Integer the unique database-generated ID, or null if not yet persisted + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Retrieves the timestamp when this report was generated. + * + * @return Calendar the report generation time, indexed for efficient querying + */ public Calendar getReportTime() { return pcGetreportTime(this); } - + + /** + * Sets the timestamp when this report was generated. + * + * @param reportTime Calendar the report generation time (required, cannot be null) + */ public void setReportTime(final Calendar reportTime) { pcSetreportTime(this, reportTime); } - + + /** + * Retrieves the total number of homeless clients served in the past year. + * + * @return int the count of unique clients receiving services in the past 12 months + */ public int getClientCountInPastYear() { return pcGetclientCountInPastYear(this); } - + + /** + * Sets the total number of homeless clients served in the past year. + * + * @param clientCountInPastYear int the count of unique clients (required, non-negative) + */ public void setClientCountInPastYear(final int clientCountInPastYear) { pcSetclientCountInPastYear(this, clientCountInPastYear); } - + + /** + * Retrieves the current active client count at the time of report generation. + * + * @return int the number of currently active homeless clients + */ public int getCurrentClientCount() { return pcGetcurrentClientCount(this); } - + + /** + * Sets the current active client count at the time of report generation. + * + * @param currentClientCount int the number of currently active clients (required, non-negative) + */ public void setCurrentClientCount(final int currentClientCount) { pcSetcurrentClientCount(this, currentClientCount); } - + + /** + * Retrieves the number of clients with minimal service utilization (1-10 days) in the past 4 years. + * This metric helps identify clients with sporadic or initial engagement with services. + * + * @return int the count of clients using services 1-10 days in the past 48 months + */ public int getUsage1To10DaysInPast4Years() { return pcGetusage1To10DaysInPast4Years(this); } - + + /** + * Sets the number of clients with minimal service utilization (1-10 days) in the past 4 years. + * + * @param usage1To10DaysInPast4Years int the count of minimally engaged clients (required, non-negative) + */ public void setUsage1To10DaysInPast4Years(final int usage1To10DaysInPast4Years) { pcSetusage1To10DaysInPast4Years(this, usage1To10DaysInPast4Years); } - + + /** + * Retrieves the number of clients with moderate service utilization (11-179 days) in the past 4 years. + * This metric identifies clients with regular but not intensive service engagement. + * + * @return int the count of clients using services 11-179 days in the past 48 months + */ public int getUsage11To179DaysInPast4Years() { return pcGetusage11To179DaysInPast4Years(this); } - + + /** + * Sets the number of clients with moderate service utilization (11-179 days) in the past 4 years. + * + * @param usage11To179DaysInPast4Years int the count of moderately engaged clients (required, non-negative) + */ public void setUsage11To179DaysInPast4Years(final int usage11To179DaysInPast4Years) { pcSetusage11To179DaysInPast4Years(this, usage11To179DaysInPast4Years); } - + + /** + * Retrieves the number of clients with intensive service utilization (180-730 days) in the past 4 years. + * This metric identifies chronically homeless clients with sustained service needs (6 months to 2 years). + * + * @return int the count of clients using services 180-730 days in the past 48 months + */ public int getUsage180To730DaysInPast4Years() { return pcGetusage180To730DaysInPast4Years(this); } - + + /** + * Sets the number of clients with intensive service utilization (180-730 days) in the past 4 years. + * + * @param usage180To730DaysInPast4Years int the count of intensively engaged clients (required, non-negative) + */ public void setUsage180To730DaysInPast4Years(final int usage180To730DaysInPast4Years) { pcSetusage180To730DaysInPast4Years(this, usage180To730DaysInPast4Years); } - + + /** + * Retrieves the number of homeless client deaths in the past year. + * This critical metric tracks mortality among the homeless population for public health surveillance. + * + * @return int the count of client deaths in the past 12 months + */ public int getMortalityInPastYear() { return pcGetmortalityInPastYear(this); } - + + /** + * Sets the number of homeless client deaths in the past year. + * + * @param mortalityInPastYear int the count of client deaths (required, non-negative) + */ public void setMortalityInPastYear(final int mortalityInPastYear) { pcSetmortalityInPastYear(this, mortalityInPastYear); } - + + /** + * Retrieves the current number of homeless clients diagnosed with HIV. + * Tracks HIV prevalence for targeted health interventions and resource planning. + * + * @return int the count of current clients with HIV diagnosis + */ public int getCurrentHiv() { return pcGetcurrentHiv(this); } - + + /** + * Sets the current number of homeless clients diagnosed with HIV. + * + * @param currentHiv int the count of clients with HIV (required, non-negative) + */ public void setCurrentHiv(final int currentHiv) { pcSetcurrentHiv(this, currentHiv); } - + + /** + * Retrieves the current number of homeless clients diagnosed with cancer. + * Tracks cancer prevalence for oncology service planning and referral needs. + * + * @return int the count of current clients with cancer diagnosis + */ public int getCurrentCancer() { return pcGetcurrentCancer(this); } - + + /** + * Sets the current number of homeless clients diagnosed with cancer. + * + * @param currentCancer int the count of clients with cancer (required, non-negative) + */ public void setCurrentCancer(final int currentCancer) { pcSetcurrentCancer(this, currentCancer); } - + + /** + * Retrieves the current number of homeless clients diagnosed with diabetes. + * Tracks diabetes prevalence for chronic disease management and medication access programs. + * + * @return int the count of current clients with diabetes diagnosis + */ public int getCurrentDiabetes() { return pcGetcurrentDiabetes(this); } - + + /** + * Sets the current number of homeless clients diagnosed with diabetes. + * + * @param currentDiabetes int the count of clients with diabetes (required, non-negative) + */ public void setCurrentDiabetes(final int currentDiabetes) { pcSetcurrentDiabetes(this, currentDiabetes); } - + + /** + * Retrieves the current number of homeless clients with seizure disorders. + * Tracks seizure disorder prevalence for neurological care needs and medication management. + * + * @return int the count of current clients with seizure disorders + */ public int getCurrentSeizure() { return pcGetcurrentSeizure(this); } - + + /** + * Sets the current number of homeless clients with seizure disorders. + * + * @param currentSeizure int the count of clients with seizure disorders (required, non-negative) + */ public void setCurrentSeizure(final int currentSeizure) { pcSetcurrentSeizure(this, currentSeizure); } - + + /** + * Retrieves the current number of homeless clients diagnosed with liver disease. + * Tracks liver disease prevalence including cirrhosis and hepatitis conditions. + * + * @return int the count of current clients with liver disease diagnosis + */ public int getCurrentLiverDisease() { return pcGetcurrentLiverDisease(this); } - + + /** + * Sets the current number of homeless clients diagnosed with liver disease. + * + * @param currentLiverDisease int the count of clients with liver disease (required, non-negative) + */ public void setCurrentLiverDisease(final int currentLiverDisease) { pcSetcurrentLiverDisease(this, currentLiverDisease); } - + + /** + * Retrieves the current number of homeless clients diagnosed with schizophrenia. + * Tracks schizophrenia prevalence for mental health service planning and psychiatric care coordination. + * + * @return int the count of current clients with schizophrenia diagnosis + */ public int getCurrentSchizophrenia() { return pcGetcurrentSchizophrenia(this); } - + + /** + * Sets the current number of homeless clients diagnosed with schizophrenia. + * + * @param currentSchizophrenia int the count of clients with schizophrenia (required, non-negative) + */ public void setCurrentSchizophrenia(final int currentSchizophrenia) { pcSetcurrentSchizophrenia(this, currentSchizophrenia); } - + + /** + * Retrieves the current number of homeless clients diagnosed with bipolar disorder. + * Tracks bipolar disorder prevalence for mood disorder treatment programs and medication management. + * + * @return int the count of current clients with bipolar disorder diagnosis + */ public int getCurrentBipolar() { return pcGetcurrentBipolar(this); } - + + /** + * Sets the current number of homeless clients diagnosed with bipolar disorder. + * + * @param currentBipolar int the count of clients with bipolar disorder (required, non-negative) + */ public void setCurrentBipolar(final int currentBipolar) { pcSetcurrentBipolar(this, currentBipolar); } - + + /** + * Retrieves the current number of homeless clients diagnosed with depression. + * Tracks depression prevalence for mental health counseling and antidepressant medication access. + * + * @return int the count of current clients with depression diagnosis + */ public int getCurrentDepression() { return pcGetcurrentDepression(this); } - + + /** + * Sets the current number of homeless clients diagnosed with depression. + * + * @param currentDepression int the count of clients with depression (required, non-negative) + */ public void setCurrentDepression(final int currentDepression) { pcSetcurrentDepression(this, currentDepression); } - + + /** + * Retrieves the current number of homeless clients with cognitive disabilities. + * Tracks cognitive impairment prevalence for specialized care planning and support services. + * + * @return int the count of current clients with cognitive disabilities + */ public int getCurrentCognitiveDisability() { return pcGetcurrentCognitiveDisability(this); } - + + /** + * Sets the current number of homeless clients with cognitive disabilities. + * + * @param currentCognitiveDisability int the count of clients with cognitive disabilities (required, non-negative) + */ public void setCurrentCognitiveDisability(final int currentCognitiveDisability) { pcSetcurrentCognitiveDisability(this, currentCognitiveDisability); } - + + /** + * Retrieves the current number of homeless clients diagnosed with pneumonia. + * Tracks pneumonia cases for respiratory illness surveillance and vaccination planning. + * + * @return int the count of current clients with pneumonia diagnosis + */ public int getCurrentPneumonia() { return pcGetcurrentPneumonia(this); } - + + /** + * Sets the current number of homeless clients diagnosed with pneumonia. + * + * @param currentPneumonia int the count of clients with pneumonia (required, non-negative) + */ public void setCurrentPneumonia(final int currentPneumonia) { pcSetcurrentPneumonia(this, currentPneumonia); } - + + /** + * Retrieves the current number of homeless clients diagnosed with influenza. + * Tracks influenza cases for infectious disease surveillance and vaccination programs. + * + * @return int the count of current clients with influenza diagnosis + */ public int getCurrentInfluenza() { return pcGetcurrentInfluenza(this); } - + + /** + * Sets the current number of homeless clients diagnosed with influenza. + * + * @param currentInfluenza int the count of clients with influenza (required, non-negative) + */ public void setCurrentInfluenza(final int currentInfluenza) { pcSetcurrentInfluenza(this, currentInfluenza); } - + + /** + * Returns the OpenJPA enhancement contract version for this entity. + * This method is part of the OpenJPA bytecode enhancement API and should not be called directly. + * + * @return int the enhancement contract version (always 2 for this entity) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -252,7 +484,12 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default values. + * This method is part of the OpenJPA PersistenceCapable interface and is called during + * entity initialization to reset field values. Should not be called directly by application code. + */ protected void pcClearFields() { this.clientCountInPastYear = 0; this.currentBipolar = 0; @@ -274,7 +511,16 @@ protected void pcClearFields() { this.usage180To730DaysInPast4Years = 0; this.usage1To10DaysInPast4Years = 0; } - + + /** + * Creates a new instance of HomelessPopulationReport for persistence operations with object ID initialization. + * This method is part of the OpenJPA PersistenceCapable interface and should not be called directly. + * + * @param pcStateManager StateManager the OpenJPA state manager for this instance + * @param o Object the object ID to copy key fields from + * @param b boolean whether to clear all fields to default values + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final HomelessPopulationReport homelessPopulationReport = new HomelessPopulationReport(); if (b) { @@ -284,7 +530,15 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final homelessPopulationReport.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)homelessPopulationReport; } - + + /** + * Creates a new instance of HomelessPopulationReport for persistence operations. + * This method is part of the OpenJPA PersistenceCapable interface and should not be called directly. + * + * @param pcStateManager StateManager the OpenJPA state manager for this instance + * @param b boolean whether to clear all fields to default values + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final HomelessPopulationReport homelessPopulationReport = new HomelessPopulationReport(); if (b) { @@ -293,11 +547,25 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final homelessPopulationReport.pcStateManager = pcStateManager; return (PersistenceCapable)homelessPopulationReport; } - + + /** + * Returns the total count of managed fields in this entity. + * This method is part of the OpenJPA PersistenceCapable interface and should not be called directly. + * + * @return int the number of managed fields (19 fields total) + */ protected static int pcGetManagedFieldCount() { return 19; } - + + /** + * Replaces a single managed field value from the state manager. + * This method is part of the OpenJPA PersistenceCapable interface and handles field-level + * state restoration during persistence operations. Should not be called directly. + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - HomelessPopulationReport.pcInheritedFieldCount; if (n2 < 0) { @@ -385,13 +653,28 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple managed field values from the state manager. + * This method is part of the OpenJPA PersistenceCapable interface and handles bulk field + * restoration during persistence operations. Should not be called directly. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides a single managed field value to the state manager. + * This method is part of the OpenJPA PersistenceCapable interface and handles field-level + * state capture during persistence operations. Should not be called directly. + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - HomelessPopulationReport.pcInheritedFieldCount; if (n2 < 0) { @@ -479,13 +762,29 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple managed field values to the state manager. + * This method is part of the OpenJPA PersistenceCapable interface and handles bulk field + * capture during persistence operations. Should not be called directly. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies a single field value from another HomelessPopulationReport instance. + * This method is part of the OpenJPA PersistenceCapable interface and handles field-level + * data copying during merge operations. Should not be called directly. + * + * @param homelessPopulationReport HomelessPopulationReport the source instance to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final HomelessPopulationReport homelessPopulationReport, final int n) { final int n2 = n - HomelessPopulationReport.pcInheritedFieldCount; if (n2 < 0) { @@ -573,7 +872,17 @@ protected void pcCopyField(final HomelessPopulationReport homelessPopulationRepo } } } - + + /** + * Copies multiple field values from another HomelessPopulationReport instance. + * This method is part of the OpenJPA PersistenceCapable interface and handles bulk field + * copying during merge operations. Should not be called directly. + * + * @param o Object the source instance to copy from (must be HomelessPopulationReport) + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source has a different state manager + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final HomelessPopulationReport homelessPopulationReport = (HomelessPopulationReport)o; if (homelessPopulationReport.pcStateManager != this.pcStateManager) { @@ -586,25 +895,50 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(homelessPopulationReport, array[i]); } } - + + /** + * Retrieves the generic context associated with the state manager. + * This method is part of the OpenJPA PersistenceCapable interface. Should not be called directly. + * + * @return Object the generic context, or null if no state manager is present + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity instance. + * This method is part of the OpenJPA PersistenceCapable interface. Should not be called directly. + * + * @return Object the object ID, or null if no state manager is present + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this entity instance is marked for deletion. + * This method is part of the OpenJPA PersistenceCapable interface. + * + * @return boolean true if the instance is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this entity instance has uncommitted changes. + * This method is part of the OpenJPA PersistenceCapable interface and performs + * a dirty check through the RedefinitionHelper. + * + * @return boolean true if the instance has uncommitted changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -613,41 +947,93 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this entity instance is newly created and not yet persisted. + * This method is part of the OpenJPA PersistenceCapable interface. + * + * @return boolean true if the instance is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this entity instance is managed by a persistence context. + * This method is part of the OpenJPA PersistenceCapable interface. + * + * @return boolean true if the instance is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this entity instance is part of an active transaction. + * This method is part of the OpenJPA PersistenceCapable interface. + * + * @return boolean true if the instance is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this entity instance is currently being serialized. + * This method is part of the OpenJPA PersistenceCapable interface. + * + * @return boolean true if the instance is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty to trigger change tracking. + * This method is part of the OpenJPA PersistenceCapable interface and notifies + * the state manager of field modifications. Should not be called directly. + * + * @param s String the field name that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager for this entity instance. + * This method is part of the OpenJPA PersistenceCapable interface. Should not be called directly. + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version information for optimistic locking. + * This method is part of the OpenJPA PersistenceCapable interface and supports + * optimistic concurrency control. Should not be called directly. + * + * @return Object the version information, or null if no state manager is present + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * This method is part of the OpenJPA PersistenceCapable interface and handles + * state manager transitions during entity lifecycle changes. Should not be called directly. + * + * @param pcStateManager StateManager the new state manager to use + * @throws SecurityException if the state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -655,27 +1041,70 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * This method is not supported for this entity type and always throws InternalException. + * + * @param fieldSupplier FieldSupplier the field supplier for copying + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * This method is not supported for this entity type and always throws InternalException. + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * This method is part of the OpenJPA PersistenceCapable interface and extracts + * the ID from an IntId object. Should not be called directly. + * + * @param fieldConsumer FieldConsumer the field consumer for storing the ID + * @param o Object the source object ID (must be IntId) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(13 + HomelessPopulationReport.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key fields from an object ID to this instance. + * This method is part of the OpenJPA PersistenceCapable interface and sets + * the entity ID from an IntId object. Should not be called directly. + * + * @param o Object the source object ID (must be IntId) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * This method is part of the OpenJPA PersistenceCapable interface. Should not be called directly. + * + * @param o Object the string representation of the ID + * @return Object a new IntId instance for this entity type + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((HomelessPopulationReport.class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport != null) ? HomelessPopulationReport.class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport : (HomelessPopulationReport.class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport = class$("ca.openosp.openo.caisi_integrator.dao.HomelessPopulationReport")), (String)o); } - + + /** + * Creates a new object ID instance using the current entity's ID. + * This method is part of the OpenJPA PersistenceCapable interface. Should not be called directly. + * + * @return Object a new IntId instance containing this entity's ID + */ public Object pcNewObjectIdInstance() { return new IntId((HomelessPopulationReport.class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport != null) ? HomelessPopulationReport.class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport : (HomelessPopulationReport.class$Lca$openosp$openo$caisi_integrator$dao$HomelessPopulationReport = class$("ca.openosp.openo.caisi_integrator.dao.HomelessPopulationReport")), this.id); } @@ -983,7 +1412,14 @@ private static final void pcSetusage1To10DaysInPast4Years(final HomelessPopulati } homelessPopulationReport.pcStateManager.settingIntField((PersistenceCapable)homelessPopulationReport, HomelessPopulationReport.pcInheritedFieldCount + 18, homelessPopulationReport.usage1To10DaysInPast4Years, usage1To10DaysInPast4Years, 0); } - + + /** + * Checks whether this entity instance is in a detached state. + * A detached entity is one that was previously managed but is no longer associated + * with a persistence context. This method is part of the OpenJPA PersistenceCapable interface. + * + * @return Boolean TRUE if detached, FALSE if not detached, null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -1007,19 +1443,48 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks whether the detached state is definitive for this entity. + * This method is part of the OpenJPA PersistenceCapable interface. Should not be called directly. + * + * @return boolean always returns false for this entity type + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * This method is part of the OpenJPA PersistenceCapable interface and provides + * state information when the entity is detached from the persistence context. + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * This method is part of the OpenJPA PersistenceCapable interface and is called + * during serialization and detachment operations. Should not be called directly. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method invoked during object serialization. + * This method handles proper serialization of the entity state, ensuring that + * detached state information is cleared during the serialization process to prevent + * state corruption when the object is deserialized in a different context. + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -1027,7 +1492,17 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method invoked during object deserialization. + * This method handles proper restoration of the entity state, marking the entity + * as DESERIALIZED to indicate it has been reconstituted from a serialized form + * and may need reattachment to a persistence context. + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/ImportLog.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/ImportLog.java index f60c3e9bc6f..c56d0bbe193 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/ImportLog.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/ImportLog.java @@ -23,6 +23,37 @@ import org.apache.openjpa.persistence.DataCache; import javax.persistence.Entity; +/** + * Entity class representing import log records for the CAISI Integrator healthcare data import system. + * + *

    This class tracks the import history of healthcare data files processed through the CAISI (Client Access to + * Integrated Services and Information) Integrator. It maintains audit information about data imports including + * file metadata, processing status, date ranges, and facility associations. This is critical for maintaining + * data integrity and compliance in inter-EMR data sharing scenarios.

    + * + *

    The ImportLog entity provides comprehensive tracking of:

    + *
      + *
    • File identification through filename and checksum verification
    • + *
    • Temporal data boundaries via date interval start and end timestamps
    • + *
    • Processing status tracking for import lifecycle management
    • + *
    • Facility-level data segregation for multi-facility environments
    • + *
    • Dependency tracking for sequential import processing
    • + *
    • Audit trail through creation and update timestamps
    • + *
    + * + *

    This class is enhanced by Apache OpenJPA for persistence and implements the PersistenceCapable interface + * to support advanced JPA features. Data caching is explicitly disabled to ensure real-time import status + * visibility across the system.

    + * + *

    Security Note: Delete operations are prevented via the {@link #jpaPreventDelete()} + * callback to maintain permanent audit trail compliance for healthcare data governance requirements.

    + * + * @see AbstractModel + * @see PersistenceCapable + * @see ca.openosp.openo.caisi_integrator.dao.AbstractModel + * + * @since 2026-01-24 + */ @Entity @DataCache(enabled = false) public class ImportLog extends AbstractModel implements PersistenceCapable @@ -65,97 +96,246 @@ public class ImportLog extends AbstractModel implements PersistenceCapable static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$ImportLog; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor initializing a new ImportLog entity. + * + *

    Creates a new import log record with the ID field initialized to null. The ID will be + * automatically assigned by the persistence provider when the entity is persisted to the database.

    + */ public ImportLog() { this.id = null; } + /** + * Retrieves the unique identifier for this import log record. + * + * @return Long the primary key identifier, or null if not yet persisted + */ @Override public Long getId() { return pcGetid(this); } - + + /** + * Sets the unique identifier for this import log record. + * + * @param id Long the primary key identifier to set + */ public void setId(final Long id) { pcSetid(this, id); } + /** + * Retrieves the filename of the imported healthcare data file. + * + * @return String the filename of the imported file, maximum length 255 characters + */ public String getFilename() { return pcGetfilename(this); } - + + /** + * Sets the filename of the imported healthcare data file. + * + * @param filename String the filename to set, maximum length 255 characters + */ public void setFilename(final String filename) { pcSetfilename(this, filename); } + /** + * Retrieves the checksum hash of the imported file for integrity verification. + * + *

    The checksum is used to detect duplicate imports and verify file integrity. This is critical + * for preventing duplicate data processing and ensuring data consistency across the system.

    + * + * @return String the checksum hash value, maximum length 255 characters + */ public String getChecksum() { return pcGetchecksum(this); } - + + /** + * Sets the checksum hash of the imported file. + * + * @param checksum String the checksum hash to set, maximum length 255 characters + */ public void setChecksum(final String checksum) { pcSetchecksum(this, checksum); } + /** + * Retrieves the start date of the data interval covered by this import. + * + *

    This represents the earliest date of healthcare data contained in the imported file. + * Used for querying and filtering import logs by data coverage period.

    + * + * @return Date the start date of the data interval + */ public Date getDateIntervalStart() { return pcGetdateIntervalStart(this); } - + + /** + * Sets the start date of the data interval covered by this import. + * + * @param dateIntervalStart Date the start date to set + */ public void setDateIntervalStart(final Date dateIntervalStart) { pcSetdateIntervalStart(this, dateIntervalStart); } + /** + * Retrieves the end date of the data interval covered by this import. + * + *

    This represents the latest date of healthcare data contained in the imported file. + * Together with the start date, defines the temporal coverage of the import.

    + * + * @return Date the end date of the data interval + */ public Date getDateIntervalEnd() { return pcGetdateIntervalEnd(this); } - + + /** + * Sets the end date of the data interval covered by this import. + * + * @param dateIntervalEnd Date the end date to set + */ public void setDateIntervalEnd(final Date dateIntervalEnd) { pcSetdateIntervalEnd(this, dateIntervalEnd); } + /** + * Retrieves the current processing status of this import. + * + *

    Status values typically include states such as "pending", "processing", "completed", "failed", + * or other application-defined states that track the import lifecycle.

    + * + * @return String the current status, maximum length 50 characters + */ public String getStatus() { return pcGetstatus(this); } - + + /** + * Sets the processing status of this import. + * + * @param status String the status to set, maximum length 50 characters + */ public void setStatus(final String status) { pcSetstatus(this, status); } + /** + * Retrieves the facility identifier associated with this import. + * + *

    The facility ID links this import to a specific healthcare facility or clinic within the system. + * This supports multi-facility environments where data must be segregated by facility for privacy + * and organizational requirements. This field is indexed for efficient facility-based queries.

    + * + * @return Integer the facility identifier + */ public Integer getFacilityId() { return pcGetfacilityId(this); } - + + /** + * Sets the facility identifier for this import. + * + * @param facilityId Integer the facility identifier to set + */ public void setFacilityId(final Integer facilityId) { pcSetfacilityId(this, facilityId); } + /** + * Retrieves the timestamp when this import log record was created. + * + *

    This provides an audit trail of when the import was first registered in the system. + * This timestamp is part of the mandatory audit trail for healthcare data compliance.

    + * + * @return Date the creation timestamp + */ public Date getDateCreated() { return pcGetdateCreated(this); } - + + /** + * Sets the creation timestamp for this import log record. + * + * @param dateCreated Date the creation timestamp to set + */ public void setDateCreated(final Date dateCreated) { pcSetdateCreated(this, dateCreated); } + /** + * Retrieves the timestamp of the last update to this import log record. + * + *

    This tracks when the import record was last modified, supporting audit trail requirements + * and enabling monitoring of import processing progress over time.

    + * + * @return Date the last update timestamp + */ public Date getLastUpdatedDate() { return pcGetlastUpdatedDate(this); } - + + /** + * Retrieves the dependency identifier indicating prerequisite imports. + * + *

    This field supports sequential import processing where certain imports must be completed + * before others can proceed. It references the identifier of an import that must complete + * before this import can be processed.

    + * + * @return String the dependency identifier, maximum length 255 characters + */ public String getDependsOn() { return pcGetdependsOn(this); } - + + /** + * Sets the dependency identifier for sequential import ordering. + * + * @param dependsOn String the dependency identifier to set, maximum length 255 characters + */ public void setDependsOn(final String dependsOn) { pcSetdependsOn(this, dependsOn); } - + + /** + * Sets the last update timestamp for this import log record. + * + * @param lastUpdatedDate Date the last update timestamp to set + */ public void setLastUpdatedDate(final Date lastUpdatedDate) { pcSetlastUpdatedDate(this, lastUpdatedDate); } + /** + * JPA lifecycle callback that prevents deletion of import log records. + * + *

    This callback is invoked before entity removal and always throws an exception to prevent + * deletion. Import logs serve as a permanent audit trail for healthcare data governance and + * regulatory compliance, and therefore must never be deleted from the system.

    + * + * @throws UnsupportedOperationException always thrown to prevent deletion + */ @PreRemove protected void jpaPreventDelete() { throw new UnsupportedOperationException("Remove is not allowed for this type of item."); } + /** + * Returns the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the OpenJPA bytecode enhancement infrastructure and indicates + * the version of the persistence enhancement contract this class implements.

    + * + * @return int the enhancement contract version, always returns 2 + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -190,6 +370,18 @@ protected void pcClearFields() { this.status = null; } + /** + * Creates a new instance of ImportLog for JPA persistence with an object ID. + * + *

    This method is part of the PersistenceCapable contract and is used by OpenJPA to create + * new entity instances during persistence operations. It initializes the instance with the + * provided state manager and copies key fields from the given object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID containing key field values + * @param b boolean if true, fields are cleared after initialization + * @return PersistenceCapable the newly created ImportLog instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final ImportLog importLog = new ImportLog(); if (b) { @@ -199,7 +391,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final importLog.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)importLog; } - + + /** + * Creates a new instance of ImportLog for JPA persistence without an object ID. + * + *

    This method is part of the PersistenceCapable contract and creates a new entity instance + * with the provided state manager but without initializing key fields from an object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, fields are cleared after initialization + * @return PersistenceCapable the newly created ImportLog instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final ImportLog importLog = new ImportLog(); if (b) { @@ -213,6 +415,15 @@ protected static int pcGetManagedFieldCount() { return 10; } + /** + * Replaces a single field value during JPA persistence operations. + * + *

    This method is part of the PersistenceCapable contract and is called by the state manager + * to update individual field values. The field to update is identified by the field index.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - ImportLog.pcInheritedFieldCount; if (n2 < 0) { @@ -265,12 +476,29 @@ public void pcReplaceField(final int n) { } } + /** + * Replaces multiple field values during JPA persistence operations. + * + *

    This method is part of the PersistenceCapable contract and efficiently updates multiple + * fields by delegating to {@link #pcReplaceField(int)} for each field index.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a single field value to the state manager during JPA operations. + * + *

    This method is part of the PersistenceCapable contract and is called by the persistence + * provider to retrieve individual field values for persistence operations.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - ImportLog.pcInheritedFieldCount; if (n2 < 0) { @@ -323,6 +551,14 @@ public void pcProvideField(final int n) { } } + /** + * Provides multiple field values to the state manager during JPA operations. + * + *

    This method is part of the PersistenceCapable contract and efficiently provides multiple + * field values by delegating to {@link #pcProvideField(int)} for each field index.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -381,6 +617,17 @@ protected void pcCopyField(final ImportLog importLog, final int n) { } } + /** + * Copies specified field values from another ImportLog instance. + * + *

    This method is part of the PersistenceCapable contract and copies field values from + * the source object to this instance. Both objects must share the same state manager.

    + * + * @param o Object the source ImportLog to copy from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the state managers differ + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final ImportLog importLog = (ImportLog)o; if (importLog.pcStateManager != this.pcStateManager) { @@ -394,24 +641,46 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Retrieves the generic context from the associated state manager. + * + * @return Object the generic context, or null if no state manager is associated + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity instance. + * + * @return Object the object ID, or null if no state manager is associated + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity instance has been marked for deletion. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity instance has been modified since being loaded. + * + *

    Triggers a dirty check through the state manager to ensure the dirty state is current.

    + * + * @return boolean true if the entity has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -420,41 +689,90 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity instance is newly created and not yet persisted. + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity instance is managed by a persistence context. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity instance is participating in a transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity instance is currently being serialized. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } + /** + * Marks a specific field as dirty for persistence tracking. + * + *

    Notifies the state manager that the named field has been modified and needs to be + * persisted when the transaction commits.

    + * + * @param s String the name of the field to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager associated with this entity instance. + * + * @return StateManager the associated state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version identifier for this entity instance. + * + *

    The version is used for optimistic locking to detect concurrent modifications.

    + * + * @return Object the version identifier, or null if no state manager is associated + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager for this entity instance. + * + *

    If a state manager is already associated, delegates the replacement to the existing + * state manager. Otherwise, directly assigns the new state manager.

    + * + * @param pcStateManager StateManager the new state manager to associate + * @throws SecurityException if the replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -463,26 +781,69 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This operation is not supported for this entity type.

    + * + * @param fieldSupplier FieldSupplier the field supplier to receive key field values + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values to an object ID. + * + *

    This operation is not supported for this entity type.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    Extracts the ID value from the provided LongId object and stores it using the field consumer.

    + * + * @param fieldConsumer FieldConsumer the field consumer to store the key field value + * @param o Object the source LongId object containing the ID value + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(7 + ImportLog.pcInheritedFieldCount, (Object)Long.valueOf(((LongId)o).getId())); } - + + /** + * Copies key field values from an object ID directly to this entity instance. + * + *

    Extracts the ID value from the provided LongId object and assigns it to this entity's ID field.

    + * + * @param o Object the source LongId object containing the ID value + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Long.valueOf(((LongId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * + * @param o Object the string representation of the object ID + * @return Object a new LongId instance + */ public Object pcNewObjectIdInstance(final Object o) { return new LongId((ImportLog.class$Lca$openosp$openo$caisi_integrator$dao$ImportLog != null) ? ImportLog.class$Lca$openosp$openo$caisi_integrator$dao$ImportLog : (ImportLog.class$Lca$openosp$openo$caisi_integrator$dao$ImportLog = class$("ca.openosp.openo.caisi_integrator.dao.ImportLog")), (String)o); } - + + /** + * Creates a new object ID instance from this entity's current ID value. + * + * @return Object a new LongId instance initialized with this entity's ID + */ public Object pcNewObjectIdInstance() { return new LongId((ImportLog.class$Lca$openosp$openo$caisi_integrator$dao$ImportLog != null) ? ImportLog.class$Lca$openosp$openo$caisi_integrator$dao$ImportLog : (ImportLog.class$Lca$openosp$openo$caisi_integrator$dao$ImportLog = class$("ca.openosp.openo.caisi_integrator.dao.ImportLog")), this.id); } @@ -647,6 +1008,15 @@ private static final void pcSetstatus(final ImportLog importLog, final String st importLog.pcStateManager.settingStringField((PersistenceCapable)importLog, ImportLog.pcInheritedFieldCount + 9, importLog.status, status, 0); } + /** + * Determines if this entity instance is in a detached state. + * + *

    An entity is detached if it was previously managed by a persistence context but is + * no longer associated with an active session. This method checks various state indicators + * to make this determination.

    + * + * @return Boolean true if detached, false if attached, or null if state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -675,10 +1045,23 @@ private boolean pcisDetachedStateDefinitive() { return false; } + /** + * Retrieves the detached state object for this entity instance. + * + *

    The detached state contains metadata used by the persistence provider to track + * the entity's state when it is not actively managed by a persistence context.

    + * + * @return Object the detached state object, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity instance. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/IssueGroup.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/IssueGroup.java index 2433757d399..31f82a4f29d 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/IssueGroup.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/IssueGroup.java @@ -22,6 +22,43 @@ import javax.persistence.Entity; import ca.openosp.openo.caisi_integrator.util.Named; +/** + * JPA entity representing an issue grouping in the CAISI Integrator system. + * + *

    This class manages clinical issue groups that are used to categorize and organize + * patient health issues across different healthcare facilities in the integrator network. + * Issue groups associate a human-readable name with specific medical coding systems + * (such as ICD-9, ICD-10, SNOMED CT) to enable standardized issue tracking and reporting + * across multiple EMR instances.

    + * + *

    The class is bytecode-enhanced by Apache OpenJPA to provide transparent persistence + * capabilities. The enhancement adds numerous internal methods (prefixed with "pc") that + * handle state management, field tracking, and persistence lifecycle operations. These + * generated methods should not be modified directly.

    + * + *

    Key Features:

    + *
      + *
    • Supports multiple medical coding systems via the CodeType enumeration
    • + *
    • Validates and normalizes user-provided names for consistency
    • + *
    • Provides transparent persistence through OpenJPA enhancement
    • + *
    • Implements serialization for distributed system compatibility
    • + *
    + * + *

    Database Mapping:

    + *
      + *
    • Entity Name: IntegratorIssueGroup
    • + *
    • Primary Key: Auto-generated Integer ID
    • + *
    • Name: VARCHAR(32), required, validated and normalized
    • + *
    • Code Type: ENUM (STRING), required
    • + *
    • Issue Code: VARCHAR(64), required
    • + *
    + * + * @see AbstractModel + * @see Named + * @see CodeType + * @see MiscUtils#validateAndNormaliseUserName(String) + * @since 2026-01-24 + */ @Entity(name = "IntegratorIssueGroup") public class IssueGroup extends AbstractModel implements Named, PersistenceCapable { @@ -47,7 +84,14 @@ public class IssueGroup extends AbstractModel implements Named, Persist static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor initializing all fields to null. + * + *

    This constructor is required by JPA for entity instantiation and is also used + * internally by the OpenJPA enhancement process. All fields are explicitly set to + * null to ensure a clean initial state.

    + */ public IssueGroup() { this.id = null; this.name = null; @@ -55,35 +99,93 @@ public IssueGroup() { this.issueCode = null; } + /** + * Retrieves the unique identifier for this issue group. + * + * @return Integer the primary key ID, or null if not yet persisted + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Retrieves the human-readable name of this issue group. + * + * @return String the validated and normalized name of the issue group + */ public String getName() { return pcGetname(this); } - + + /** + * Sets the human-readable name of this issue group. + * + *

    The provided name is automatically validated and normalized using + * {@link MiscUtils#validateAndNormaliseUserName(String)} to ensure consistency + * across the system. This includes trimming whitespace, normalizing case, and + * validating against security constraints.

    + * + * @param name String the name to set (will be validated and normalized) + * @throws IllegalArgumentException if the name fails validation + */ public void setName(final String name) { pcSetname(this, MiscUtils.validateAndNormaliseUserName(name)); } + /** + * Retrieves the medical coding system type used for this issue group. + * + * @return CodeType the coding system (e.g., ICD-9, ICD-10, SNOMED CT) + */ public CodeType getCodeType() { return pcGetcodeType(this); } - + + /** + * Sets the medical coding system type for this issue group. + * + *

    The code type determines which standardized medical terminology system + * is used for classifying issues within this group. Common types include + * ICD-9, ICD-10, and SNOMED CT.

    + * + * @param codeType CodeType the coding system to use + */ public void setCodeType(final CodeType codeType) { pcSetcodeType(this, codeType); } - + + /** + * Retrieves the specific code from the medical coding system. + * + * @return String the issue code (e.g., "E11.9" for ICD-10 diabetes) + */ public String getIssueCode() { return pcGetissueCode(this); } - + + /** + * Sets the specific code from the medical coding system. + * + *

    This should be a valid code within the specified CodeType system. + * For example, if CodeType is ICD-10, this might be "E11.9" for + * Type 2 diabetes mellitus without complications.

    + * + * @param issueCode String the medical code to set (max 64 characters) + */ public void setIssueCode(final String issueCode) { pcSetissueCode(this, issueCode); } + /** + * Returns the OpenJPA bytecode enhancement contract version. + * + *

    This method is part of the PersistenceCapable interface implementation + * and is used by OpenJPA to verify bytecode enhancement compatibility. The + * version number indicates which enhancement features are available.

    + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -105,6 +207,12 @@ public int pcGetEnhancementContractVersion() { } } + /** + * Clears all persistent fields to null values. + * + *

    This method is used internally by OpenJPA during entity lifecycle + * management, particularly when creating new instances or clearing state.

    + */ protected void pcClearFields() { this.codeType = null; this.id = null; @@ -112,6 +220,18 @@ protected void pcClearFields() { this.name = null; } + /** + * Creates a new instance of IssueGroup with the specified state manager and object ID. + * + *

    This method is called by OpenJPA when instantiating entities from the database. + * It creates a new instance, optionally clears its fields, assigns the state manager, + * and copies key field values from the provided object ID.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to assign + * @param o Object the object ID containing key field values + * @param b boolean true to clear all fields before initialization + * @return PersistenceCapable the newly created IssueGroup instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final IssueGroup issueGroup = new IssueGroup(); if (b) { @@ -121,7 +241,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final issueGroup.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)issueGroup; } - + + /** + * Creates a new instance of IssueGroup with the specified state manager. + * + *

    This method is called by OpenJPA when creating new transient instances. + * It creates a new instance, optionally clears its fields, and assigns the + * state manager.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to assign + * @param b boolean true to clear all fields before initialization + * @return PersistenceCapable the newly created IssueGroup instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final IssueGroup issueGroup = new IssueGroup(); if (b) { @@ -131,10 +262,24 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final return (PersistenceCapable)issueGroup; } + /** + * Returns the number of persistent fields managed by OpenJPA. + * + * @return int the count of managed fields (4: codeType, id, issueCode, name) + */ protected static int pcGetManagedFieldCount() { return 4; } + /** + * Replaces a single field value using the state manager. + * + *

    This method is called by OpenJPA to replace field values during state + * transitions (e.g., when loading from database or refreshing entities).

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - IssueGroup.pcInheritedFieldCount; if (n2 < 0) { @@ -162,13 +307,30 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple field values using the state manager. + * + *

    This method iterates over the provided field indices and replaces + * each field by delegating to {@link #pcReplaceField(int)}.

    + * + * @param array int[] the array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a single field value to the state manager. + * + *

    This method is called by OpenJPA to retrieve field values during state + * management operations (e.g., when persisting or detaching entities).

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - IssueGroup.pcInheritedFieldCount; if (n2 < 0) { @@ -196,13 +358,31 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple field values to the state manager. + * + *

    This method iterates over the provided field indices and provides + * each field by delegating to {@link #pcProvideField(int)}.

    + * + * @param array int[] the array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } + /** + * Copies a single field value from another IssueGroup instance. + * + *

    This method is used internally during entity cloning or state transfer + * operations within the OpenJPA persistence context.

    + * + * @param issueGroup IssueGroup the source instance to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final IssueGroup issueGroup, final int n) { final int n2 = n - IssueGroup.pcInheritedFieldCount; if (n2 < 0) { @@ -230,7 +410,18 @@ protected void pcCopyField(final IssueGroup issueGroup, final int n) { } } } - + + /** + * Copies multiple field values from another object to this instance. + * + *

    Both objects must be managed by the same state manager. This method + * validates state manager compatibility before performing the copy.

    + * + * @param o Object the source object (must be an IssueGroup instance) + * @param array int[] the array of field indices to copy + * @throws IllegalArgumentException if state managers don't match + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final IssueGroup issueGroup = (IssueGroup)o; if (issueGroup.pcStateManager != this.pcStateManager) { @@ -244,24 +435,47 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Retrieves the generic context object from the state manager. + * + * @return Object the generic context, or null if no state manager is assigned + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the JPA object ID for this entity. + * + * @return Object the object ID, or null if no state manager is assigned + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this entity has been marked for deletion. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this entity has unsaved changes. + * + *

    This method performs a dirty check to determine if any fields have + * been modified since the last database synchronization.

    + * + * @return boolean true if the entity has been modified, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -270,41 +484,90 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this is a newly created entity that has not been persisted. + * + * @return boolean true if the entity is new (transient), false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this entity is managed by the persistence context. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this entity is associated with an active transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this entity is currently being serialized. + * + * @return boolean true if serialization is in progress, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } + /** + * Marks the specified field as dirty, triggering change tracking. + * + *

    This method notifies the state manager that a field has been modified, + * which is essential for OpenJPA to track changes and generate appropriate + * SQL updates.

    + * + * @param s String the field name that was modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager for this entity. + * + * @return StateManager the state manager instance, or null if not assigned + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version object used for optimistic locking. + * + * @return Object the version value, or null if no state manager is assigned + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is used during entity state transitions, such as when + * merging detached entities or transferring entities between persistence + * contexts.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if the replacement is not permitted + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -313,26 +576,73 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key fields to an object ID using a field supplier. + * + *

    This operation is not supported for this entity type and will + * always throw an exception.

    + * + * @param fieldSupplier FieldSupplier the field supplier (unused) + * @param o Object the target object ID (unused) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + *

    This operation is not supported for this entity type and will + * always throw an exception.

    + * + * @param o Object the target object ID (unused) + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    This method extracts the ID value from an IntId object and stores + * it via the provided field consumer.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the ID value + * @param o Object the source IntId object + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(1 + IssueGroup.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key field values from an object ID to this entity. + * + *

    This method extracts the ID value from an IntId object and assigns + * it to this entity's id field.

    + * + * @param o Object the source IntId object + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * + * @param o Object the string representation of the ID + * @return Object a new IntId instance + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((IssueGroup.class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup != null) ? IssueGroup.class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup : (IssueGroup.class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup = class$("ca.openosp.openo.caisi_integrator.dao.IssueGroup")), (String)o); } - + + /** + * Creates a new object ID instance from this entity's current ID value. + * + * @return Object a new IntId instance containing this entity's ID + */ public Object pcNewObjectIdInstance() { return new IntId((IssueGroup.class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup != null) ? IssueGroup.class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup : (IssueGroup.class$Lca$openosp$openo$caisi_integrator$dao$IssueGroup = class$("ca.openosp.openo.caisi_integrator.dao.IssueGroup")), this.id); } @@ -401,6 +711,15 @@ private static final void pcSetname(final IssueGroup issueGroup, final String na issueGroup.pcStateManager.settingStringField((PersistenceCapable)issueGroup, IssueGroup.pcInheritedFieldCount + 3, issueGroup.name, name, 0); } + /** + * Determines whether this entity is in a detached state. + * + *

    A detached entity is one that was previously persistent but is no longer + * associated with a persistence context. This method checks various indicators + * to determine detachment status.

    + * + * @return Boolean true if detached, false if attached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -424,19 +743,53 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks whether the detached state is definitive. + * + *

    This method is used internally to determine if the detached state + * information is reliable enough to make a definitive determination.

    + * + * @return boolean false, indicating detached state is not definitive + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object. + * + *

    The detached state object contains information about the entity's + * state when it was detached from the persistence context.

    + * + * @return Object the detached state object, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object. + * + *

    This method is used by OpenJPA to track detachment state, particularly + * during serialization and deserialization operations.

    + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } + /** + * Custom serialization method to handle persistence state during serialization. + * + *

    This method is called during standard Java serialization. It clears the + * detached state after serialization if the entity is being serialized by + * OpenJPA, ensuring clean state transfer.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -444,7 +797,18 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method to restore persistence state after deserialization. + * + *

    This method is called during standard Java deserialization. It marks the + * entity as deserialized before reading the object data, allowing OpenJPA to + * properly recognize and handle the restored entity.

    + * + * @param objectInputStream ObjectInputStream the stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/NoteIssue.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/NoteIssue.java index f713a6ba43d..94474fd4c99 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/NoteIssue.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/NoteIssue.java @@ -18,6 +18,28 @@ import javax.persistence.Embeddable; import java.io.Serializable; +/** + * Embeddable JPA entity representing a clinical issue associated with a clinical note in the CAISI integrator system. + * + *

    This class represents a medical issue or diagnosis code that can be attached to clinical notes. + * It combines a code type (indicating the coding system used, such as ICD-9, ICD-10, SNOMED CT) with + * an issue code value to uniquely identify a clinical condition or diagnosis. NoteIssue instances are + * typically embedded within clinical note entities to track what medical issues or diagnoses were + * addressed during a patient encounter.

    + * + *

    The class is enhanced by OpenJPA for persistence and includes extensive JPA persistence capability + * methods for state management, field access control, and serialization support. It provides utility + * methods for converting between object and string representations to facilitate data interchange + * across CAISI integrator components.

    + * + *

    Healthcare Context: Clinical issues are fundamental to medical documentation, + * enabling proper tracking of diagnoses, billing code assignment, and clinical decision support. + * The code type enumeration supports multiple medical coding systems to accommodate different + * provincial and international healthcare standards.

    + * + * @see ca.openosp.openo.caisi_integrator.util.CodeType + * @since 2026-01-24 + */ @Embeddable public class NoteIssue implements Comparable, Serializable, PersistenceCapable { @@ -36,34 +58,84 @@ public class NoteIssue implements Comparable, Serializable, Persisten static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$NoteIssue; private transient Object pcDetachedState; + /** + * Default no-argument constructor required by JPA. + * + *

    Creates an uninitialized NoteIssue instance. The code type and issue code + * should be set using the appropriate setter methods after construction.

    + */ public NoteIssue() { } - + + /** + * Constructs a NoteIssue with the specified code type and issue code. + * + * @param codeType CodeType the coding system type (e.g., ICD-9, ICD-10, SNOMED CT) + * @param issueCode String the specific code value within the coding system + */ private NoteIssue(final CodeType codeType, final String issueCode) { this.codeType = codeType; this.issueCode = issueCode; } + /** + * Gets the code type indicating which coding system this issue belongs to. + * + * @return CodeType the coding system type (e.g., ICD-9, ICD-10, SNOMED CT), or null if not set + */ public CodeType getCodeType() { return pcGetcodeType(this); } - + + /** + * Sets the code type indicating which coding system this issue belongs to. + * + * @param codeType CodeType the coding system type to set + */ public void setCodeType(final CodeType codeType) { pcSetcodeType(this, codeType); } - + + /** + * Gets the specific issue code value within the coding system. + * + * @return String the issue code value, or null if not set + */ public String getIssueCode() { return pcGetissueCode(this); } - + + /** + * Sets the specific issue code value within the coding system. + * + * @param issueCode String the issue code value to set + */ public void setIssueCode(final String issueCode) { pcSetissueCode(this, issueCode); } + /** + * Converts this NoteIssue to a string representation in the format "CodeType.IssueCode". + * + *

    This method provides a concise string representation suitable for display and logging. + * The format follows the pattern: CodeType enumeration name, a period separator, and the issue code.

    + * + * @return String the formatted string representation (e.g., "ICD9.250.00") + */ public final String asString() { return String.format("%s.%s", this.getCodeType().name(), this.getIssueCode()); } + /** + * Converts a collection of NoteIssue objects to their string representations. + * + *

    This utility method transforms a set of NoteIssue instances into a set of formatted + * strings following the "CodeType.IssueCode" pattern. This is useful for serialization, + * display, or data interchange scenarios.

    + * + * @param issues HashSet<NoteIssue> the collection of NoteIssue objects to convert + * @return HashSet<String> a new set containing string representations of the issues + */ public static final HashSet toStrings(final HashSet issues) { final HashSet tmp = new HashSet(); for (final NoteIssue issue : issues) { @@ -72,6 +144,16 @@ public static final HashSet toStrings(final HashSet issues) { return tmp; } + /** + * Converts a collection of string representations to NoteIssue objects. + * + *

    This utility method parses a list of strings formatted as "CodeType.IssueCode" and + * creates corresponding NoteIssue instances. Invalid or malformed strings are logged as + * errors but do not interrupt processing; they are simply skipped.

    + * + * @param strings List<String> the list of string representations to convert + * @return HashSet<NoteIssue> a new set containing the successfully parsed NoteIssue objects + */ public static final HashSet fromStrings(final List strings) { final HashSet tmp = new HashSet(); for (final String item : strings) { @@ -85,6 +167,17 @@ public static final HashSet fromStrings(final List strings) { return tmp; } + /** + * Parses a string representation into a NoteIssue object. + * + *

    This method accepts a string in the format "CodeType.IssueCode" and constructs a + * corresponding NoteIssue instance. The code type portion must match a valid CodeType + * enumeration value.

    + * + * @param s String the string to parse (e.g., "ICD9.250.00") + * @return NoteIssue a new NoteIssue instance with the parsed code type and issue code + * @throws IllegalArgumentException if the string format is invalid or does not contain exactly one period separator + */ public static NoteIssue valueOf(final String s) { final String[] tempSplit = s.split("\\."); if (tempSplit.length == 2) { @@ -93,16 +186,35 @@ public static NoteIssue valueOf(final String s) { throw new IllegalArgumentException(s + ", split=" + tempSplit); } + /** + * Returns a string representation of this NoteIssue in the format "CodeType.IssueCode". + * + * @return String the formatted string representation + */ @Override public String toString() { return pcGetcodeType(this).name() + '.' + pcGetissueCode(this); } - + + /** + * Returns a hash code value for this NoteIssue based on the issue code. + * + * @return int the hash code value + */ @Override public int hashCode() { return pcGetissueCode(this).hashCode(); } - + + /** + * Compares this NoteIssue to another object for equality. + * + *

    Two NoteIssue instances are considered equal if they have the same code type + * and the same issue code value.

    + * + * @param o Object the object to compare with + * @return boolean true if the objects are equal, false otherwise + */ @Override public boolean equals(final Object o) { try { @@ -113,7 +225,17 @@ public boolean equals(final Object o) { return false; } } - + + /** + * Compares this NoteIssue to another NoteIssue for ordering. + * + *

    The comparison is based on the lexicographic ordering of the string representations + * in "CodeType.IssueCode" format.

    + * + * @param o NoteIssue the NoteIssue to compare to + * @return int a negative integer, zero, or a positive integer as this NoteIssue is less than, + * equal to, or greater than the specified NoteIssue + */ @Override public int compareTo(final NoteIssue o) { return this.toString().compareTo(o.toString()); @@ -127,10 +249,22 @@ public int compareTo(final NoteIssue o) { PCRegistry.register((NoteIssue.class$Lca$openosp$openo$caisi_integrator$dao$NoteIssue != null) ? NoteIssue.class$Lca$openosp$openo$caisi_integrator$dao$NoteIssue : (NoteIssue.class$Lca$openosp$openo$caisi_integrator$dao$NoteIssue = class$("ca.openosp.openo.caisi_integrator.dao.NoteIssue")), NoteIssue.pcFieldNames, NoteIssue.pcFieldTypes, NoteIssue.pcFieldFlags, NoteIssue.pcPCSuperclass, (String)null, (PersistenceCapable)new NoteIssue()); } + /** + * Gets the OpenJPA enhancement contract version for this persistence-capable class. + * + * @return int the enhancement contract version (2) + */ public int pcGetEnhancementContractVersion() { return 2; } - + + /** + * Reflectively loads a class by name. + * + * @param className String the fully qualified class name + * @return Class the loaded class + * @throws NoClassDefFoundError if the class cannot be found + */ static /* synthetic */ Class class$(final String className) { try { return Class.forName(className); @@ -139,12 +273,28 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all managed fields to their default null values. + * + *

    This method is used by OpenJPA during entity lifecycle management to reset + * the entity's state.

    + */ protected void pcClearFields() { this.codeType = null; this.issueCode = null; } + /** + * Creates a new NoteIssue instance with the specified state manager and object ID. + * + *

    This method is used by OpenJPA to create managed instances during entity lifecycle operations.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean if true, clears all fields after construction + * @return PersistenceCapable the newly created NoteIssue instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final NoteIssue noteIssue = new NoteIssue(); if (b) { @@ -154,7 +304,16 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final noteIssue.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)noteIssue; } - + + /** + * Creates a new NoteIssue instance with the specified state manager. + * + *

    This method is used by OpenJPA to create managed instances during entity lifecycle operations.

    + * + * @param pcStateManager StateManager the state manager to assign to the new instance + * @param b boolean if true, clears all fields after construction + * @return PersistenceCapable the newly created NoteIssue instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final NoteIssue noteIssue = new NoteIssue(); if (b) { @@ -163,11 +322,24 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final noteIssue.pcStateManager = pcStateManager; return (PersistenceCapable)noteIssue; } - + + /** + * Gets the total number of managed fields in this persistence-capable class. + * + * @return int the number of managed fields (2: codeType and issueCode) + */ protected static int pcGetManagedFieldCount() { return 2; } + /** + * Replaces a managed field value using the state manager. + * + *

    This method is called by OpenJPA to update field values during persistence operations.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - NoteIssue.pcInheritedFieldCount; if (n2 < 0) { @@ -187,13 +359,26 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple managed field values using the state manager. + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a managed field value to the state manager. + * + *

    This method is called by OpenJPA to retrieve field values during persistence operations.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - NoteIssue.pcInheritedFieldCount; if (n2 < 0) { @@ -213,13 +398,25 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides multiple managed field values to the state manager. + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } + /** + * Copies a single field value from another NoteIssue instance. + * + * @param noteIssue NoteIssue the source NoteIssue to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final NoteIssue noteIssue, final int n) { final int n2 = n - NoteIssue.pcInheritedFieldCount; if (n2 < 0) { @@ -239,7 +436,15 @@ protected void pcCopyField(final NoteIssue noteIssue, final int n) { } } } - + + /** + * Copies multiple field values from another NoteIssue instance. + * + * @param o Object the source NoteIssue to copy from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source has a different state manager + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final NoteIssue noteIssue = (NoteIssue)o; if (noteIssue.pcStateManager != this.pcStateManager) { @@ -253,24 +458,44 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Gets the generic context from the state manager. + * + * @return Object the generic context, or null if there is no state manager + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID from the state manager. + * + * @return Object the object ID, or null if there is no state manager + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks if this entity has been marked for deletion. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks if this entity has been modified since it was loaded or last persisted. + * + * @return boolean true if the entity is dirty, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -279,41 +504,82 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks if this entity is newly created and not yet persisted. + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks if this entity is persistent (managed by JPA). + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks if this entity is involved in a transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a field as dirty to trigger persistence on commit. + * + * @param s String the field name to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Gets the state manager for this persistence-capable instance. + * + * @return StateManager the state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Gets the version identifier for optimistic locking. + * + * @return Object the version identifier, or null if there is no state manager + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the state manager for this persistence-capable instance. + * + * @param pcStateManager StateManager the new state manager + * @throws SecurityException if the state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -322,22 +588,67 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key fields to an object ID using a field supplier. + * + *

    This embeddable has no key fields, so this method has no implementation.

    + * + * @param fieldSupplier FieldSupplier the field supplier + * @param o Object the object ID + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { } - + + /** + * Copies key fields to an object ID. + * + *

    This embeddable has no key fields, so this method has no implementation.

    + * + * @param o Object the object ID + */ public void pcCopyKeyFieldsToObjectId(final Object o) { } - + + /** + * Copies key fields from an object ID using a field consumer. + * + *

    This embeddable has no key fields, so this method has no implementation.

    + * + * @param fieldConsumer FieldConsumer the field consumer + * @param o Object the object ID + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { } - + + /** + * Copies key fields from an object ID. + * + *

    This embeddable has no key fields, so this method has no implementation.

    + * + * @param o Object the object ID + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { } - + + /** + * Creates a new object ID instance. + * + *

    This embeddable has no object ID, so this method returns null.

    + * + * @return Object null + */ public Object pcNewObjectIdInstance() { return null; } - + + /** + * Creates a new object ID instance from another object. + * + *

    This embeddable has no object ID, so this method returns null.

    + * + * @param o Object the object to create an ID from + * @return Object null + */ public Object pcNewObjectIdInstance(final Object o) { return null; } @@ -374,6 +685,11 @@ private static final void pcSetissueCode(final NoteIssue noteIssue, final String noteIssue.pcStateManager.settingStringField((PersistenceCapable)noteIssue, NoteIssue.pcInheritedFieldCount + 1, noteIssue.issueCode, issueCode, 0); } + /** + * Checks if this entity is detached from the persistence context. + * + * @return Boolean true if detached, false if attached, or null if the detached state is indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -394,19 +710,40 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Checks if the detached state is definitive. + * + * @return boolean always returns false for this embeddable + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Gets the detached state object. + * + * @return Object the detached state + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } + /** + * Custom serialization method to handle persistence-capable state. + * + * @param objectOutputStream ObjectOutputStream the output stream to write to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -414,7 +751,14 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method to handle persistence-capable state. + * + * @param objectInputStream ObjectInputStream the input stream to read from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/ProviderCommunication.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/ProviderCommunication.java index eb83cfc0bbd..86d778188f5 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/ProviderCommunication.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/ProviderCommunication.java @@ -22,6 +22,25 @@ import javax.persistence.Id; import javax.persistence.Entity; +/** + * Represents a communication message between healthcare providers across integrator facilities. + * + * This entity tracks inter-provider communications within the CAISI (Client Access to Integrated Services and Information) + * integrator system, enabling secure message exchange between providers at different healthcare facilities. Each communication + * record maintains the source and destination provider/facility identifiers, transmission timestamp, message type, and + * the actual message data as a serialized byte array. + * + *

    The entity is OpenJPA-enhanced for persistence and includes database indexes on destination facility and provider + * identifiers to optimize query performance for inbox/outbox operations. Messages can be marked as active or inactive + * to support soft deletion and archival workflows.

    + * + *

    This class is part of the CAISI integrator DAO layer which facilitates cross-facility healthcare data exchange + * while maintaining appropriate security boundaries and audit trails.

    + * + * @since 2026-01-24 + * @see AbstractModel + * @see ca.openosp.openo.caisi_integrator.dao + */ @Entity public class ProviderCommunication extends AbstractModel implements PersistenceCapable { @@ -60,7 +79,20 @@ public class ProviderCommunication extends AbstractModel implements Per static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Default constructor for ProviderCommunication entity. + * + *

    Initializes a new provider communication message with default values: + *

      + *
    • sentDate set to current timestamp
    • + *
    • active flag set to true
    • + *
    • all other fields set to null
    • + *
    + * + *

    This constructor is used by JPA/OpenJPA framework for entity instantiation + * and by application code when creating new communication messages.

    + */ public ProviderCommunication() { this.id = null; this.sourceIntegratorFacilityId = null; @@ -72,76 +104,202 @@ public ProviderCommunication() { this.type = null; this.data = null; } - + + /** + * Retrieves the unique identifier for this provider communication record. + * + * @return Integer the primary key identifier, or null if the entity has not been persisted yet + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Retrieves the integrator facility identifier of the message sender. + * + *

    This identifier corresponds to the healthcare facility in the integrator system + * from which the communication message originated.

    + * + * @return Integer the source facility's integrator identifier + */ public Integer getSourceIntegratorFacilityId() { return pcGetsourceIntegratorFacilityId(this); } - + + /** + * Sets the integrator facility identifier of the message sender. + * + * @param sourceIntegratorFacilityId Integer the source facility's integrator identifier (required, must not be null) + */ public void setSourceIntegratorFacilityId(final Integer sourceIntegratorFacilityId) { pcSetsourceIntegratorFacilityId(this, sourceIntegratorFacilityId); } - + + /** + * Retrieves the provider identifier of the message sender. + * + *

    This identifier uniquely identifies the healthcare provider who sent the communication + * within the context of their facility.

    + * + * @return String the source provider's identifier + */ public String getSourceProviderId() { return pcGetsourceProviderId(this); } - + + /** + * Sets the provider identifier of the message sender. + * + * @param sourceProviderId String the source provider's identifier (required, must not be null) + */ public void setSourceProviderId(final String sourceProviderId) { pcSetsourceProviderId(this, sourceProviderId); } - + + /** + * Retrieves the integrator facility identifier of the message recipient. + * + *

    This identifier corresponds to the healthcare facility in the integrator system + * to which the communication message is being sent. This field is indexed in the database + * to optimize queries for retrieving messages by destination facility.

    + * + * @return Integer the destination facility's integrator identifier + */ public Integer getDestinationIntegratorFacilityId() { return pcGetdestinationIntegratorFacilityId(this); } - + + /** + * Sets the integrator facility identifier of the message recipient. + * + * @param destinationIntegratorFacilityId Integer the destination facility's integrator identifier (required, must not be null) + */ public void setDestinationIntegratorFacilityId(final Integer destinationIntegratorFacilityId) { pcSetdestinationIntegratorFacilityId(this, destinationIntegratorFacilityId); } - + + /** + * Retrieves the provider identifier of the message recipient. + * + *

    This identifier uniquely identifies the healthcare provider who is receiving the communication + * within the context of their facility. This field is indexed in the database to optimize queries + * for retrieving a provider's inbox messages.

    + * + * @return String the destination provider's identifier + */ public String getDestinationProviderId() { return pcGetdestinationProviderId(this); } - + + /** + * Sets the provider identifier of the message recipient. + * + * @param destinationProviderId String the destination provider's identifier (required, must not be null) + */ public void setDestinationProviderId(final String destinationProviderId) { pcSetdestinationProviderId(this, destinationProviderId); } - + + /** + * Retrieves the timestamp when the communication message was sent. + * + *

    This timestamp is automatically set to the current date/time when a new ProviderCommunication + * instance is created. It provides an audit trail and chronological ordering of messages.

    + * + * @return Date the message transmission timestamp + */ public Date getSentDate() { return pcGetsentDate(this); } - + + /** + * Sets the timestamp when the communication message was sent. + * + * @param sentDate Date the message transmission timestamp (required, must not be null) + */ public void setSentDate(final Date sentDate) { pcSetsentDate(this, sentDate); } - + + /** + * Checks whether this communication message is active. + * + *

    The active flag supports soft deletion and archival workflows. Active messages (true) are + * typically displayed in provider inboxes and outboxes, while inactive messages (false) may be + * archived or logically deleted without being physically removed from the database.

    + * + * @return boolean true if the message is active, false if inactive/archived + */ public boolean isActive() { return pcGetactive(this); } - + + /** + * Sets the active status of this communication message. + * + * @param active boolean true to mark the message as active, false to mark as inactive/archived + */ public void setActive(final boolean active) { pcSetactive(this, active); } - + + /** + * Retrieves the serialized message data. + * + *

    The message content is stored as a byte array (MEDIUMBLOB in database) to support + * flexible message formats. The data typically contains serialized objects representing + * the actual communication content, which may include clinical notes, alerts, or other + * healthcare-related information.

    + * + * @return byte[] the serialized message content, or null if no data has been set + */ public byte[] getData() { return pcGetdata(this); } - + + /** + * Sets the serialized message data. + * + * @param data byte[] the serialized message content to store (may be null) + */ public void setData(final byte[] data) { pcSetdata(this, data); } - + + /** + * Retrieves the type classification of this communication message. + * + *

    The type field allows categorization of different kinds of provider communications + * (e.g., referrals, consultations, alerts, notifications). This field is indexed in the + * database to support efficient filtering and retrieval by message type.

    + * + * @return String the message type classification, or null if not set + */ public String getType() { return pcGettype(this); } - + + /** + * Sets the type classification of this communication message. + * + *

    The provided type value is automatically trimmed and converted to null if it contains + * only whitespace, ensuring data consistency.

    + * + * @param type String the message type classification (will be trimmed to null if blank) + */ public void setType(final String type) { pcSettype(this, StringUtils.trimToNull(type)); } - + + /** + * Returns the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to verify bytecode enhancement compatibility.

    + * + * @return int the enhancement contract version (always 2 for this entity) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -174,7 +332,18 @@ protected void pcClearFields() { this.sourceProviderId = null; this.type = null; } - + + /** + * Creates a new instance of this entity with the specified state manager and object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to instantiate entity objects during data retrieval operations.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID to copy key fields from + * @param b boolean whether to clear all fields after instantiation + * @return PersistenceCapable a new instance with the specified state manager and key fields + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final ProviderCommunication providerCommunication = new ProviderCommunication(); if (b) { @@ -184,7 +353,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final providerCommunication.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)providerCommunication; } - + + /** + * Creates a new instance of this entity with the specified state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to instantiate entity objects during persistence operations.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean whether to clear all fields after instantiation + * @return PersistenceCapable a new instance with the specified state manager + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final ProviderCommunication providerCommunication = new ProviderCommunication(); if (b) { @@ -197,7 +376,17 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final protected static int pcGetManagedFieldCount() { return 9; } - + + /** + * Replaces the value of a single field in this entity during OpenJPA state management. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to update individual field values from the state manager during operations + * like refresh or merge.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - ProviderCommunication.pcInheritedFieldCount; if (n2 < 0) { @@ -245,13 +434,31 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces the values of multiple fields in this entity during OpenJPA state management. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and delegates to + * {@link #pcReplaceField(int)} for each field index in the provided array.

    + * + * @param array int[] array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides the value of a single field to the OpenJPA state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to read field values from the entity into the state manager during operations + * like flush or detachment.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - ProviderCommunication.pcInheritedFieldCount; if (n2 < 0) { @@ -299,7 +506,15 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides the values of multiple fields to the OpenJPA state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and delegates to + * {@link #pcProvideField(int)} for each field index in the provided array.

    + * + * @param array int[] array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); @@ -353,7 +568,18 @@ protected void pcCopyField(final ProviderCommunication providerCommunication, fi } } } - + + /** + * Copies field values from another entity instance to this instance. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to copy field values between managed entity instances during merge operations.

    + * + * @param o Object the source ProviderCommunication instance to copy fields from + * @param array int[] array of field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if this entity's state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final ProviderCommunication providerCommunication = (ProviderCommunication)o; if (providerCommunication.pcStateManager != this.pcStateManager) { @@ -366,25 +592,57 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(providerCommunication, array[i]); } } - + + /** + * Retrieves the generic context object from the OpenJPA state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and provides access + * to framework-specific context information associated with this entity.

    + * + * @return Object the generic context, or null if no state manager is associated + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity from the OpenJPA state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and returns the + * unique identifier object used by the persistence framework to track this entity.

    + * + * @return Object the object ID, or null if no state manager is associated + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this entity has been deleted in the current persistence context. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates + * whether the entity has been marked for deletion in the current transaction.

    + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this entity has been modified in the current persistence context. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates + * whether any field values have been changed since the entity was loaded or last flushed.

    + * + * @return boolean true if the entity has pending changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -393,41 +651,106 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this entity is newly created and not yet persisted to the database. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates + * whether the entity has been created in the current transaction but not yet committed.

    + * + * @return boolean true if the entity is new and unsaved, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this entity is managed by the persistence context. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates + * whether the entity is currently being tracked by the OpenJPA state manager.

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this entity is participating in the current transaction. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and indicates + * whether the entity is being tracked within an active transaction context.

    + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Checks whether this entity is currently being serialized. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used during + * serialization to determine whether special handling is needed for detached state.

    + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks a specific field as dirty in the OpenJPA state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and notifies + * the state manager that a field has been modified and needs to be updated in the database.

    + * + * @param s String the name of the field that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the OpenJPA state manager associated with this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and provides + * access to the state manager that tracks this entity's persistence state.

    + * + * @return StateManager the associated state manager, or null if not managed + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version object for this entity from the OpenJPA state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and returns + * the version information used for optimistic locking and change tracking.

    + * + * @return Object the version object, or null if no state manager is associated + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework when transferring entity management between persistence contexts.

    + * + * @param pcStateManager StateManager the new state manager to associate with this entity + * @throws SecurityException if the replacement violates security constraints + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -435,27 +758,80 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key field values to an object ID using a field supplier. + * + *

    This method is part of the OpenJPA PersistenceCapable interface but is not implemented + * for this entity type as it uses application-identity with a single auto-generated key.

    + * + * @param fieldSupplier FieldSupplier the field supplier to copy values to + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key field values directly to an object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable interface but is not implemented + * for this entity type as it uses application-identity with a single auto-generated key.

    + * + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key field values from an object ID using a field consumer. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to populate the entity's ID field from an IntId object ID.

    + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key field value + * @param o Object the source IntId object containing the ID value + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(4 + ProviderCommunication.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key field values directly from an object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to set the entity's ID field from an IntId object ID.

    + * + * @param o Object the source IntId object containing the ID value + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to construct IntId objects from string keys.

    + * + * @param o Object a String containing the ID value + * @return Object a new IntId instance for this entity class + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((ProviderCommunication.class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication != null) ? ProviderCommunication.class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication : (ProviderCommunication.class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication = class$("ca.openosp.openo.caisi_integrator.dao.ProviderCommunication")), (String)o); } - + + /** + * Creates a new object ID instance based on this entity's current ID field. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to create IntId objects representing this entity's identity.

    + * + * @return Object a new IntId instance containing this entity's ID value + */ public Object pcNewObjectIdInstance() { return new IntId((ProviderCommunication.class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication != null) ? ProviderCommunication.class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication : (ProviderCommunication.class$Lca$openosp$openo$caisi_integrator$dao$ProviderCommunication = class$("ca.openosp.openo.caisi_integrator.dao.ProviderCommunication")), this.id); } @@ -603,7 +979,16 @@ private static final void pcSettype(final ProviderCommunication providerCommunic } providerCommunication.pcStateManager.settingStringField((PersistenceCapable)providerCommunication, ProviderCommunication.pcInheritedFieldCount + 8, providerCommunication.type, type, 0); } - + + /** + * Determines whether this entity is in a detached state. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and checks various + * indicators to determine if the entity has been detached from its persistence context. + * Returns null if the detached state cannot be definitively determined.

    + * + * @return Boolean true if detached, false if attached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -631,11 +1016,27 @@ public Boolean pcIsDetached() { private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and returns + * the state information stored when the entity was detached from its persistence context.

    + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable interface and is used internally + * by the framework to store state information when the entity is detached or deserialized.

    + * + * @param pcDetachedState Object the detached state to store + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/Referral.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/Referral.java index 0bce655877f..00ebce5c017 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/Referral.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/Referral.java @@ -22,6 +22,32 @@ import javax.persistence.Id; import javax.persistence.Entity; +/** + * JPA entity representing a healthcare referral between CAISI facilities within the OpenO EMR Integrator system. + * + *

    This class manages the complete lifecycle of patient referrals from a source healthcare facility/provider + * to a destination facility/program. Referrals are a critical component of coordinated care in community + * healthcare settings, enabling seamless patient transitions between different care programs and facilities.

    + * + *

    The referral entity tracks:

    + *
      + *
    • Source information: facility, patient demographic, and referring provider
    • + *
    • Destination information: facility and specific care program
    • + *
    • Clinical details: referral date, reason for referral, and presenting problem
    • + *
    + * + *

    This entity is enhanced by Apache OpenJPA for persistence management, implementing the + * {@link PersistenceCapable} interface to support advanced ORM features including lazy loading, + * dirty tracking, and detached entity management.

    + * + *

    Healthcare Context: In the CAISI (Client Access to Integrated Services and Information) + * system, referrals facilitate care coordination across multiple healthcare facilities and programs, supporting + * integrated service delivery for patients with complex care needs.

    + * + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class Referral extends AbstractModel implements PersistenceCapable { @@ -62,6 +88,12 @@ public class Referral extends AbstractModel implements PersistenceCapab private transient Object pcDetachedState; private static final long serialVersionUID; + /** + * Default constructor initializing all fields to null. + * + *

    Creates a new Referral instance with all properties unset. This constructor is primarily + * used by the JPA persistence framework when instantiating entities from database records.

    + */ public Referral() { this.id = null; this.sourceIntegratorFacilityId = null; @@ -74,83 +106,190 @@ public Referral() { this.presentingProblem = null; } + /** + * Gets the unique identifier for this referral. + * + * @return Integer the referral ID, or null if not yet persisted + */ @Override public Integer getId() { return pcGetid(this); } + /** + * Gets the unique identifier for this referral (alias for getId). + * + * @return Integer the referral ID, or null if not yet persisted + */ public Integer getReferralId() { return pcGetid(this); } + /** + * Sets the referral ID (not supported - IDs are auto-generated). + * + * @param id Integer the proposed ID value + * @throws UnsupportedOperationException always, as IDs are managed by the persistence framework + */ public void setReferralId(final Integer id) { throw new UnsupportedOperationException(); } + /** + * Gets the integrator facility ID of the referring healthcare facility. + * + * @return Integer the source facility ID in the integrator system + */ public Integer getSourceIntegratorFacilityId() { return pcGetsourceIntegratorFacilityId(this); } + /** + * Sets the integrator facility ID of the referring healthcare facility. + * + * @param sourceIntegratorFacilityId Integer the source facility ID in the integrator system + */ public void setSourceIntegratorFacilityId(final Integer sourceIntegratorFacilityId) { pcSetsourceIntegratorFacilityId(this, sourceIntegratorFacilityId); } + /** + * Gets the CAISI demographic ID of the patient being referred. + * + * @return Integer the patient's demographic ID in the source CAISI system + */ public Integer getSourceCaisiDemographicId() { return pcGetsourceCaisiDemographicId(this); } + /** + * Sets the CAISI demographic ID of the patient being referred. + * + * @param sourceCaisiDemographicId Integer the patient's demographic ID in the source CAISI system + */ public void setSourceCaisiDemographicId(final Integer sourceCaisiDemographicId) { pcSetsourceCaisiDemographicId(this, sourceCaisiDemographicId); } + /** + * Gets the CAISI provider ID of the healthcare provider making the referral. + * + * @return String the referring provider's ID in the source CAISI system + */ public String getSourceCaisiProviderId() { return pcGetsourceCaisiProviderId(this); } + /** + * Sets the CAISI provider ID of the healthcare provider making the referral. + * + *

    The value is automatically trimmed and converted to null if blank.

    + * + * @param sourceCaisiProviderId String the referring provider's ID in the source CAISI system + */ public void setSourceCaisiProviderId(final String sourceCaisiProviderId) { pcSetsourceCaisiProviderId(this, StringUtils.trimToNull(sourceCaisiProviderId)); } + /** + * Gets the integrator facility ID of the destination healthcare facility. + * + * @return Integer the destination facility ID in the integrator system + */ public Integer getDestinationIntegratorFacilityId() { return pcGetdestinationIntegratorFacilityId(this); } + /** + * Sets the integrator facility ID of the destination healthcare facility. + * + * @param destinationIntegratorFacilityId Integer the destination facility ID in the integrator system + */ public void setDestinationIntegratorFacilityId(final Integer destinationIntegratorFacilityId) { pcSetdestinationIntegratorFacilityId(this, destinationIntegratorFacilityId); } + /** + * Gets the CAISI program ID at the destination facility where the patient is being referred. + * + * @return Integer the destination program ID in the CAISI system + */ public Integer getDestinationCaisiProgramId() { return pcGetdestinationCaisiProgramId(this); } + /** + * Sets the CAISI program ID at the destination facility where the patient is being referred. + * + * @param destinationCaisiProgramId Integer the destination program ID in the CAISI system + */ public void setDestinationCaisiProgramId(final Integer destinationCaisiProgramId) { pcSetdestinationCaisiProgramId(this, destinationCaisiProgramId); } + /** + * Gets the date when this referral was made. + * + * @return Date the referral date and time + */ public Date getReferralDate() { return pcGetreferralDate(this); } + /** + * Sets the date when this referral was made. + * + * @param referralDate Date the referral date and time + */ public void setReferralDate(final Date referralDate) { pcSetreferralDate(this, referralDate); } + /** + * Gets the clinical reason for this referral. + * + * @return String the reason for referral, or null if not specified + */ public String getReasonForReferral() { return pcGetreasonForReferral(this); } + /** + * Sets the clinical reason for this referral. + * + *

    The value is automatically trimmed and converted to null if blank.

    + * + * @param reasonForReferral String the reason for referral + */ public void setReasonForReferral(final String reasonForReferral) { pcSetreasonForReferral(this, StringUtils.trimToNull(reasonForReferral)); } + /** + * Gets the patient's presenting problem that prompted this referral. + * + * @return String the presenting problem description, or null if not specified + */ public String getPresentingProblem() { return pcGetpresentingProblem(this); } + /** + * Sets the patient's presenting problem that prompted this referral. + * + *

    The value is automatically trimmed and converted to null if blank.

    + * + * @param presentingProblem String the presenting problem description + */ public void setPresentingProblem(final String presentingProblem) { pcSetpresentingProblem(this, StringUtils.trimToNull(presentingProblem)); } + /** + * Gets the OpenJPA enhancement contract version for this entity. + * + * @return int the enhancement contract version (always 2) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -172,6 +311,9 @@ public int pcGetEnhancementContractVersion() { } } + /** + * Clears all fields to null, used by OpenJPA for entity lifecycle management. + */ protected void pcClearFields() { this.destinationCaisiProgramId = null; this.destinationIntegratorFacilityId = null; @@ -184,6 +326,16 @@ protected void pcClearFields() { this.sourceIntegratorFacilityId = null; } + /** + * Creates a new instance of this entity with the specified state manager and object ID. + * + *

    This method is used by OpenJPA to create instances during database loading operations.

    + * + * @param pcStateManager StateManager the persistence state manager for this instance + * @param o Object the object ID to copy key fields from + * @param b boolean whether to clear all fields after initialization + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final Referral referral = new Referral(); if (b) { @@ -194,6 +346,15 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final return (PersistenceCapable)referral; } + /** + * Creates a new instance of this entity with the specified state manager. + * + *

    This method is used by OpenJPA to create instances during database loading operations.

    + * + * @param pcStateManager StateManager the persistence state manager for this instance + * @param b boolean whether to clear all fields after initialization + * @return PersistenceCapable the newly created instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final Referral referral = new Referral(); if (b) { @@ -203,10 +364,23 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final return (PersistenceCapable)referral; } + /** + * Gets the number of managed fields in this entity. + * + * @return int the count of managed fields (9) + */ protected static int pcGetManagedFieldCount() { return 9; } + /** + * Replaces a single field value from the persistence state manager. + * + *

    This method is called by OpenJPA during entity loading and refresh operations.

    + * + * @param n int the field index to replace + * @throws IllegalArgumentException if the field index is invalid + */ public void pcReplaceField(final int n) { final int n2 = n - Referral.pcInheritedFieldCount; if (n2 < 0) { @@ -255,12 +429,27 @@ public void pcReplaceField(final int n) { } } + /** + * Replaces multiple field values from the persistence state manager. + * + *

    This method is called by OpenJPA during entity loading and refresh operations.

    + * + * @param array int[] the array of field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } + /** + * Provides a single field value to the persistence state manager. + * + *

    This method is called by OpenJPA during entity flushing and detachment operations.

    + * + * @param n int the field index to provide + * @throws IllegalArgumentException if the field index is invalid + */ public void pcProvideField(final int n) { final int n2 = n - Referral.pcInheritedFieldCount; if (n2 < 0) { @@ -309,12 +498,28 @@ public void pcProvideField(final int n) { } } + /** + * Provides multiple field values to the persistence state manager. + * + *

    This method is called by OpenJPA during entity flushing and detachment operations.

    + * + * @param array int[] the array of field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } + /** + * Copies a single field value from another Referral instance. + * + *

    This method is used by OpenJPA for entity cloning and merge operations.

    + * + * @param referral Referral the source instance to copy from + * @param n int the field index to copy + * @throws IllegalArgumentException if the field index is invalid + */ protected void pcCopyField(final Referral referral, final int n) { final int n2 = n - Referral.pcInheritedFieldCount; if (n2 < 0) { @@ -363,6 +568,16 @@ protected void pcCopyField(final Referral referral, final int n) { } } + /** + * Copies multiple field values from another Referral instance. + * + *

    This method is used by OpenJPA for entity cloning and merge operations.

    + * + * @param o Object the source instance to copy from (must be a Referral) + * @param array int[] the array of field indices to copy + * @throws IllegalArgumentException if the source object has a different state manager + * @throws IllegalStateException if the state manager is null + */ public void pcCopyFields(final Object o, final int[] array) { final Referral referral = (Referral)o; if (referral.pcStateManager != this.pcStateManager) { @@ -376,6 +591,11 @@ public void pcCopyFields(final Object o, final int[] array) { } } + /** + * Gets the generic context from the persistence state manager. + * + * @return Object the generic context, or null if no state manager is attached + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; @@ -383,6 +603,11 @@ public Object pcGetGenericContext() { return this.pcStateManager.getGenericContext(); } + /** + * Fetches the object ID for this entity from the persistence state manager. + * + * @return Object the object ID, or null if no state manager is attached + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; @@ -390,10 +615,20 @@ public Object pcFetchObjectId() { return this.pcStateManager.fetchObjectId(); } + /** + * Checks if this entity is marked as deleted. + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } + /** + * Checks if this entity has been modified since it was loaded. + * + * @return boolean true if the entity has unsaved changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -403,22 +638,47 @@ public boolean pcIsDirty() { return pcStateManager.isDirty(); } + /** + * Checks if this entity is newly created and not yet persisted. + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } + /** + * Checks if this entity is managed by the persistence context. + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } + /** + * Checks if this entity is participating in a transaction. + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } + /** + * Checks if this entity is currently being serialized. + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } + /** + * Marks the specified field as dirty (modified). + * + * @param s String the field name to mark as dirty + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; @@ -426,10 +686,20 @@ public void pcDirty(final String s) { this.pcStateManager.dirty(s); } + /** + * Gets the persistence state manager for this entity. + * + * @return StateManager the state manager, or null if none is attached + */ public StateManager pcGetStateManager() { return this.pcStateManager; } + /** + * Gets the version identifier for optimistic locking. + * + * @return Object the version object, or null if no state manager is attached + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; @@ -437,6 +707,12 @@ public Object pcGetVersion() { return this.pcStateManager.getVersion(); } + /** + * Replaces the current state manager with a new one. + * + * @param pcStateManager StateManager the new state manager to use + * @throws SecurityException if state manager replacement is not allowed + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -445,26 +721,61 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu this.pcStateManager = pcStateManager; } + /** + * Copies key fields to an object ID using a field supplier (not supported for this entity). + * + * @param fieldSupplier FieldSupplier the field supplier + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } + /** + * Copies key fields to an object ID (not supported for this entity). + * + * @param o Object the target object ID + * @throws InternalException always, as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } + /** + * Copies key fields from an object ID using a field consumer. + * + * @param fieldConsumer FieldConsumer the field consumer to receive the key fields + * @param o Object the source object ID (must be an IntId) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(2 + Referral.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } + /** + * Copies key fields from an object ID. + * + * @param o Object the source object ID (must be an IntId) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } + /** + * Creates a new object ID instance from a string representation. + * + * @param o Object the string representation of the ID + * @return Object a new IntId instance + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((Referral.class$Lca$openosp$openo$caisi_integrator$dao$Referral != null) ? Referral.class$Lca$openosp$openo$caisi_integrator$dao$Referral : (Referral.class$Lca$openosp$openo$caisi_integrator$dao$Referral = class$("ca.openosp.openo.caisi_integrator.dao.Referral")), (String)o); } + /** + * Creates a new object ID instance from this entity's current ID value. + * + * @return Object a new IntId instance + */ public Object pcNewObjectIdInstance() { return new IntId((Referral.class$Lca$openosp$openo$caisi_integrator$dao$Referral != null) ? Referral.class$Lca$openosp$openo$caisi_integrator$dao$Referral : (Referral.class$Lca$openosp$openo$caisi_integrator$dao$Referral = class$("ca.openosp.openo.caisi_integrator.dao.Referral")), this.id); } @@ -613,6 +924,14 @@ private static final void pcSetsourceIntegratorFacilityId(final Referral referra referral.pcStateManager.settingObjectField((PersistenceCapable)referral, Referral.pcInheritedFieldCount + 8, (Object)referral.sourceIntegratorFacilityId, (Object)sourceIntegratorFacilityId, 0); } + /** + * Checks if this entity is in a detached state. + * + *

    A detached entity is one that was previously managed by a persistence context + * but is no longer associated with it.

    + * + * @return Boolean true if detached, false if attached, null if unknown + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -641,10 +960,20 @@ private boolean pcisDetachedStateDefinitive() { return false; } + /** + * Gets the detached state object for this entity. + * + * @return Object the detached state, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } + /** + * Sets the detached state object for this entity. + * + * @param pcDetachedState Object the detached state to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/SiteUser.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/SiteUser.java index 9931396f892..f4f67b48ed0 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/SiteUser.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/SiteUser.java @@ -26,6 +26,31 @@ import javax.persistence.Entity; import ca.openosp.openo.caisi_integrator.util.Named; +/** + * Represents a user account for accessing the CAISI Integrator system across multiple OpenO EMR sites. + * + *

    This entity manages user authentication and access control for the CAISI (Client Access to Integrated Services and Information) + * Integrator, which enables data sharing and integration between multiple OpenO EMR installations. Each SiteUser can access + * patient records and clinical data across federated healthcare sites within the integrator network.

    + * + *

    The class is enhanced by Apache OpenJPA for persistence capabilities and uses legacy SHA-1 + * password hashing. User accounts can be disabled to prevent access without deletion, and track + * last login timestamps for auditing purposes.

    + * + *

    Security Considerations:

    + *
      + *
    • Passwords are automatically hashed using SHA-1 via {@link EncryptionUtils}
    • + *
    • Usernames are validated and normalized through {@link MiscUtils#validateAndNormaliseUserName(String)}
    • + *
    • Accounts can be disabled without data loss through the disabled flag
    • + *
    • Last login tracking supports audit requirements for healthcare data access
    • + *
    + * + * @see AbstractModel + * @see Named + * @see ca.openosp.openo.caisi_integrator.util.EncryptionUtils + * @see ca.openosp.openo.caisi_integrator.util.MiscUtils + * @since 2026-01-24 + */ @Entity public class SiteUser extends AbstractModel implements Named, PersistenceCapable { @@ -53,7 +78,22 @@ public class SiteUser extends AbstractModel implements Named, Persisten static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$SiteUser; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Constructs a new SiteUser instance with default values. + * + *

    Initializes a new user account with:

    + *
      + *
    • No ID (null) - will be auto-generated upon persistence
    • + *
    • No username (null) - must be set via {@link #setName(String)}
    • + *
    • No password (null) - must be set via {@link #setPassword(String)}
    • + *
    • No last login timestamp (null)
    • + *
    • Enabled status (disabled = false)
    • + *
    + * + *

    This constructor is primarily used by JPA/OpenJPA for entity instantiation. + * After construction, the username and password should be set before persisting the entity.

    + */ public SiteUser() { this.id = null; this.name = null; @@ -61,47 +101,220 @@ public SiteUser() { this.lastLogin = null; this.disabled = false; } - + + /** + * Retrieves the unique identifier for this site user. + * + *

    The ID is auto-generated by the database upon first persistence and serves as the primary key + * for this entity. The value is null for transient (unsaved) instances and assigned automatically + * when the entity is persisted to the database.

    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field access tracking and dirty checking.

    + * + * @return Integer the unique database identifier, or null if not yet persisted + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Retrieves the username for this site user account. + * + *

    The username is a unique identifier (maximum 32 characters) used for authentication across + * the CAISI Integrator network. Usernames are validated and normalized when set to ensure consistency + * in the system.

    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field access tracking.

    + * + * @return String the username, or null if not set + */ public String getName() { return pcGetname(this); } - + + /** + * Sets the username for this site user account with validation and normalization. + * + *

    The provided username is automatically validated and normalized through + * {@link MiscUtils#validateAndNormaliseUserName(String)} before being stored. This ensures + * consistent username format across the CAISI Integrator system.

    + * + *

    Username requirements:

    + *
      + *
    • Maximum length: 32 characters (enforced by database constraint)
    • + *
    • Must be unique across all site users (enforced by database constraint)
    • + *
    • Automatically normalized to consistent format
    • + *
    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field modification tracking and change detection.

    + * + * @param name String the username to set (will be validated and normalized) + * @throws IllegalArgumentException if the username fails validation in MiscUtils + */ public void setName(final String name) { pcSetname(this, MiscUtils.validateAndNormaliseUserName(name)); } - + + /** + * Sets the password for this site user account with automatic SHA-1 hashing. + * + *

    The provided password is automatically hashed using SHA-1 via {@link EncryptionUtils#getSha1(String)} + * before being stored in the database. The plaintext password is never stored, only the hash value.

    + * + *

    Security Notes:

    + *
      + *
    • Password is hashed using SHA-1 before storage
    • + *
    • The hashed value is stored as a byte array (tinyblob in database)
    • + *
    • Plaintext password is never persisted
    • + *
    • Use {@link #checkPassword(String)} to verify passwords during authentication
    • + *
    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field modification tracking.

    + * + * @param password String the plaintext password to hash and store + * @throws IllegalArgumentException if password is null + * @see #checkPassword(String) + * @see EncryptionUtils#getSha1(String) + */ public void setPassword(final String password) { if (password == null) { throw new IllegalArgumentException("password can't be null"); } pcSetpassword(this, EncryptionUtils.getSha1(password)); } - + + /** + * Verifies if the provided password matches the stored password hash. + * + *

    This method performs password authentication by comparing the provided plaintext password + * against the stored hash. It supports two comparison modes for backward compatibility:

    + *
      + *
    1. Direct byte comparison (for legacy plaintext passwords)
    2. + *
    3. SHA-1 hash comparison (for properly hashed passwords)
    4. + *
    + * + *

    Authentication Logic:

    + *
      + *
    • Returns false immediately if provided password is null
    • + *
    • Checks if stored password matches plaintext bytes (legacy support)
    • + *
    • If not, hashes provided password and compares with stored hash
    • + *
    • Returns true if either comparison succeeds
    • + *
    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field access tracking.

    + * + * @param password String the plaintext password to verify + * @return boolean true if the password matches the stored hash, false otherwise + * @see #setPassword(String) + * @see EncryptionUtils#getSha1(String) + */ public boolean checkPassword(final String password) { return password != null && (Arrays.equals(pcGetpassword(this), password.getBytes()) || Arrays.equals(pcGetpassword(this), EncryptionUtils.getSha1(password))); } - + + /** + * Retrieves the timestamp of the user's last successful login. + * + *

    This field tracks the most recent authentication timestamp for audit and security purposes. + * It is stored as a TIMESTAMP in the database and can be used to:

    + *
      + *
    • Display last login information to users
    • + *
    • Identify inactive accounts for security reviews
    • + *
    • Support audit trails for healthcare data access compliance
    • + *
    • Detect unusual access patterns
    • + *
    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field access tracking.

    + * + * @return Calendar the last login timestamp, or null if the user has never logged in + */ public Calendar getLastLogin() { return pcGetlastLogin(this); } - + + /** + * Sets the timestamp of the user's last successful login. + * + *

    This method should be called during the authentication process to record when the user + * successfully logged into the CAISI Integrator system. The timestamp is used for security + * auditing and compliance with healthcare data access regulations.

    + * + *

    Typical usage is to set this value to the current time upon successful authentication:

    + *
    +     * user.setLastLogin(Calendar.getInstance());
    +     * 
    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field modification tracking and change detection.

    + * + * @param lastLogin Calendar the login timestamp to record, or null to clear + */ public void setLastLogin(final Calendar lastLogin) { pcSetlastLogin(this, lastLogin); } - + + /** + * Checks whether this user account is disabled. + * + *

    Disabled accounts cannot authenticate or access the CAISI Integrator system. This provides + * a way to revoke access without deleting the user record, preserving audit history and + * relationships in the database.

    + * + *

    Common reasons for disabling accounts:

    + *
      + *
    • Employee termination or role change
    • + *
    • Temporary suspension pending investigation
    • + *
    • Account security concerns
    • + *
    • Inactive accounts being archived
    • + *
    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field access tracking.

    + * + * @return boolean true if the account is disabled and cannot authenticate, false if active + */ public boolean isDisabled() { return pcGetdisabled(this); } - + + /** + * Sets whether this user account is disabled. + * + *

    Setting this value to true prevents the user from authenticating or accessing the CAISI + * Integrator system while preserving their account data and audit history. Setting it to false + * re-enables a previously disabled account.

    + * + *

    This is the preferred method for revoking access compared to deleting the user record, + * as it maintains referential integrity and audit trails required for healthcare compliance.

    + * + *

    This method is OpenJPA-enhanced and routes through the persistence state manager for proper + * field modification tracking and change detection.

    + * + * @param disabled boolean true to disable the account, false to enable it + */ public void setDisabled(final boolean disabled) { pcSetdisabled(this, disabled); } - + + /** + * Returns the OpenJPA enhancement contract version for this persistence-capable class. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and indicates + * which version of the bytecode enhancement contract this class implements. The value 2 + * represents the current enhancement contract version used by OpenJPA.

    + * + *

    This method is automatically invoked by the OpenJPA runtime and should not be called + * directly by application code.

    + * + * @return int the enhancement contract version (always 2 for this implementation) + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -130,7 +343,23 @@ protected void pcClearFields() { this.name = null; this.password = null; } - + + /** + * Creates a new instance of SiteUser with the specified state manager and object ID. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and is used by + * the OpenJPA runtime to instantiate entity objects during query execution and object retrieval. + * It creates a new instance, optionally clears its fields, assigns the state manager, and + * copies the primary key from the provided object ID.

    + * + *

    This method is automatically invoked by the OpenJPA runtime and should not be called + * directly by application code.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to manage this instance + * @param o Object the object ID containing the primary key value + * @param b boolean true to clear all fields to default values, false to leave as-is + * @return PersistenceCapable a new SiteUser instance with the specified configuration + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final SiteUser siteUser = new SiteUser(); if (b) { @@ -140,7 +369,22 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final siteUser.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)siteUser; } - + + /** + * Creates a new instance of SiteUser with the specified state manager. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and is used by + * the OpenJPA runtime to instantiate entity objects. It creates a new instance, optionally + * clears its fields, and assigns the state manager. This variant does not initialize the + * primary key from an object ID.

    + * + *

    This method is automatically invoked by the OpenJPA runtime and should not be called + * directly by application code.

    + * + * @param pcStateManager StateManager the OpenJPA state manager to manage this instance + * @param b boolean true to clear all fields to default values, false to leave as-is + * @return PersistenceCapable a new SiteUser instance with the specified configuration + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final SiteUser siteUser = new SiteUser(); if (b) { @@ -288,11 +532,32 @@ public Object pcFetchObjectId() { } return this.pcStateManager.fetchObjectId(); } - + + /** + * Checks whether this entity instance has been marked for deletion. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and indicates + * whether this instance has been deleted in the current transaction context. Returns true + * if the entity has been marked for deletion but the transaction has not yet been committed.

    + * + * @return boolean true if this entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Checks whether this entity instance has uncommitted changes. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and indicates + * whether this instance has been modified since it was loaded or last committed. Returns true + * if any fields have been changed but not yet persisted to the database.

    + * + *

    The method performs a dirty check via {@link RedefinitionHelper} before returning the + * state to ensure accuracy.

    + * + * @return boolean true if this entity has uncommitted changes, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -301,15 +566,43 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Checks whether this entity instance is newly created and not yet persisted. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and indicates + * whether this instance was created in the current transaction but has not yet been committed + * to the database. Returns true for new entities that will be inserted on transaction commit.

    + * + * @return boolean true if this is a new, unpersisted entity, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Checks whether this entity instance is managed by a persistence context. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and indicates + * whether this instance is in a persistent state (either newly created within a transaction, + * loaded from the database, or previously persisted). Transient instances that have never + * been associated with a persistence context will return false.

    + * + * @return boolean true if this entity is persistent, false if transient + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Checks whether this entity instance is associated with an active transaction. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and indicates + * whether this instance is currently participating in a transaction context. Returns true + * for instances that are within a transaction boundary.

    + * + * @return boolean true if this entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } @@ -447,7 +740,24 @@ private static final void pcSetpassword(final SiteUser siteUser, final byte[] pa } siteUser.pcStateManager.settingObjectField((PersistenceCapable)siteUser, SiteUser.pcInheritedFieldCount + 4, (Object)siteUser.password, (Object)password, 0); } - + + /** + * Checks whether this entity instance is in a detached state. + * + *

    This method is part of the OpenJPA {@link PersistenceCapable} interface and determines + * whether this instance is detached from its persistence context. A detached entity was + * previously managed but is no longer associated with an active persistence context.

    + * + *

    The detection logic follows these rules:

    + *
      + *
    • If a state manager is present, delegate to its detachment status
    • + *
    • If detached state is set (and not DESERIALIZED), return true
    • + *
    • If an ID is present without a state manager, assume detached
    • + *
    • Returns null if the detachment state cannot be definitively determined
    • + *
    + * + * @return Boolean true if detached, false if attached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/dao/SystemProperties.java b/src/main/java/ca/openosp/openo/caisi_integrator/dao/SystemProperties.java index b6f08334181..fea00e04d56 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/dao/SystemProperties.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/dao/SystemProperties.java @@ -15,6 +15,26 @@ import javax.persistence.Id; import javax.persistence.Entity; +/** + * System properties entity for the CAISI Integrator component of OpenO EMR. + * + *

    This entity stores system-level configuration and metadata for the CAISI (Client Access to + * Integrated Services and Information) Integrator, which enables healthcare data sharing across + * multiple OpenO EMR installations. The SystemProperties entity maintains critical system state + * including the database schema version to ensure data consistency during upgrades and migrations.

    + * + *

    This class is enhanced by OpenJPA for persistence capabilities and implements the JPA + * {@link PersistenceCapable} interface. The OpenJPA bytecode enhancement adds field-level tracking, + * state management, and lifecycle callbacks necessary for proper ORM functionality.

    + * + *

    Important: This entity has a singleton pattern enforced by a fixed ID value + * and prevents deletion through the {@link #jpaPreventDelete()} callback to maintain system + * integrity.

    + * + * @see AbstractModel + * @see PersistenceCapable + * @since 2026-01-24 + */ @Entity public class SystemProperties extends AbstractModel implements PersistenceCapable { @@ -33,26 +53,71 @@ public class SystemProperties extends AbstractModel implements Persiste static /* synthetic */ Class class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties; private transient Object pcDetachedState; private static final long serialVersionUID; - + + /** + * Constructs a new SystemProperties instance with default values. + * + *

    Initializes the system properties with a fixed ID of {@value #SYSTEM_PROPERTY_ID} and + * schema version of {@value #CODE_SCHEMA_VERSION}. The singleton pattern is enforced through + * this fixed ID value.

    + */ public SystemProperties() { this.id = Integer.valueOf(1); this.schemaVersion = 1; } - + + /** + * Retrieves the unique identifier for this system properties entity. + * + *

    This method is enhanced by OpenJPA to track field access through the persistence state + * manager. The ID is always {@value #SYSTEM_PROPERTY_ID} as this entity follows a singleton + * pattern.

    + * + * @return Integer the unique identifier, always returns {@value #SYSTEM_PROPERTY_ID} + */ @Override public Integer getId() { return pcGetid(this); } - + + /** + * Retrieves the database schema version for the CAISI Integrator system. + * + *

    This method is enhanced by OpenJPA to track field access through the persistence state + * manager. The schema version is used to determine database compatibility and trigger + * necessary migrations during system upgrades.

    + * + * @return int the current schema version number + */ public int getSchemaVersion() { return pcGetschemaVersion(this); } - + + /** + * JPA lifecycle callback that prevents deletion of system properties. + * + *

    This method is automatically invoked by the JPA persistence provider before an entity + * removal operation. It enforces system integrity by preventing deletion of the singleton + * SystemProperties entity, which contains critical system configuration that must always + * be present in the database.

    + * + * @throws UnsupportedOperationException always thrown to prevent deletion + */ @PreRemove protected void jpaPreventDelete() { throw new UnsupportedOperationException("Remove is not allowed for this type of item."); } - + + /** + * Returns the OpenJPA enhancement contract version for this entity. + * + *

    This method is part of the OpenJPA bytecode enhancement contract and indicates the + * version of the enhancement specification that was used to enhance this class. The value + * is used by OpenJPA to ensure compatibility between the enhanced class and the runtime + * persistence framework.

    + * + * @return int the enhancement contract version, always returns 2 + */ public int pcGetEnhancementContractVersion() { return 2; } @@ -73,12 +138,31 @@ public int pcGetEnhancementContractVersion() { throw new NoClassDefFoundError(ex.getMessage()); } } - + + /** + * Clears all persistent fields to their default values. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used during + * entity lifecycle management to reset field values. It sets the ID to null and schema + * version to 0, effectively clearing the entity's state.

    + */ protected void pcClearFields() { this.id = null; this.schemaVersion = 0; } - + + /** + * Creates a new instance of SystemProperties with the specified state manager and object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used by the + * persistence framework to create new entity instances during operations like queries and + * detachment. The object ID is copied to the new instance's key fields.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param o Object the object ID containing key field values + * @param b boolean if true, clears all fields before copying key fields + * @return PersistenceCapable the newly created SystemProperties instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final Object o, final boolean b) { final SystemProperties systemProperties = new SystemProperties(); if (b) { @@ -88,7 +172,18 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final systemProperties.pcCopyKeyFieldsFromObjectId(o); return (PersistenceCapable)systemProperties; } - + + /** + * Creates a new instance of SystemProperties with the specified state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used by the + * persistence framework to create new entity instances during operations that don't require + * copying an object ID.

    + * + * @param pcStateManager StateManager the state manager to associate with the new instance + * @param b boolean if true, clears all fields after construction + * @return PersistenceCapable the newly created SystemProperties instance + */ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final boolean b) { final SystemProperties systemProperties = new SystemProperties(); if (b) { @@ -97,11 +192,30 @@ public PersistenceCapable pcNewInstance(final StateManager pcStateManager, final systemProperties.pcStateManager = pcStateManager; return (PersistenceCapable)systemProperties; } - + + /** + * Returns the number of managed fields in this entity. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and indicates how many + * persistent fields are managed by the persistence framework. For SystemProperties, there + * are 2 managed fields: id and schemaVersion.

    + * + * @return int the number of managed fields, always returns 2 + */ protected static int pcGetManagedFieldCount() { return 2; } - + + /** + * Replaces a single persistent field with a value from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is invoked during + * state synchronization operations. It replaces the specified field (by index) with a value + * obtained from the state manager, ensuring the entity reflects the current persistence state.

    + * + * @param n int the absolute field index to replace + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcReplaceField(final int n) { final int n2 = n - SystemProperties.pcInheritedFieldCount; if (n2 < 0) { @@ -121,13 +235,32 @@ public void pcReplaceField(final int n) { } } } - + + /** + * Replaces multiple persistent fields with values from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and provides batch + * field replacement by delegating to {@link #pcReplaceField(int)} for each field index + * in the provided array.

    + * + * @param array int[] array of absolute field indices to replace + */ public void pcReplaceFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcReplaceField(array[i]); } } - + + /** + * Provides the current value of a single persistent field to the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is invoked during + * state synchronization to communicate field values to the persistence framework. The current + * value of the specified field (by index) is passed to the state manager.

    + * + * @param n int the absolute field index to provide + * @throws IllegalArgumentException if the field index is invalid or out of range + */ public void pcProvideField(final int n) { final int n2 = n - SystemProperties.pcInheritedFieldCount; if (n2 < 0) { @@ -147,13 +280,32 @@ public void pcProvideField(final int n) { } } } - + + /** + * Provides the current values of multiple persistent fields to the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and provides batch + * field value communication by delegating to {@link #pcProvideField(int)} for each field + * index in the provided array.

    + * + * @param array int[] array of absolute field indices to provide + */ public void pcProvideFields(final int[] array) { for (int i = 0; i < array.length; ++i) { this.pcProvideField(array[i]); } } - + + /** + * Copies the value of a single persistent field from another SystemProperties instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and is used to copy + * field values from one entity instance to another during operations like merge and refresh.

    + * + * @param systemProperties SystemProperties the source instance to copy from + * @param n int the absolute field index to copy + * @throws IllegalArgumentException if the field index is invalid or out of range + */ protected void pcCopyField(final SystemProperties systemProperties, final int n) { final int n2 = n - SystemProperties.pcInheritedFieldCount; if (n2 < 0) { @@ -173,7 +325,19 @@ protected void pcCopyField(final SystemProperties systemProperties, final int n) } } } - + + /** + * Copies the values of multiple persistent fields from another entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and provides batch + * field copying by delegating to {@link #pcCopyField(SystemProperties, int)} for each + * field index in the provided array. Both instances must share the same state manager.

    + * + * @param o Object the source instance to copy from (must be a SystemProperties instance) + * @param array int[] array of absolute field indices to copy + * @throws IllegalArgumentException if the source instance has a different state manager + * @throws IllegalStateException if this instance has no state manager + */ public void pcCopyFields(final Object o, final int[] array) { final SystemProperties systemProperties = (SystemProperties)o; if (systemProperties.pcStateManager != this.pcStateManager) { @@ -186,25 +350,59 @@ public void pcCopyFields(final Object o, final int[] array) { this.pcCopyField(systemProperties, array[i]); } } - + + /** + * Retrieves the generic context from the state manager. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and returns the generic + * context object associated with the persistence state manager, or null if no state manager + * is assigned.

    + * + * @return Object the generic context from the state manager, or null if no state manager exists + */ public Object pcGetGenericContext() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getGenericContext(); } - + + /** + * Fetches the object ID for this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and retrieves the + * object identity from the state manager, or null if no state manager is assigned.

    + * + * @return Object the object ID for this instance, or null if no state manager exists + */ public Object pcFetchObjectId() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.fetchObjectId(); } - + + /** + * Determines whether this entity instance has been deleted. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and queries the state + * manager to check if this entity is marked for deletion within the current persistence context.

    + * + * @return boolean true if the entity is deleted, false otherwise + */ public boolean pcIsDeleted() { return this.pcStateManager != null && this.pcStateManager.isDeleted(); } - + + /** + * Determines whether this entity instance has been modified. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and checks if any + * persistent fields have been modified since the entity was loaded or last synchronized + * with the database. The dirty check is performed through the state manager.

    + * + * @return boolean true if the entity has unsaved modifications, false otherwise + */ public boolean pcIsDirty() { if (this.pcStateManager == null) { return false; @@ -213,41 +411,112 @@ public boolean pcIsDirty() { RedefinitionHelper.dirtyCheck(pcStateManager); return pcStateManager.isDirty(); } - + + /** + * Determines whether this entity instance is newly created. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and queries the state + * manager to check if this entity is newly created and not yet persisted to the database.

    + * + * @return boolean true if the entity is new, false otherwise + */ public boolean pcIsNew() { return this.pcStateManager != null && this.pcStateManager.isNew(); } - + + /** + * Determines whether this entity instance is persistent. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and queries the state + * manager to check if this entity is managed by the persistence context (either loaded from + * the database or newly created within a transaction).

    + * + * @return boolean true if the entity is persistent, false otherwise + */ public boolean pcIsPersistent() { return this.pcStateManager != null && this.pcStateManager.isPersistent(); } - + + /** + * Determines whether this entity instance is transactional. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and queries the state + * manager to check if this entity is participating in an active transaction.

    + * + * @return boolean true if the entity is transactional, false otherwise + */ public boolean pcIsTransactional() { return this.pcStateManager != null && this.pcStateManager.isTransactional(); } - + + /** + * Determines whether this entity instance is currently being serialized. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and queries the state + * manager to check if the entity is in the process of being serialized. This affects how + * certain persistence operations are handled.

    + * + * @return boolean true if the entity is being serialized, false otherwise + */ public boolean pcSerializing() { return this.pcStateManager != null && this.pcStateManager.serializing(); } - + + /** + * Marks the specified field as dirty (modified). + * + *

    This method is part of the OpenJPA PersistenceCapable contract and notifies the state + * manager that the specified field has been modified, triggering change tracking and + * ensuring the modification will be persisted during the next flush or commit.

    + * + * @param s String the name of the field that has been modified + */ public void pcDirty(final String s) { if (this.pcStateManager == null) { return; } this.pcStateManager.dirty(s); } - + + /** + * Retrieves the state manager associated with this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and returns the + * state manager responsible for managing this entity's persistence lifecycle, change + * tracking, and database synchronization.

    + * + * @return StateManager the state manager for this entity, or null if not assigned + */ public StateManager pcGetStateManager() { return this.pcStateManager; } - + + /** + * Retrieves the version identifier for this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and returns the + * version object used for optimistic locking, or null if no state manager is assigned. + * The version is used to detect concurrent modifications.

    + * + * @return Object the version identifier, or null if no state manager exists + */ public Object pcGetVersion() { if (this.pcStateManager == null) { return null; } return this.pcStateManager.getVersion(); } - + + /** + * Replaces the current state manager with a new one. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and handles state + * manager replacement during operations like entity detachment and reattachment. If a + * state manager is already assigned, it delegates the replacement to the current manager.

    + * + * @param pcStateManager StateManager the new state manager to assign + * @throws SecurityException if the replacement violates security constraints + */ public void pcReplaceStateManager(final StateManager pcStateManager) throws SecurityException { if (this.pcStateManager != null) { this.pcStateManager = this.pcStateManager.replaceStateManager(pcStateManager); @@ -255,31 +524,99 @@ public void pcReplaceStateManager(final StateManager pcStateManager) throws Secu } this.pcStateManager = pcStateManager; } - + + /** + * Copies key fields to an object ID using a field supplier. + * + *

    This method is part of the OpenJPA PersistenceCapable contract. However, this + * implementation always throws an InternalException as SystemProperties uses application + * identity with a single ID field that is managed differently.

    + * + * @param fieldSupplier FieldSupplier the field supplier to use for copying + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final FieldSupplier fieldSupplier, final Object o) { throw new InternalException(); } - + + /** + * Copies key fields to an object ID. + * + *

    This method is part of the OpenJPA PersistenceCapable contract. However, this + * implementation always throws an InternalException as SystemProperties uses application + * identity with a single ID field that is managed differently.

    + * + * @param o Object the target object ID + * @throws InternalException always thrown as this operation is not supported + */ public void pcCopyKeyFieldsToObjectId(final Object o) { throw new InternalException(); } - + + /** + * Copies key fields from an object ID using a field consumer. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and extracts the ID + * value from an IntId object, storing it through the provided field consumer. This is used + * during entity instantiation and identity management.

    + * + * @param fieldConsumer FieldConsumer the field consumer to store the ID value + * @param o Object the source object ID (must be an IntId instance) + */ public void pcCopyKeyFieldsFromObjectId(final FieldConsumer fieldConsumer, final Object o) { fieldConsumer.storeObjectField(0 + SystemProperties.pcInheritedFieldCount, (Object)Integer.valueOf(((IntId)o).getId())); } - + + /** + * Copies key fields from an object ID directly to this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and extracts the ID + * value from an IntId object, assigning it directly to this entity's id field. This is used + * during entity instantiation and identity management.

    + * + * @param o Object the source object ID (must be an IntId instance) + */ public void pcCopyKeyFieldsFromObjectId(final Object o) { this.id = Integer.valueOf(((IntId)o).getId()); } - + + /** + * Creates a new object ID instance from a string representation. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and constructs a new + * IntId object from a string representation of the ID value. This is used for identity + * management and object ID parsing.

    + * + * @param o Object the string representation of the ID value + * @return Object a new IntId instance constructed from the string + */ public Object pcNewObjectIdInstance(final Object o) { return new IntId((SystemProperties.class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties != null) ? SystemProperties.class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties : (SystemProperties.class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties = class$("ca.openosp.openo.caisi_integrator.dao.SystemProperties")), (String)o); } - + + /** + * Creates a new object ID instance from this entity's current ID field. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and constructs a new + * IntId object using this entity's current id field value. This is used for identity + * management and persistence operations.

    + * + * @return Object a new IntId instance containing this entity's ID value + */ public Object pcNewObjectIdInstance() { return new IntId((SystemProperties.class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties != null) ? SystemProperties.class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties : (SystemProperties.class$Lca$openosp$openo$caisi_integrator$dao$SystemProperties = class$("ca.openosp.openo.caisi_integrator.dao.SystemProperties")), this.id); } - + + /** + * Static accessor for the id field with state manager tracking. + * + *

    This is an OpenJPA-enhanced accessor that notifies the state manager when the id + * field is accessed, enabling lazy loading and change tracking capabilities.

    + * + * @param systemProperties SystemProperties the instance to get the id from + * @return Integer the id value + */ private static final Integer pcGetid(final SystemProperties systemProperties) { if (systemProperties.pcStateManager == null) { return systemProperties.id; @@ -287,7 +624,16 @@ private static final Integer pcGetid(final SystemProperties systemProperties) { systemProperties.pcStateManager.accessingField(SystemProperties.pcInheritedFieldCount + 0); return systemProperties.id; } - + + /** + * Static mutator for the id field with state manager tracking. + * + *

    This is an OpenJPA-enhanced mutator that notifies the state manager when the id + * field is modified, enabling change tracking and dirty field management.

    + * + * @param systemProperties SystemProperties the instance to set the id on + * @param id Integer the new id value + */ private static final void pcSetid(final SystemProperties systemProperties, final Integer id) { if (systemProperties.pcStateManager == null) { systemProperties.id = id; @@ -295,7 +641,16 @@ private static final void pcSetid(final SystemProperties systemProperties, final } systemProperties.pcStateManager.settingObjectField((PersistenceCapable)systemProperties, SystemProperties.pcInheritedFieldCount + 0, (Object)systemProperties.id, (Object)id, 0); } - + + /** + * Static accessor for the schemaVersion field with state manager tracking. + * + *

    This is an OpenJPA-enhanced accessor that notifies the state manager when the + * schemaVersion field is accessed, enabling lazy loading and change tracking capabilities.

    + * + * @param systemProperties SystemProperties the instance to get the schema version from + * @return int the schema version value + */ private static final int pcGetschemaVersion(final SystemProperties systemProperties) { if (systemProperties.pcStateManager == null) { return systemProperties.schemaVersion; @@ -303,7 +658,16 @@ private static final int pcGetschemaVersion(final SystemProperties systemPropert systemProperties.pcStateManager.accessingField(SystemProperties.pcInheritedFieldCount + 1); return systemProperties.schemaVersion; } - + + /** + * Static mutator for the schemaVersion field with state manager tracking. + * + *

    This is an OpenJPA-enhanced mutator that notifies the state manager when the + * schemaVersion field is modified, enabling change tracking and dirty field management.

    + * + * @param systemProperties SystemProperties the instance to set the schema version on + * @param schemaVersion int the new schema version value + */ private static final void pcSetschemaVersion(final SystemProperties systemProperties, final int schemaVersion) { if (systemProperties.pcStateManager == null) { systemProperties.schemaVersion = schemaVersion; @@ -311,7 +675,16 @@ private static final void pcSetschemaVersion(final SystemProperties systemProper } systemProperties.pcStateManager.settingIntField((PersistenceCapable)systemProperties, SystemProperties.pcInheritedFieldCount + 1, systemProperties.schemaVersion, schemaVersion, 0); } - + + /** + * Determines whether this entity instance is detached from the persistence context. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and checks the + * detachment state of this entity. Returns true if detached, false if attached, or null + * if the detachment state cannot be determined definitively.

    + * + * @return Boolean true if detached, false if attached, null if indeterminate + */ public Boolean pcIsDetached() { if (this.pcStateManager != null) { if (this.pcStateManager.isDetached()) { @@ -332,19 +705,54 @@ public Boolean pcIsDetached() { return null; } } - + + /** + * Indicates whether the detached state can be determined definitively. + * + *

    This method is used internally by {@link #pcIsDetached()} to determine if the + * detachment status can be conclusively established based on available state information.

    + * + * @return boolean always returns false, indicating detached state is not definitive + */ private boolean pcisDetachedStateDefinitive() { return false; } - + + /** + * Retrieves the detached state object for this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and returns the + * detached state marker which indicates whether the entity was deserialized or explicitly + * detached from a persistence context.

    + * + * @return Object the detached state marker, or null if not detached + */ public Object pcGetDetachedState() { return this.pcDetachedState; } - + + /** + * Sets the detached state object for this entity instance. + * + *

    This method is part of the OpenJPA PersistenceCapable contract and updates the + * detached state marker to indicate the detachment status of the entity.

    + * + * @param pcDetachedState Object the detached state marker to set + */ public void pcSetDetachedState(final Object pcDetachedState) { this.pcDetachedState = pcDetachedState; } - + + /** + * Custom serialization method for Java serialization. + * + *

    This method handles serialization of the SystemProperties entity, preserving the + * detached state during the serialization process. If the entity is being serialized by + * the persistence framework, the detached state is cleared after writing.

    + * + * @param objectOutputStream ObjectOutputStream the stream to write the object to + * @throws IOException if an I/O error occurs during serialization + */ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOException { final boolean pcSerializing = this.pcSerializing(); objectOutputStream.defaultWriteObject(); @@ -352,7 +760,18 @@ private void writeObject(final ObjectOutputStream objectOutputStream) throws IOE this.pcSetDetachedState(null); } } - + + /** + * Custom deserialization method for Java serialization. + * + *

    This method handles deserialization of the SystemProperties entity, marking it as + * DESERIALIZED to indicate it was loaded through Java serialization rather than through + * the persistence framework.

    + * + * @param objectInputStream ObjectInputStream the stream to read the object from + * @throws IOException if an I/O error occurs during deserialization + * @throws ClassNotFoundException if the class of a serialized object cannot be found + */ private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException { this.pcSetDetachedState(PersistenceCapable.DESERIALIZED); objectInputStream.defaultReadObject(); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/AbstractModel.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/AbstractModel.java index ec7a7fa3ccc..3517f91a37a 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/AbstractModel.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/AbstractModel.java @@ -6,10 +6,50 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Abstract base model class for CAISI Integrator web service data transfer objects. + * + *

    This class serves as the foundation for JAXB-annotated model classes used in CAISI + * (Client Access to Integrated Services and Information) Integrator web services. The + * CAISI Integrator system enables inter-EMR data sharing and healthcare system integration + * across multiple OpenO EMR installations within a healthcare network.

    + * + *

    This abstract model provides:

    + *
      + *
    • XML serialization support through JAXB annotations for SOAP web services
    • + *
    • Java serialization support for distributed system communication
    • + *
    • Common base structure for healthcare data transfer objects
    • + *
    • Field-level XML access for consistent marshalling/unmarshalling behavior
    • + *
    + * + *

    The {@code @XmlAccessorType(XmlAccessType.FIELD)} annotation ensures that all fields + * in extending classes are automatically included in XML serialization without requiring + * getter/setter annotations, promoting consistent XML schema generation.

    + * + *

    Healthcare Context: This model is part of the CAISI Integrator + * infrastructure that facilitates secure PHI (Protected Health Information) exchange + * between healthcare facilities while maintaining compliance with HIPAA/PIPEDA regulations. + * All extending classes must ensure proper handling of sensitive patient data.

    + * + *

    Usage: This class is extended by specific data transfer models such as + * {@link Referral}, which represent healthcare entities transmitted between facilities via + * SOAP web services in the integrator system.

    + * + * @see Referral + * @see java.io.Serializable + * @since 2026-01-23 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "abstractModel") @XmlSeeAlso({ Referral.class }) public abstract class AbstractModel implements Serializable { + /** + * Serial version UID for Java serialization compatibility. + * + *

    This ensures that serialized instances of extending classes can be deserialized + * correctly across different versions of the OpenO EMR system, maintaining compatibility + * in distributed healthcare integration scenarios.

    + */ private static final long serialVersionUID = 1L; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedAppointment.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedAppointment.java index 2bf99206719..993c43ea51a 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedAppointment.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedAppointment.java @@ -10,6 +10,22 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Represents a cached appointment data transfer object used in CAISI integrator web service communications. + * + * This class provides a serializable representation of appointment information for inter-facility + * healthcare data exchange in the CAISI (Client Access to Integrated Services and Information) integration system. + * It captures comprehensive appointment details including scheduling information, patient demographics, + * provider assignments, and facility context for distributed EMR environments. + * + * The class uses JAXB annotations for XML serialization/deserialization to support SOAP-based web service + * communication between OpenO EMR installations and integrated healthcare systems. All temporal fields + * use Calendar objects with custom XML adapters to ensure proper datetime serialization. + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @since 2026-01-23 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cachedAppointment", propOrder = { "appointmentDate", "caisiDemographicId", "caisiProviderId", "createDatetime", "endTime", "facilityIdIntegerCompositePk", "location", "notes", "reason", "remarks", "resources", "startTime", "status", "style", "type", "updateDatetime" }) public class CachedAppointment extends AbstractModel implements Serializable @@ -46,131 +62,291 @@ public class CachedAppointment extends AbstractModel implements Serializable @XmlJavaTypeAdapter(Adapter1.class) @XmlSchemaType(name = "dateTime") protected Calendar updateDatetime; - + + /** + * Gets the scheduled appointment date. + * + * @return Calendar the date and time when the appointment is scheduled to occur + */ public Calendar getAppointmentDate() { return this.appointmentDate; } - + + /** + * Sets the scheduled appointment date. + * + * @param appointmentDate Calendar the date and time when the appointment is scheduled to occur + */ public void setAppointmentDate(final Calendar appointmentDate) { this.appointmentDate = appointmentDate; } - + + /** + * Gets the CAISI demographic identifier for the patient associated with this appointment. + * + * @return Integer the unique patient demographic identifier in the CAISI integration system + */ public Integer getCaisiDemographicId() { return this.caisiDemographicId; } - + + /** + * Sets the CAISI demographic identifier for the patient associated with this appointment. + * + * @param caisiDemographicId Integer the unique patient demographic identifier in the CAISI integration system + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { this.caisiDemographicId = caisiDemographicId; } - + + /** + * Gets the CAISI provider identifier for the healthcare provider assigned to this appointment. + * + * @return String the unique provider identifier in the CAISI integration system + */ public String getCaisiProviderId() { return this.caisiProviderId; } - + + /** + * Sets the CAISI provider identifier for the healthcare provider assigned to this appointment. + * + * @param caisiProviderId String the unique provider identifier in the CAISI integration system + */ public void setCaisiProviderId(final String caisiProviderId) { this.caisiProviderId = caisiProviderId; } - + + /** + * Gets the timestamp when this appointment record was created. + * + * @return Calendar the date and time when the appointment record was first created in the system + */ public Calendar getCreateDatetime() { return this.createDatetime; } - + + /** + * Sets the timestamp when this appointment record was created. + * + * @param createDatetime Calendar the date and time when the appointment record was first created in the system + */ public void setCreateDatetime(final Calendar createDatetime) { this.createDatetime = createDatetime; } - + + /** + * Gets the scheduled end time for the appointment. + * + * @return Calendar the date and time when the appointment is scheduled to end + */ public Calendar getEndTime() { return this.endTime; } - + + /** + * Sets the scheduled end time for the appointment. + * + * @param endTime Calendar the date and time when the appointment is scheduled to end + */ public void setEndTime(final Calendar endTime) { this.endTime = endTime; } - + + /** + * Gets the composite primary key representing the facility and record identifier for this appointment. + * + * @return FacilityIdIntegerCompositePk the facility-specific composite primary key for cross-facility appointment tracking + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return this.facilityIdIntegerCompositePk; } - + + /** + * Sets the composite primary key representing the facility and record identifier for this appointment. + * + * @param facilityIdIntegerCompositePk FacilityIdIntegerCompositePk the facility-specific composite primary key for cross-facility appointment tracking + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityIdIntegerCompositePk) { this.facilityIdIntegerCompositePk = facilityIdIntegerCompositePk; } - + + /** + * Gets the physical location where the appointment is scheduled to take place. + * + * @return String the location designation (e.g., room number, clinic area, or facility name) + */ public String getLocation() { return this.location; } - + + /** + * Sets the physical location where the appointment is scheduled to take place. + * + * @param location String the location designation (e.g., room number, clinic area, or facility name) + */ public void setLocation(final String location) { this.location = location; } - + + /** + * Gets the clinical notes or additional information associated with the appointment. + * + * @return String the appointment notes containing clinical observations or administrative information + */ public String getNotes() { return this.notes; } - + + /** + * Sets the clinical notes or additional information associated with the appointment. + * + * @param notes String the appointment notes containing clinical observations or administrative information + */ public void setNotes(final String notes) { this.notes = notes; } - + + /** + * Gets the primary reason or purpose for the appointment. + * + * @return String the reason code or description indicating the purpose of the appointment + */ public String getReason() { return this.reason; } - + + /** + * Sets the primary reason or purpose for the appointment. + * + * @param reason String the reason code or description indicating the purpose of the appointment + */ public void setReason(final String reason) { this.reason = reason; } - + + /** + * Gets additional remarks or comments about the appointment. + * + * @return String the supplementary remarks providing additional context or instructions for the appointment + */ public String getRemarks() { return this.remarks; } - + + /** + * Sets additional remarks or comments about the appointment. + * + * @param remarks String the supplementary remarks providing additional context or instructions for the appointment + */ public void setRemarks(final String remarks) { this.remarks = remarks; } - + + /** + * Gets the resources allocated or required for the appointment. + * + * @return String the resource identifiers for equipment, rooms, or staff assigned to the appointment + */ public String getResources() { return this.resources; } - + + /** + * Sets the resources allocated or required for the appointment. + * + * @param resources String the resource identifiers for equipment, rooms, or staff assigned to the appointment + */ public void setResources(final String resources) { this.resources = resources; } - + + /** + * Gets the scheduled start time for the appointment. + * + * @return Calendar the date and time when the appointment is scheduled to begin + */ public Calendar getStartTime() { return this.startTime; } - + + /** + * Sets the scheduled start time for the appointment. + * + * @param startTime Calendar the date and time when the appointment is scheduled to begin + */ public void setStartTime(final Calendar startTime) { this.startTime = startTime; } - + + /** + * Gets the current status of the appointment. + * + * @return String the appointment status code (e.g., scheduled, confirmed, completed, cancelled, no-show) + */ public String getStatus() { return this.status; } - + + /** + * Sets the current status of the appointment. + * + * @param status String the appointment status code (e.g., scheduled, confirmed, completed, cancelled, no-show) + */ public void setStatus(final String status) { this.status = status; } - + + /** + * Gets the visual style or display characteristics for the appointment. + * + * @return String the style identifier used for appointment display formatting in calendar views + */ public String getStyle() { return this.style; } - + + /** + * Sets the visual style or display characteristics for the appointment. + * + * @param style String the style identifier used for appointment display formatting in calendar views + */ public void setStyle(final String style) { this.style = style; } - + + /** + * Gets the appointment type classification. + * + * @return String the appointment type code indicating the category of visit (e.g., consultation, follow-up, procedure) + */ public String getType() { return this.type; } - + + /** + * Sets the appointment type classification. + * + * @param type String the appointment type code indicating the category of visit (e.g., consultation, follow-up, procedure) + */ public void setType(final String type) { this.type = type; } - + + /** + * Gets the timestamp when this appointment record was last updated. + * + * @return Calendar the date and time when the appointment record was most recently modified + */ public Calendar getUpdateDatetime() { return this.updateDatetime; } - + + /** + * Sets the timestamp when this appointment record was last updated. + * + * @param updateDatetime Calendar the date and time when the appointment record was most recently modified + */ public void setUpdateDatetime(final Calendar updateDatetime) { this.updateDatetime = updateDatetime; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicAllergy.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicAllergy.java index 80b7eac11e5..966b5f60751 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicAllergy.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicAllergy.java @@ -10,6 +10,34 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Cached representation of a patient's allergy information from the CAISI Integrator system. + * + *

    This class serves as a data transfer object (DTO) for allergy data retrieved from the + * CAISI (Client Access to Integrated Services and Information) Integrator web service. + * It provides a cached snapshot of patient allergy information to reduce the need for + * repeated web service calls when accessing allergy data across multiple EMR installations.

    + * + *

    The class captures comprehensive allergy information including:

    + *
      + *
    • Allergy description and classification codes
    • + *
    • Severity and reaction details
    • + *
    • Age of onset and life stage information
    • + *
    • Regional identifiers for inter-jurisdictional data sharing
    • + *
    • Facility and demographic associations
    • + *
    + * + *

    This cached allergy data is essential for clinical decision support, as it allows + * healthcare providers to quickly access critical patient safety information when prescribing + * medications or planning treatments, even when the source EMR system is temporarily unavailable.

    + * + *

    The class uses JAXB annotations for XML serialization, enabling seamless integration + * with SOAP-based web services used in the CAISI Integrator architecture.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @since 2026-01-24 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cachedDemographicAllergy", propOrder = { "agccs", "agcsp", "ageOfOnset", "caisiDemographicId", "description", "entryDate", "facilityIdIntegerCompositePk", "hicSeqNo", "hiclSeqNo", "lifeStage", "onSetCode", "pickId", "reaction", "regionalIdentifier", "severityCode", "startDate", "typeCode" }) public class CachedDemographicAllergy extends AbstractModel implements Serializable @@ -38,139 +66,361 @@ public class CachedDemographicAllergy extends AbstractModel implements Serializa @XmlSchemaType(name = "dateTime") protected Calendar startDate; protected int typeCode; - + + /** + * Gets the allergy group code - causative substance. + * + *

    This code represents the causative substance group classification for the allergy.

    + * + * @return int the allergy group code for causative substance + */ public int getAgccs() { return this.agccs; } - + + /** + * Sets the allergy group code - causative substance. + * + * @param agccs int the allergy group code for causative substance to set + */ public void setAgccs(final int agccs) { this.agccs = agccs; } - + + /** + * Gets the allergy group code - substance preparation. + * + *

    This code represents the substance preparation group classification for the allergy.

    + * + * @return int the allergy group code for substance preparation + */ public int getAgcsp() { return this.agcsp; } - + + /** + * Sets the allergy group code - substance preparation. + * + * @param agcsp int the allergy group code for substance preparation to set + */ public void setAgcsp(final int agcsp) { this.agcsp = agcsp; } - + + /** + * Gets the age of onset for the allergy. + * + *

    Indicates the patient's age when the allergy was first observed or reported.

    + * + * @return String the age of onset, may be null if not recorded + */ public String getAgeOfOnset() { return this.ageOfOnset; } - + + /** + * Sets the age of onset for the allergy. + * + * @param ageOfOnset String the age of onset to set + */ public void setAgeOfOnset(final String ageOfOnset) { this.ageOfOnset = ageOfOnset; } - + + /** + * Gets the CAISI demographic ID. + * + *

    This is the unique identifier for the patient (demographic) within the CAISI + * Integrator system, used to link allergy records to the correct patient across + * multiple integrated EMR installations.

    + * + * @return int the CAISI demographic identifier + */ public int getCaisiDemographicId() { return this.caisiDemographicId; } - + + /** + * Sets the CAISI demographic ID. + * + * @param caisiDemographicId int the CAISI demographic identifier to set + */ public void setCaisiDemographicId(final int caisiDemographicId) { this.caisiDemographicId = caisiDemographicId; } - + + /** + * Gets the allergy description. + * + *

    This is a human-readable description of the allergy, typically including the + * allergen name and may include additional clinical notes.

    + * + * @return String the allergy description, may be null + */ public String getDescription() { return this.description; } - + + /** + * Sets the allergy description. + * + * @param description String the allergy description to set + */ public void setDescription(final String description) { this.description = description; } - + + /** + * Gets the date when this allergy record was entered into the system. + * + *

    This represents the timestamp when the allergy information was first recorded + * in the EMR system, which may differ from the onset date of the allergy itself.

    + * + * @return Calendar the entry date, may be null + */ public Calendar getEntryDate() { return this.entryDate; } - + + /** + * Sets the date when this allergy record was entered into the system. + * + * @param entryDate Calendar the entry date to set + */ public void setEntryDate(final Calendar entryDate) { this.entryDate = entryDate; } - + + /** + * Gets the composite primary key identifying the facility. + * + *

    This composite key uniquely identifies the healthcare facility where the allergy + * record originates, enabling proper data attribution in multi-facility environments.

    + * + * @return FacilityIdIntegerCompositePk the facility identifier composite key, may be null + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return this.facilityIdIntegerCompositePk; } - + + /** + * Sets the composite primary key identifying the facility. + * + * @param facilityIdIntegerCompositePk FacilityIdIntegerCompositePk the facility identifier to set + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityIdIntegerCompositePk) { this.facilityIdIntegerCompositePk = facilityIdIntegerCompositePk; } - + + /** + * Gets the health insurance coverage sequence number. + * + *

    This sequence number is used to track the health insurance coverage associated + * with the allergy record for billing and administrative purposes.

    + * + * @return int the health insurance coverage sequence number + */ public int getHicSeqNo() { return this.hicSeqNo; } - + + /** + * Sets the health insurance coverage sequence number. + * + * @param hicSeqNo int the health insurance coverage sequence number to set + */ public void setHicSeqNo(final int hicSeqNo) { this.hicSeqNo = hicSeqNo; } - + + /** + * Gets the health insurance coverage line sequence number. + * + *

    This sequence number provides a more granular level of tracking within the + * health insurance coverage for administrative and billing purposes.

    + * + * @return int the health insurance coverage line sequence number + */ public int getHiclSeqNo() { return this.hiclSeqNo; } - + + /** + * Sets the health insurance coverage line sequence number. + * + * @param hiclSeqNo int the health insurance coverage line sequence number to set + */ public void setHiclSeqNo(final int hiclSeqNo) { this.hiclSeqNo = hiclSeqNo; } - + + /** + * Gets the life stage when the allergy was identified. + * + *

    Indicates the patient's life stage (e.g., infant, child, adult, senior) when + * the allergy was first identified, which can be clinically relevant for understanding + * allergy development and potential resolution over time.

    + * + * @return String the life stage description, may be null + */ public String getLifeStage() { return this.lifeStage; } - + + /** + * Sets the life stage when the allergy was identified. + * + * @param lifeStage String the life stage description to set + */ public void setLifeStage(final String lifeStage) { this.lifeStage = lifeStage; } - + + /** + * Gets the onset code for the allergy. + * + *

    This coded value represents the type or timing of allergy onset, which may be + * used for clinical classification and reporting purposes.

    + * + * @return String the onset code, may be null + */ public String getOnSetCode() { return this.onSetCode; } - + + /** + * Sets the onset code for the allergy. + * + * @param onSetCode String the onset code to set + */ public void setOnSetCode(final String onSetCode) { this.onSetCode = onSetCode; } - + + /** + * Gets the pick list identifier. + * + *

    This identifier references a standardized allergy code from a pick list or + * clinical terminology system, enabling consistent allergy coding across the EMR.

    + * + * @return int the pick list identifier + */ public int getPickId() { return this.pickId; } - + + /** + * Sets the pick list identifier. + * + * @param pickId int the pick list identifier to set + */ public void setPickId(final int pickId) { this.pickId = pickId; } - + + /** + * Gets the allergic reaction description. + * + *

    This field captures the clinical manifestation of the allergy, such as rash, + * anaphylaxis, respiratory distress, etc. This information is critical for clinical + * decision support and patient safety.

    + * + * @return String the reaction description, may be null + */ public String getReaction() { return this.reaction; } - + + /** + * Sets the allergic reaction description. + * + * @param reaction String the reaction description to set + */ public void setReaction(final String reaction) { this.reaction = reaction; } - + + /** + * Gets the regional identifier for the allergy record. + * + *

    This identifier enables allergy data to be tracked and shared across different + * healthcare jurisdictions or regions, supporting inter-regional patient care coordination.

    + * + * @return String the regional identifier, may be null + */ public String getRegionalIdentifier() { return this.regionalIdentifier; } - + + /** + * Sets the regional identifier for the allergy record. + * + * @param regionalIdentifier String the regional identifier to set + */ public void setRegionalIdentifier(final String regionalIdentifier) { this.regionalIdentifier = regionalIdentifier; } - + + /** + * Gets the severity code for the allergy. + * + *

    This coded value indicates the severity level of the allergic reaction + * (e.g., mild, moderate, severe, life-threatening). This is essential information + * for clinical decision support and medication safety alerts.

    + * + * @return String the severity code, may be null + */ public String getSeverityCode() { return this.severityCode; } - + + /** + * Sets the severity code for the allergy. + * + * @param severityCode String the severity code to set + */ public void setSeverityCode(final String severityCode) { this.severityCode = severityCode; } - + + /** + * Gets the date when the allergy symptoms first started. + * + *

    This represents the clinical onset date of the allergy, which may differ from + * the entry date when the record was created in the system.

    + * + * @return Calendar the start date of the allergy, may be null + */ public Calendar getStartDate() { return this.startDate; } - + + /** + * Sets the date when the allergy symptoms first started. + * + * @param startDate Calendar the start date of the allergy to set + */ public void setStartDate(final Calendar startDate) { this.startDate = startDate; } - + + /** + * Gets the allergy type code. + * + *

    This code classifies the type of allergy (e.g., drug allergy, food allergy, + * environmental allergy) for proper clinical categorization and reporting.

    + * + * @return int the type code + */ public int getTypeCode() { return this.typeCode; } - + + /** + * Sets the allergy type code. + * + * @param typeCode int the type code to set + */ public void setTypeCode(final int typeCode) { this.typeCode = typeCode; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDocument.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDocument.java index f5d092cb6a4..d2339493d72 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDocument.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDocument.java @@ -10,6 +10,33 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Represents a cached demographic document in the CAISI Integrator system. + * + *

    This class is a JAXB-annotated data transfer object used for web service communication + * in the CAISI (Client Access to Integrated Services and Information) Integrator module. + * It encapsulates patient demographic documents with metadata including appointment associations, + * document content, review status, and temporal tracking information.

    + * + *

    The cached document includes comprehensive metadata for healthcare document management: + *

      + *
    • Document identification (filename, type, creator)
    • + *
    • Content and format information (contentType, docXml, numberOfPages)
    • + *
    • Healthcare context (appointmentNo, programId, caisiDemographicId)
    • + *
    • Workflow tracking (status, reviewer, reviewDateTime)
    • + *
    • Access control (responsible provider, public visibility flag)
    • + *
    • Temporal metadata (observationDate, updateDateTime)
    • + *
    • Multi-facility support via composite primary key
    • + *
    + *

    + * + *

    The class is configured for JAXB XML serialization with field-based access and + * defined property ordering for consistent XML output in inter-EMR communication.

    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @since 2026-01-23 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cachedDemographicDocument", propOrder = { "appointmentNo", "caisiDemographicId", "contentType", "description", "docCreator", "docFilename", "docType", "docXml", "facilityIntegerPk", "numberOfPages", "observationDate", "programId", "public1", "responsible", "reviewDateTime", "reviewer", "source", "status", "updateDateTime" }) public class CachedDemographicDocument extends AbstractModel implements Serializable @@ -43,155 +70,345 @@ public class CachedDemographicDocument extends AbstractModel implements Serializ @XmlJavaTypeAdapter(Adapter1.class) @XmlSchemaType(name = "dateTime") protected Calendar updateDateTime; - + + /** + * Gets the appointment number associated with this document. + * + * @return int the appointment identifier + */ public int getAppointmentNo() { return this.appointmentNo; } - + + /** + * Sets the appointment number for this document. + * + * @param appointmentNo int the appointment identifier to associate with this document + */ public void setAppointmentNo(final int appointmentNo) { this.appointmentNo = appointmentNo; } - + + /** + * Gets the CAISI demographic identifier for the patient. + * + * @return int the CAISI-specific demographic ID + */ public int getCaisiDemographicId() { return this.caisiDemographicId; } - + + /** + * Sets the CAISI demographic identifier for the patient. + * + * @param caisiDemographicId int the CAISI-specific demographic ID + */ public void setCaisiDemographicId(final int caisiDemographicId) { this.caisiDemographicId = caisiDemographicId; } - + + /** + * Gets the MIME content type of the document. + * + * @return String the document content type (e.g., "application/pdf", "text/html") + */ public String getContentType() { return this.contentType; } - + + /** + * Sets the MIME content type of the document. + * + * @param contentType String the document content type to set + */ public void setContentType(final String contentType) { this.contentType = contentType; } - + + /** + * Gets the human-readable description of the document. + * + * @return String the document description + */ public String getDescription() { return this.description; } - + + /** + * Sets the human-readable description of the document. + * + * @param description String the document description to set + */ public void setDescription(final String description) { this.description = description; } - + + /** + * Gets the identifier of the provider or user who created the document. + * + * @return String the document creator identifier + */ public String getDocCreator() { return this.docCreator; } - + + /** + * Sets the identifier of the provider or user who created the document. + * + * @param docCreator String the document creator identifier to set + */ public void setDocCreator(final String docCreator) { this.docCreator = docCreator; } - + + /** + * Gets the filename of the stored document. + * + * @return String the document filename + */ public String getDocFilename() { return this.docFilename; } - + + /** + * Sets the filename of the stored document. + * + * @param docFilename String the document filename to set + */ public void setDocFilename(final String docFilename) { this.docFilename = docFilename; } - + + /** + * Gets the document type classification. + * + * @return String the document type (e.g., "lab report", "consultation", "imaging") + */ public String getDocType() { return this.docType; } - + + /** + * Sets the document type classification. + * + * @param docType String the document type to set + */ public void setDocType(final String docType) { this.docType = docType; } - + + /** + * Gets the XML representation of the document content. + * + * @return String the document content in XML format + */ public String getDocXml() { return this.docXml; } - + + /** + * Sets the XML representation of the document content. + * + * @param docXml String the document content in XML format to set + */ public void setDocXml(final String docXml) { this.docXml = docXml; } - + + /** + * Gets the composite primary key containing facility and item identifiers. + * + * @return FacilityIdIntegerCompositePk the facility-item composite key + */ public FacilityIdIntegerCompositePk getFacilityIntegerPk() { return this.facilityIntegerPk; } - + + /** + * Sets the composite primary key containing facility and item identifiers. + * + * @param facilityIntegerPk FacilityIdIntegerCompositePk the facility-item composite key to set + */ public void setFacilityIntegerPk(final FacilityIdIntegerCompositePk facilityIntegerPk) { this.facilityIntegerPk = facilityIntegerPk; } - + + /** + * Gets the total number of pages in the document. + * + * @return int the page count + */ public int getNumberOfPages() { return this.numberOfPages; } - + + /** + * Sets the total number of pages in the document. + * + * @param numberOfPages int the page count to set + */ public void setNumberOfPages(final int numberOfPages) { this.numberOfPages = numberOfPages; } - + + /** + * Gets the date and time when the clinical observation occurred. + * + * @return Calendar the observation date and time + */ public Calendar getObservationDate() { return this.observationDate; } - + + /** + * Sets the date and time when the clinical observation occurred. + * + * @param observationDate Calendar the observation date and time to set + */ public void setObservationDate(final Calendar observationDate) { this.observationDate = observationDate; } - + + /** + * Gets the program identifier associated with this document. + * + * @return Integer the program ID, or null if not associated with a program + */ public Integer getProgramId() { return this.programId; } - + + /** + * Sets the program identifier associated with this document. + * + * @param programId Integer the program ID to set, or null to disassociate + */ public void setProgramId(final Integer programId) { this.programId = programId; } - + + /** + * Gets the public visibility flag for the document. + * + * @return int the public flag (1 for public, 0 for private) + */ public int getPublic1() { return this.public1; } - + + /** + * Sets the public visibility flag for the document. + * + * @param public1 int the public flag to set (1 for public, 0 for private) + */ public void setPublic1(final int public1) { this.public1 = public1; } - + + /** + * Gets the identifier of the provider responsible for this document. + * + * @return String the responsible provider identifier + */ public String getResponsible() { return this.responsible; } - + + /** + * Sets the identifier of the provider responsible for this document. + * + * @param responsible String the responsible provider identifier to set + */ public void setResponsible(final String responsible) { this.responsible = responsible; } - + + /** + * Gets the date and time when the document was reviewed. + * + * @return Calendar the review date and time, or null if not yet reviewed + */ public Calendar getReviewDateTime() { return this.reviewDateTime; } - + + /** + * Sets the date and time when the document was reviewed. + * + * @param reviewDateTime Calendar the review date and time to set + */ public void setReviewDateTime(final Calendar reviewDateTime) { this.reviewDateTime = reviewDateTime; } - + + /** + * Gets the identifier of the provider who reviewed the document. + * + * @return String the reviewer identifier, or null if not yet reviewed + */ public String getReviewer() { return this.reviewer; } - + + /** + * Sets the identifier of the provider who reviewed the document. + * + * @param reviewer String the reviewer identifier to set + */ public void setReviewer(final String reviewer) { this.reviewer = reviewer; } - + + /** + * Gets the source system or origin of the document. + * + * @return String the document source identifier + */ public String getSource() { return this.source; } - + + /** + * Sets the source system or origin of the document. + * + * @param source String the document source identifier to set + */ public void setSource(final String source) { this.source = source; } - + + /** + * Gets the current workflow status of the document. + * + * @return String the document status (e.g., "active", "archived", "pending review") + */ public String getStatus() { return this.status; } - + + /** + * Sets the current workflow status of the document. + * + * @param status String the document status to set + */ public void setStatus(final String status) { this.status = status; } - + + /** + * Gets the date and time when the document was last updated. + * + * @return Calendar the last update date and time + */ public Calendar getUpdateDateTime() { return this.updateDateTime; } - + + /** + * Sets the date and time when the document was last updated. + * + * @param updateDateTime Calendar the last update date and time to set + */ public void setUpdateDateTime(final Calendar updateDateTime) { this.updateDateTime = updateDateTime; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDrug.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDrug.java index ce0f4c510f3..9c44d7312c4 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDrug.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedDemographicDrug.java @@ -10,6 +10,33 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Represents a cached demographic drug record for CAISI integrator web services. + * + * This class is a data transfer object (DTO) used in web service communication for the CAISI + * (Collaborative Application for Integrated Services Information) integrator system. It encapsulates + * comprehensive medication information associated with a patient demographic record, including + * prescription details, drug identification (ATC codes, brand/generic names), dosage instructions, + * administration routes, and archival tracking. + * + * The class supports JAXB XML serialization for inter-system communication within the OpenO EMR + * healthcare integration framework, enabling medication data exchange between multiple EMR installations + * and healthcare facilities. + * + * Key healthcare concepts represented: + *
      + *
    • ATC (Anatomical Therapeutic Chemical) drug classification codes
    • + *
    • Prescription details including dosage, frequency, duration, and route of administration
    • + *
    • Drug substitution controls and PRN (as needed) medication flags
    • + *
    • Multi-facility support through composite primary key references
    • + *
    • Regional identifier support for provincial healthcare system integration
    • + *
    • Medication history tracking including archival status and refill dates
    • + *
    + * + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @since 2026-01-24 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cachedDemographicDrug", propOrder = { "archived", "archivedDate", "archivedReason", "atc", "brandName", "caisiDemographicId", "caisiProviderId", "createDate", "customInstructions", "customName", "dosage", "drugForm", "durUnit", "duration", "endDate", "facilityIdIntegerCompositePk", "freqCode", "genericName", "lastRefillDate", "longTerm", "method", "noSubs", "pastMed", "patientCompliance", "prn", "quantity", "regionalIdentifier", "repeats", "route", "rxDate", "scriptNo", "special", "takeMax", "takeMin", "unit", "unitName" }) public class CachedDemographicDrug extends AbstractModel implements Serializable @@ -66,291 +93,734 @@ public class CachedDemographicDrug extends AbstractModel implements Serializable protected float takeMin; protected String unit; protected String unitName; - + + /** + * Checks if this drug record has been archived. + * + * @return boolean true if the drug record is archived, false otherwise + */ public boolean isArchived() { return this.archived; } - + + /** + * Sets the archived status of this drug record. + * + * @param archived boolean indicating whether the drug record should be archived + */ public void setArchived(final boolean archived) { this.archived = archived; } - + + /** + * Gets the date when this drug record was archived. + * + * @return Calendar the date and time when the drug record was archived, or null if not archived + */ public Calendar getArchivedDate() { return this.archivedDate; } - + + /** + * Sets the date when this drug record was archived. + * + * @param archivedDate Calendar representing the date and time when the drug record was archived + */ public void setArchivedDate(final Calendar archivedDate) { this.archivedDate = archivedDate; } - + + /** + * Gets the reason why this drug record was archived. + * + * @return String the reason for archiving the drug record, or null if not archived or no reason provided + */ public String getArchivedReason() { return this.archivedReason; } - + + /** + * Sets the reason why this drug record was archived. + * + * @param archivedReason String describing the reason for archiving the drug record + */ public void setArchivedReason(final String archivedReason) { this.archivedReason = archivedReason; } - + + /** + * Gets the ATC (Anatomical Therapeutic Chemical) classification code for this drug. + * + * The ATC system is used internationally for the classification of active pharmaceutical ingredients + * according to the organ or system on which they act and their therapeutic, pharmacological, and + * chemical properties. + * + * @return String the ATC code, or null if not specified + */ public String getAtc() { return this.atc; } - + + /** + * Sets the ATC (Anatomical Therapeutic Chemical) classification code for this drug. + * + * @param atc String representing the ATC code for the medication + */ public void setAtc(final String atc) { this.atc = atc; } - + + /** + * Gets the brand (trade) name of the medication. + * + * @return String the brand name of the drug, or null if not specified + */ public String getBrandName() { return this.brandName; } - + + /** + * Sets the brand (trade) name of the medication. + * + * @param brandName String representing the brand name of the drug + */ public void setBrandName(final String brandName) { this.brandName = brandName; } - + + /** + * Gets the CAISI demographic identifier associated with this drug record. + * + * This identifier links the drug record to a specific patient demographic in the CAISI + * (Collaborative Application for Integrated Services Information) system. + * + * @return Integer the CAISI demographic ID, or null if not specified + */ public Integer getCaisiDemographicId() { return this.caisiDemographicId; } - + + /** + * Sets the CAISI demographic identifier associated with this drug record. + * + * @param caisiDemographicId Integer representing the CAISI demographic ID + */ public void setCaisiDemographicId(final Integer caisiDemographicId) { this.caisiDemographicId = caisiDemographicId; } - + + /** + * Gets the CAISI provider identifier who prescribed or manages this drug record. + * + * @return String the CAISI provider ID, or null if not specified + */ public String getCaisiProviderId() { return this.caisiProviderId; } - + + /** + * Sets the CAISI provider identifier who prescribed or manages this drug record. + * + * @param caisiProviderId String representing the CAISI provider ID + */ public void setCaisiProviderId(final String caisiProviderId) { this.caisiProviderId = caisiProviderId; } - + + /** + * Gets the date when this drug record was created. + * + * @return Calendar the date and time when the drug record was created, or null if not specified + */ public Calendar getCreateDate() { return this.createDate; } - + + /** + * Sets the date when this drug record was created. + * + * @param createDate Calendar representing the date and time when the drug record was created + */ public void setCreateDate(final Calendar createDate) { this.createDate = createDate; } - + + /** + * Checks if custom instructions have been provided for this medication. + * + * @return boolean true if custom instructions are present, false otherwise + */ public boolean isCustomInstructions() { return this.customInstructions; } - + + /** + * Sets whether custom instructions are provided for this medication. + * + * @param customInstructions boolean indicating if custom instructions are present + */ public void setCustomInstructions(final boolean customInstructions) { this.customInstructions = customInstructions; } - + + /** + * Gets the custom name for this medication. + * + * Custom names allow healthcare providers to use alternative or descriptive names for medications + * that may differ from the standard brand or generic names. + * + * @return String the custom name for the medication, or null if not specified + */ public String getCustomName() { return this.customName; } - + + /** + * Sets the custom name for this medication. + * + * @param customName String representing the custom name for the medication + */ public void setCustomName(final String customName) { this.customName = customName; } - + + /** + * Gets the dosage information for this medication. + * + * Dosage typically includes the strength and amount (e.g., "10mg", "500mg/5mL"). + * + * @return String the dosage information, or null if not specified + */ public String getDosage() { return this.dosage; } - + + /** + * Sets the dosage information for this medication. + * + * @param dosage String representing the dosage information + */ public void setDosage(final String dosage) { this.dosage = dosage; } - + + /** + * Gets the pharmaceutical form of the medication. + * + * Drug form describes the physical form of the medication (e.g., "tablet", "capsule", "liquid", + * "injection", "cream"). + * + * @return String the pharmaceutical form, or null if not specified + */ public String getDrugForm() { return this.drugForm; } - + + /** + * Sets the pharmaceutical form of the medication. + * + * @param drugForm String representing the pharmaceutical form + */ public void setDrugForm(final String drugForm) { this.drugForm = drugForm; } - + + /** + * Gets the unit of time used for the duration of treatment. + * + * Duration unit specifies the time measurement (e.g., "days", "weeks", "months") used with + * the duration value to indicate how long the medication should be taken. + * + * @return String the duration unit, or null if not specified + */ public String getDurUnit() { return this.durUnit; } - + + /** + * Sets the unit of time used for the duration of treatment. + * + * @param durUnit String representing the duration unit (e.g., "days", "weeks") + */ public void setDurUnit(final String durUnit) { this.durUnit = durUnit; } - + + /** + * Gets the duration value for how long the medication should be taken. + * + * This value is used in conjunction with the duration unit to specify the total treatment period. + * + * @return String the duration value, or null if not specified + */ public String getDuration() { return this.duration; } - + + /** + * Sets the duration value for how long the medication should be taken. + * + * @param duration String representing the numeric duration value + */ public void setDuration(final String duration) { this.duration = duration; } - + + /** + * Gets the end date for the medication prescription. + * + * The end date indicates when the medication should be discontinued or when the prescription expires. + * + * @return Calendar the end date of the prescription, or null if not specified or indefinite + */ public Calendar getEndDate() { return this.endDate; } - + + /** + * Sets the end date for the medication prescription. + * + * @param endDate Calendar representing the date when the prescription ends + */ public void setEndDate(final Calendar endDate) { this.endDate = endDate; } - + + /** + * Gets the composite primary key containing facility and integer identifiers. + * + * This composite key is used to uniquely identify the drug record across multiple healthcare + * facilities in the integrator system. + * + * @return FacilityIdIntegerCompositePk the composite primary key, or null if not specified + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return this.facilityIdIntegerCompositePk; } - + + /** + * Sets the composite primary key containing facility and integer identifiers. + * + * @param facilityIdIntegerCompositePk FacilityIdIntegerCompositePk representing the composite primary key + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityIdIntegerCompositePk) { this.facilityIdIntegerCompositePk = facilityIdIntegerCompositePk; } - + + /** + * Gets the frequency code for medication administration. + * + * Frequency codes use standard medical abbreviations (e.g., "BID" for twice daily, "TID" for + * three times daily, "QD" for once daily, "PRN" for as needed). + * + * @return String the frequency code, or null if not specified + */ public String getFreqCode() { return this.freqCode; } - + + /** + * Sets the frequency code for medication administration. + * + * @param freqCode String representing the frequency code + */ public void setFreqCode(final String freqCode) { this.freqCode = freqCode; } - + + /** + * Gets the generic (non-proprietary) name of the medication. + * + * The generic name is the official pharmaceutical name of the active ingredient, as opposed to + * the brand name which is trademarked by a manufacturer. + * + * @return String the generic name of the drug, or null if not specified + */ public String getGenericName() { return this.genericName; } - + + /** + * Sets the generic (non-proprietary) name of the medication. + * + * @param genericName String representing the generic name of the drug + */ public void setGenericName(final String genericName) { this.genericName = genericName; } - + + /** + * Gets the date when the prescription was last refilled. + * + * This tracking is important for medication adherence monitoring and refill authorization. + * + * @return Calendar the date of the last refill, or null if never refilled or not specified + */ public Calendar getLastRefillDate() { return this.lastRefillDate; } - + + /** + * Sets the date when the prescription was last refilled. + * + * @param lastRefillDate Calendar representing the date of the last refill + */ public void setLastRefillDate(final Calendar lastRefillDate) { this.lastRefillDate = lastRefillDate; } - + + /** + * Checks if this is a long-term medication. + * + * Long-term medications are those prescribed for chronic conditions requiring extended or + * indefinite use, as opposed to short-term acute treatments. + * + * @return Boolean true if this is a long-term medication, false otherwise, or null if not specified + */ public Boolean isLongTerm() { return this.longTerm; } - + + /** + * Sets whether this is a long-term medication. + * + * @param longTerm Boolean indicating if this is a long-term medication + */ public void setLongTerm(final Boolean longTerm) { this.longTerm = longTerm; } - + + /** + * Gets the method of administration for the medication. + * + * The method describes how the medication should be taken or administered (e.g., "oral", + * "topical", "intravenous", "subcutaneous"). + * + * @return String the method of administration, or null if not specified + */ public String getMethod() { return this.method; } - + + /** + * Sets the method of administration for the medication. + * + * @param method String representing the method of administration + */ public void setMethod(final String method) { this.method = method; } - + + /** + * Checks if substitution with generic alternatives is not allowed for this medication. + * + * When true, the prescriber has indicated that the exact prescribed medication must be dispensed + * and generic substitutions are not permitted. + * + * @return boolean true if substitutions are not allowed, false if substitutions are permitted + */ public boolean isNoSubs() { return this.noSubs; } - + + /** + * Sets whether substitution with generic alternatives is not allowed for this medication. + * + * @param noSubs boolean indicating if substitutions are prohibited + */ public void setNoSubs(final boolean noSubs) { this.noSubs = noSubs; } - + + /** + * Checks if this is a past medication no longer actively prescribed. + * + * Past medications are those that the patient previously took but are no longer part of their + * current medication regimen. This is important for maintaining complete medication history. + * + * @return Boolean true if this is a past medication, false if current, or null if not specified + */ public Boolean isPastMed() { return this.pastMed; } - + + /** + * Sets whether this is a past medication no longer actively prescribed. + * + * @param pastMed Boolean indicating if this is a past medication + */ public void setPastMed(final Boolean pastMed) { this.pastMed = pastMed; } - + + /** + * Checks the patient's compliance status with this medication regimen. + * + * Patient compliance (also called adherence) indicates whether the patient is taking the + * medication as prescribed. This is critical for treatment effectiveness monitoring. + * + * @return Boolean true if the patient is compliant, false if non-compliant, or null if not assessed + */ public Boolean isPatientCompliance() { return this.patientCompliance; } - + + /** + * Sets the patient's compliance status with this medication regimen. + * + * @param patientCompliance Boolean indicating patient compliance status + */ public void setPatientCompliance(final Boolean patientCompliance) { this.patientCompliance = patientCompliance; } - + + /** + * Checks if this medication is to be taken PRN (pro re nata - as needed). + * + * PRN medications are taken only when needed for specific symptoms or situations, rather than + * on a fixed schedule. Examples include pain medications, anti-nausea drugs, or rescue inhalers. + * + * @return boolean true if this is a PRN medication, false if it follows a fixed schedule + */ public boolean isPrn() { return this.prn; } - + + /** + * Sets whether this medication is to be taken PRN (as needed). + * + * @param prn boolean indicating if this is a PRN medication + */ public void setPrn(final boolean prn) { this.prn = prn; } - + + /** + * Gets the quantity of medication prescribed. + * + * Quantity typically represents the number of units dispensed (e.g., number of tablets, + * capsules, or volume of liquid medication). + * + * @return String the quantity prescribed, or null if not specified + */ public String getQuantity() { return this.quantity; } - + + /** + * Sets the quantity of medication prescribed. + * + * @param quantity String representing the quantity prescribed + */ public void setQuantity(final String quantity) { this.quantity = quantity; } - + + /** + * Gets the regional identifier for this drug record. + * + * Regional identifiers support provincial or territorial healthcare system requirements in + * Canada, allowing medication tracking specific to jurisdictions (e.g., Ontario, British Columbia). + * + * @return String the regional identifier, or null if not specified + */ public String getRegionalIdentifier() { return this.regionalIdentifier; } - + + /** + * Sets the regional identifier for this drug record. + * + * @param regionalIdentifier String representing the regional identifier + */ public void setRegionalIdentifier(final String regionalIdentifier) { this.regionalIdentifier = regionalIdentifier; } - + + /** + * Gets the number of prescription refills authorized. + * + * This indicates how many times the prescription can be refilled without requiring a new + * prescription from the healthcare provider. + * + * @return int the number of authorized refills + */ public int getRepeats() { return this.repeats; } - + + /** + * Sets the number of prescription refills authorized. + * + * @param repeats int representing the number of authorized refills + */ public void setRepeats(final int repeats) { this.repeats = repeats; } - + + /** + * Gets the route of administration for the medication. + * + * The route specifies how the medication enters the body (e.g., "PO" for oral/by mouth, + * "IV" for intravenous, "IM" for intramuscular, "topical" for skin application). + * + * @return String the route of administration, or null if not specified + */ public String getRoute() { return this.route; } - + + /** + * Sets the route of administration for the medication. + * + * @param route String representing the route of administration + */ public void setRoute(final String route) { this.route = route; } - + + /** + * Gets the prescription date (Rx date) when the medication was prescribed. + * + * This is the date the healthcare provider wrote or authorized the prescription. + * + * @return Calendar the prescription date, or null if not specified + */ public Calendar getRxDate() { return this.rxDate; } - + + /** + * Sets the prescription date (Rx date) when the medication was prescribed. + * + * @param rxDate Calendar representing the prescription date + */ public void setRxDate(final Calendar rxDate) { this.rxDate = rxDate; } - + + /** + * Gets the prescription script number. + * + * The script number is a unique identifier assigned to the prescription for tracking and + * reference purposes within the pharmacy and healthcare system. + * + * @return int the script number + */ public int getScriptNo() { return this.scriptNo; } - + + /** + * Sets the prescription script number. + * + * @param scriptNo int representing the script number + */ public void setScriptNo(final int scriptNo) { this.scriptNo = scriptNo; } - + + /** + * Gets special instructions or notes for this medication. + * + * Special instructions may include specific timing requirements, dietary considerations, + * warnings, or other important information for the patient or pharmacist. + * + * @return String special instructions, or null if not specified + */ public String getSpecial() { return this.special; } - + + /** + * Sets special instructions or notes for this medication. + * + * @param special String representing special instructions + */ public void setSpecial(final String special) { this.special = special; } - + + /** + * Gets the maximum dosage amount to take per administration. + * + * This specifies the upper limit of how much medication should be taken at one time, particularly + * important for PRN medications or those with flexible dosing ranges. + * + * @return float the maximum dosage amount per administration + */ public float getTakeMax() { return this.takeMax; } - + + /** + * Sets the maximum dosage amount to take per administration. + * + * @param takeMax float representing the maximum dosage amount + */ public void setTakeMax(final float takeMax) { this.takeMax = takeMax; } - + + /** + * Gets the minimum dosage amount to take per administration. + * + * This specifies the lower limit of how much medication should be taken at one time, useful + * for medications with flexible dosing ranges or titration requirements. + * + * @return float the minimum dosage amount per administration + */ public float getTakeMin() { return this.takeMin; } - + + /** + * Sets the minimum dosage amount to take per administration. + * + * @param takeMin float representing the minimum dosage amount + */ public void setTakeMin(final float takeMin) { this.takeMin = takeMin; } - + + /** + * Gets the unit of measurement for the medication dosage. + * + * Common units include "mg" (milligrams), "mL" (milliliters), "IU" (international units), + * "mcg" (micrograms), "g" (grams), etc. + * + * @return String the unit of measurement, or null if not specified + */ public String getUnit() { return this.unit; } - + + /** + * Sets the unit of measurement for the medication dosage. + * + * @param unit String representing the unit of measurement + */ public void setUnit(final String unit) { this.unit = unit; } - + + /** + * Gets the descriptive name of the dosage unit. + * + * While the unit field contains the abbreviation (e.g., "mg"), the unit name may contain + * the full description or alternative representation of the measurement unit. + * + * @return String the descriptive unit name, or null if not specified + */ public String getUnitName() { return this.unitName; } - + + /** + * Sets the descriptive name of the dosage unit. + * + * @param unitName String representing the descriptive unit name + */ public void setUnitName(final String unitName) { this.unitName = unitName; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedProgram.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedProgram.java index 2dbafb26ca1..42d1f3fa064 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedProgram.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/CachedProgram.java @@ -6,6 +6,26 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Represents a cached healthcare program in the CAISI Integrator web service. + * + *

    This class is used to store and transfer program information across integrated + * EMR systems through the CAISI (Client Access to Integrated Services and Information) + * Integrator. Programs in the healthcare context represent community services, treatment + * programs, or care facilities that may be referred to or associated with patient care.

    + * + *

    The cached program includes comprehensive program details such as contact information, + * service characteristics (mental health, physical health, housing support, etc.), eligibility + * criteria (age ranges, gender requirements), and facility affiliation information.

    + * + *

    This is a JAXB-annotated class for XML serialization/deserialization in web service + * communications between different OpenO EMR installations through the Integrator system.

    + * + * @since 2026-01-23 + * @see AbstractModel + * @see FacilityIdIntegerCompositePk + * @see Gender + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "cachedProgram", propOrder = { "abstinenceSupport", "address", "alcohol", "bedProgramAffiliated", "description", "email", "emergencyNumber", "facilityIdIntegerCompositePk", "fax", "firstNation", "gender", "housing", "maxAge", "mentalHealth", "minAge", "name", "phone", "physicalHealth", "status", "type", "url" }) public class CachedProgram extends AbstractModel implements Serializable @@ -33,171 +53,384 @@ public class CachedProgram extends AbstractModel implements Serializable protected String status; protected String type; protected String url; - + + /** + * Gets the abstinence support information for this program. + * + * @return String the abstinence support details, or null if not specified + */ public String getAbstinenceSupport() { return this.abstinenceSupport; } - + + /** + * Sets the abstinence support information for this program. + * + * @param abstinenceSupport String the abstinence support details to set + */ public void setAbstinenceSupport(final String abstinenceSupport) { this.abstinenceSupport = abstinenceSupport; } - + + /** + * Gets the physical address of the program location. + * + * @return String the program address, or null if not specified + */ public String getAddress() { return this.address; } - + + /** + * Sets the physical address of the program location. + * + * @param address String the program address to set + */ public void setAddress(final String address) { this.address = address; } - + + /** + * Checks if this program provides alcohol-related services or support. + * + * @return boolean true if the program provides alcohol services, false otherwise + */ public boolean isAlcohol() { return this.alcohol; } - + + /** + * Sets whether this program provides alcohol-related services or support. + * + * @param alcohol boolean true if the program provides alcohol services + */ public void setAlcohol(final boolean alcohol) { this.alcohol = alcohol; } - + + /** + * Checks if this program is affiliated with a bed program. + * + * @return boolean true if the program is affiliated with a bed program, false otherwise + */ public boolean isBedProgramAffiliated() { return this.bedProgramAffiliated; } - + + /** + * Sets whether this program is affiliated with a bed program. + * + * @param bedProgramAffiliated boolean true if the program is affiliated with a bed program + */ public void setBedProgramAffiliated(final boolean bedProgramAffiliated) { this.bedProgramAffiliated = bedProgramAffiliated; } + /** + * Gets the description of the program. + * + * @return String the program description, or null if not specified + */ public String getDescription() { return this.description; } - + + /** + * Sets the description of the program. + * + * @param description String the program description to set + */ public void setDescription(final String description) { this.description = description; } - + + /** + * Gets the email contact address for the program. + * + * @return String the program email address, or null if not specified + */ public String getEmail() { return this.email; } - + + /** + * Sets the email contact address for the program. + * + * @param email String the program email address to set + */ public void setEmail(final String email) { this.email = email; } - + + /** + * Gets the emergency contact phone number for the program. + * + * @return String the emergency phone number, or null if not specified + */ public String getEmergencyNumber() { return this.emergencyNumber; } - + + /** + * Sets the emergency contact phone number for the program. + * + * @param emergencyNumber String the emergency phone number to set + */ public void setEmergencyNumber(final String emergencyNumber) { this.emergencyNumber = emergencyNumber; } - + + /** + * Gets the facility identifier composite primary key for this program. + * + *

    This composite key uniquely identifies the program within the integrator + * system by combining the CAISI item ID and the integrator facility ID.

    + * + * @return FacilityIdIntegerCompositePk the facility identifier composite key, or null if not set + */ public FacilityIdIntegerCompositePk getFacilityIdIntegerCompositePk() { return this.facilityIdIntegerCompositePk; } - + + /** + * Sets the facility identifier composite primary key for this program. + * + * @param facilityIdIntegerCompositePk FacilityIdIntegerCompositePk the facility identifier composite key to set + */ public void setFacilityIdIntegerCompositePk(final FacilityIdIntegerCompositePk facilityIdIntegerCompositePk) { this.facilityIdIntegerCompositePk = facilityIdIntegerCompositePk; } + /** + * Gets the fax number for the program. + * + * @return String the program fax number, or null if not specified + */ public String getFax() { return this.fax; } - + + /** + * Sets the fax number for the program. + * + * @param fax String the program fax number to set + */ public void setFax(final String fax) { this.fax = fax; } - + + /** + * Checks if this program is designated for First Nations populations. + * + * @return boolean true if the program serves First Nations populations, false otherwise + */ public boolean isFirstNation() { return this.firstNation; } - + + /** + * Sets whether this program is designated for First Nations populations. + * + * @param firstNation boolean true if the program serves First Nations populations + */ public void setFirstNation(final boolean firstNation) { this.firstNation = firstNation; } - + + /** + * Gets the gender eligibility requirement for the program. + * + * @return Gender the gender requirement (M, F, T, O, U), or null if not specified + */ public Gender getGender() { return this.gender; } - + + /** + * Sets the gender eligibility requirement for the program. + * + * @param gender Gender the gender requirement to set (M, F, T, O, U) + */ public void setGender(final Gender gender) { this.gender = gender; } - + + /** + * Checks if this program provides housing support or services. + * + * @return boolean true if the program provides housing services, false otherwise + */ public boolean isHousing() { return this.housing; } - + + /** + * Sets whether this program provides housing support or services. + * + * @param housing boolean true if the program provides housing services + */ public void setHousing(final boolean housing) { this.housing = housing; } + /** + * Gets the maximum age eligibility requirement for the program. + * + * @return int the maximum age in years, or 0 if not specified + */ public int getMaxAge() { return this.maxAge; } - + + /** + * Sets the maximum age eligibility requirement for the program. + * + * @param maxAge int the maximum age in years to set + */ public void setMaxAge(final int maxAge) { this.maxAge = maxAge; } - + + /** + * Checks if this program provides mental health services or support. + * + * @return boolean true if the program provides mental health services, false otherwise + */ public boolean isMentalHealth() { return this.mentalHealth; } - + + /** + * Sets whether this program provides mental health services or support. + * + * @param mentalHealth boolean true if the program provides mental health services + */ public void setMentalHealth(final boolean mentalHealth) { this.mentalHealth = mentalHealth; } - + + /** + * Gets the minimum age eligibility requirement for the program. + * + * @return int the minimum age in years, or 0 if not specified + */ public int getMinAge() { return this.minAge; } - + + /** + * Sets the minimum age eligibility requirement for the program. + * + * @param minAge int the minimum age in years to set + */ public void setMinAge(final int minAge) { this.minAge = minAge; } - + + /** + * Gets the name of the program. + * + * @return String the program name, or null if not specified + */ public String getName() { return this.name; } - + + /** + * Sets the name of the program. + * + * @param name String the program name to set + */ public void setName(final String name) { this.name = name; } + /** + * Gets the primary phone contact number for the program. + * + * @return String the program phone number, or null if not specified + */ public String getPhone() { return this.phone; } - + + /** + * Sets the primary phone contact number for the program. + * + * @param phone String the program phone number to set + */ public void setPhone(final String phone) { this.phone = phone; } - + + /** + * Checks if this program provides physical health services or support. + * + * @return boolean true if the program provides physical health services, false otherwise + */ public boolean isPhysicalHealth() { return this.physicalHealth; } - + + /** + * Sets whether this program provides physical health services or support. + * + * @param physicalHealth boolean true if the program provides physical health services + */ public void setPhysicalHealth(final boolean physicalHealth) { this.physicalHealth = physicalHealth; } - + + /** + * Gets the current operational status of the program. + * + * @return String the program status (e.g., "active", "inactive"), or null if not specified + */ public String getStatus() { return this.status; } - + + /** + * Sets the current operational status of the program. + * + * @param status String the program status to set + */ public void setStatus(final String status) { this.status = status; } - + + /** + * Gets the type classification of the program. + * + * @return String the program type, or null if not specified + */ public String getType() { return this.type; } - + + /** + * Sets the type classification of the program. + * + * @param type String the program type to set + */ public void setType(final String type) { this.type = type; } - + + /** + * Gets the website URL for the program. + * + * @return String the program website URL, or null if not specified + */ public String getUrl() { return this.url; } - + + /** + * Sets the website URL for the program. + * + * @param url String the program website URL to set + */ public void setUrl(final String url) { this.url = url; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicTransfer.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicTransfer.java index 8882e9ed302..b83f833d7e6 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicTransfer.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicTransfer.java @@ -10,6 +10,30 @@ import javax.xml.bind.annotation.XmlAccessorType; import java.io.Serializable; +/** + * Data transfer object for patient demographic information used in CAISI Integrator web services. + * This class represents a patient's demographic data that is exchanged between different OpenO EMR + * installations through the CAISI (Client Access to Integrated Services and Information) Integrator system. + * + *

    The demographic transfer includes essential patient identifiers, personal information, contact details, + * and health insurance information required for inter-facility patient data sharing in Canadian healthcare systems. + * This class is JAXB-annotated for XML serialization in SOAP web service communications.

    + * + *

    Key healthcare data elements include:

    + *
      + *
    • HIN (Health Insurance Number) with validation dates and provincial type
    • + *
    • Personal identifiers (name, birth date, gender, SIN)
    • + *
    • Contact information (address, phone numbers)
    • + *
    • Provider and facility associations
    • + *
    • Patient photograph with update tracking
    • + *
    + * + *

    Security Note: This class contains Protected Health Information (PHI). + * All transmissions must be over secure channels and comply with PIPEDA/HIPAA regulations.

    + * + * @see Gender + * @since 2026-01-23 + */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "demographicTransfer", propOrder = { "birthDate", "caisiDemographicId", "caisiProviderId", "city", "firstName", "gender", "hin", "hinType", "hinValidEnd", "hinValidStart", "hinVersion", "integratorFacilityId", "lastName", "lastUpdateDate", "lastUpdateUser", "phone1", "phone2", "photo", "photoUpdateDate", "province", "removeId", "sin", "streetAddress" }) public class DemographicTransfer implements Serializable @@ -54,187 +78,432 @@ public class DemographicTransfer implements Serializable protected boolean removeId; protected String sin; protected String streetAddress; - + + /** + * Gets the patient's birth date. + * + * @return Calendar the patient's date of birth, or null if not set + */ public Calendar getBirthDate() { return this.birthDate; } - + + /** + * Sets the patient's birth date. + * + * @param birthDate Calendar the patient's date of birth + */ public void setBirthDate(final Calendar birthDate) { this.birthDate = birthDate; } - + + /** + * Gets the CAISI demographic identifier for this patient. + * This is the local demographic ID from the source CAISI system. + * + * @return int the CAISI demographic identifier + */ public int getCaisiDemographicId() { return this.caisiDemographicId; } - + + /** + * Sets the CAISI demographic identifier for this patient. + * + * @param caisiDemographicId int the CAISI demographic identifier + */ public void setCaisiDemographicId(final int caisiDemographicId) { this.caisiDemographicId = caisiDemographicId; } - + + /** + * Gets the CAISI provider identifier associated with this patient. + * This identifies the healthcare provider responsible for this patient in the source system. + * + * @return String the CAISI provider identifier, or null if not assigned + */ public String getCaisiProviderId() { return this.caisiProviderId; } - + + /** + * Sets the CAISI provider identifier associated with this patient. + * + * @param caisiProviderId String the CAISI provider identifier + */ public void setCaisiProviderId(final String caisiProviderId) { this.caisiProviderId = caisiProviderId; } - + + /** + * Gets the patient's city of residence. + * + * @return String the city name, or null if not set + */ public String getCity() { return this.city; } - + + /** + * Sets the patient's city of residence. + * + * @param city String the city name + */ public void setCity(final String city) { this.city = city; } - + + /** + * Gets the patient's first name. + * + * @return String the patient's first name, or null if not set + */ public String getFirstName() { return this.firstName; } - + + /** + * Sets the patient's first name. + * + * @param firstName String the patient's first name + */ public void setFirstName(final String firstName) { this.firstName = firstName; } - + + /** + * Gets the patient's gender. + * + * @return Gender the patient's gender enumeration value, or null if not set + */ public Gender getGender() { return this.gender; } - + + /** + * Sets the patient's gender. + * + * @param gender Gender the patient's gender enumeration value + */ public void setGender(final Gender gender) { this.gender = gender; } - + + /** + * Gets the patient's Health Insurance Number (HIN). + * The HIN is a provincial health card number used to identify patients in Canadian healthcare systems. + * + * @return String the health insurance number, or null if not set + */ public String getHin() { return this.hin; } - + + /** + * Sets the patient's Health Insurance Number (HIN). + * + * @param hin String the health insurance number + */ public void setHin(final String hin) { this.hin = hin; } - + + /** + * Gets the HIN type, indicating the provincial jurisdiction of the health card. + * Common values include "ON" (Ontario), "BC" (British Columbia), etc. + * + * @return String the HIN type/province code, or null if not set + */ public String getHinType() { return this.hinType; } - + + /** + * Sets the HIN type, indicating the provincial jurisdiction. + * + * @param hinType String the HIN type/province code + */ public void setHinType(final String hinType) { this.hinType = hinType; } - + + /** + * Gets the expiry date for the health insurance number. + * + * @return Calendar the date when the HIN expires, or null if not applicable + */ public Calendar getHinValidEnd() { return this.hinValidEnd; } - + + /** + * Sets the expiry date for the health insurance number. + * + * @param hinValidEnd Calendar the date when the HIN expires + */ public void setHinValidEnd(final Calendar hinValidEnd) { this.hinValidEnd = hinValidEnd; } - + + /** + * Gets the start date for the health insurance number validity. + * + * @return Calendar the date when the HIN becomes valid, or null if not applicable + */ public Calendar getHinValidStart() { return this.hinValidStart; } - + + /** + * Sets the start date for the health insurance number validity. + * + * @param hinValidStart Calendar the date when the HIN becomes valid + */ public void setHinValidStart(final Calendar hinValidStart) { this.hinValidStart = hinValidStart; } - + + /** + * Gets the version code for the health insurance number. + * Some provinces use version codes to track health card renewals or updates. + * + * @return String the HIN version code, or null if not applicable + */ public String getHinVersion() { return this.hinVersion; } - + + /** + * Sets the version code for the health insurance number. + * + * @param hinVersion String the HIN version code + */ public void setHinVersion(final String hinVersion) { this.hinVersion = hinVersion; } - + + /** + * Gets the integrator facility identifier where this demographic record originated. + * This identifies which facility in the CAISI Integrator network created or owns this record. + * + * @return Integer the integrator facility ID, or null if not assigned + */ public Integer getIntegratorFacilityId() { return this.integratorFacilityId; } - + + /** + * Sets the integrator facility identifier. + * + * @param integratorFacilityId Integer the integrator facility ID + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { this.integratorFacilityId = integratorFacilityId; } - + + /** + * Gets the patient's last name (surname). + * + * @return String the patient's last name, or null if not set + */ public String getLastName() { return this.lastName; } - + + /** + * Sets the patient's last name (surname). + * + * @param lastName String the patient's last name + */ public void setLastName(final String lastName) { this.lastName = lastName; } - + + /** + * Gets the timestamp when this demographic record was last updated. + * Used for audit trails and synchronization between systems. + * + * @return Calendar the last update date/time, or null if never updated + */ public Calendar getLastUpdateDate() { return this.lastUpdateDate; } - + + /** + * Sets the timestamp when this demographic record was last updated. + * + * @param lastUpdateDate Calendar the last update date/time + */ public void setLastUpdateDate(final Calendar lastUpdateDate) { this.lastUpdateDate = lastUpdateDate; } - + + /** + * Gets the username or identifier of the user who last updated this record. + * Used for audit trails and compliance with healthcare data regulations. + * + * @return String the username of the last user to update this record, or null if unknown + */ public String getLastUpdateUser() { return this.lastUpdateUser; } - + + /** + * Sets the username or identifier of the user who last updated this record. + * + * @param lastUpdateUser String the username of the updating user + */ public void setLastUpdateUser(final String lastUpdateUser) { this.lastUpdateUser = lastUpdateUser; } - + + /** + * Gets the patient's primary phone number. + * + * @return String the primary phone number, or null if not set + */ public String getPhone1() { return this.phone1; } - + + /** + * Sets the patient's primary phone number. + * + * @param phone1 String the primary phone number + */ public void setPhone1(final String phone1) { this.phone1 = phone1; } - + + /** + * Gets the patient's secondary phone number. + * + * @return String the secondary phone number, or null if not set + */ public String getPhone2() { return this.phone2; } - + + /** + * Sets the patient's secondary phone number. + * + * @param phone2 String the secondary phone number + */ public void setPhone2(final String phone2) { this.phone2 = phone2; } - + + /** + * Gets the patient's photograph as a byte array. + * The photo is typically used for patient identification and verification. + * + * @return byte[] the patient photo data, or null if no photo available + */ public byte[] getPhoto() { return this.photo; } - + + /** + * Sets the patient's photograph as a byte array. + * + * @param photo byte[] the patient photo data + */ public void setPhoto(final byte[] photo) { this.photo = photo; } - + + /** + * Gets the timestamp when the patient's photograph was last updated. + * + * @return Calendar the photo update date/time, or null if photo has never been set + */ public Calendar getPhotoUpdateDate() { return this.photoUpdateDate; } - + + /** + * Sets the timestamp when the patient's photograph was last updated. + * + * @param photoUpdateDate Calendar the photo update date/time + */ public void setPhotoUpdateDate(final Calendar photoUpdateDate) { this.photoUpdateDate = photoUpdateDate; } - + + /** + * Gets the patient's province of residence. + * Uses two-letter Canadian province codes (ON, BC, AB, etc.). + * + * @return String the province code, or null if not set + */ public String getProvince() { return this.province; } - + + /** + * Sets the patient's province of residence. + * + * @param province String the province code + */ public void setProvince(final String province) { this.province = province; } - + + /** + * Checks if the demographic record should have its ID removed during transfer. + * This flag may be used during data synchronization to indicate that local IDs + * should not be included in the transfer to avoid conflicts. + * + * @return boolean true if the ID should be removed, false otherwise + */ public boolean isRemoveId() { return this.removeId; } - + + /** + * Sets whether the demographic record should have its ID removed during transfer. + * + * @param removeId boolean true to remove ID during transfer, false to retain it + */ public void setRemoveId(final boolean removeId) { this.removeId = removeId; } - + + /** + * Gets the patient's Social Insurance Number (SIN). + * + *

    Privacy Warning: SIN is highly sensitive personal information. + * Use of SIN in healthcare should be limited and comply with privacy regulations.

    + * + * @return String the social insurance number, or null if not collected + */ public String getSin() { return this.sin; } - + + /** + * Sets the patient's Social Insurance Number (SIN). + * + * @param sin String the social insurance number + */ public void setSin(final String sin) { this.sin = sin; } - + + /** + * Gets the patient's street address. + * + * @return String the street address, or null if not set + */ public String getStreetAddress() { return this.streetAddress; } - + + /** + * Sets the patient's street address. + * + * @param streetAddress String the street address + */ public void setStreetAddress(final String streetAddress) { this.streetAddress = streetAddress; } diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWs.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWs.java index 50c5369858d..a0ce0844fdb 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWs.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWs.java @@ -10,300 +10,634 @@ import javax.xml.bind.annotation.XmlSeeAlso; import javax.jws.WebService; +/** + * Demographic Web Service interface for the CAISI Integrator system. + * + * This SOAP web service provides comprehensive inter-facility demographic data exchange capabilities + * for the OpenO EMR CAISI (Client Access to Integrated Services and Information) Integrator. + * The service enables sharing of patient demographic records, clinical data, and administrative + * information across multiple healthcare facilities within a community health network. + * + * Key capabilities include: + * - Demographic record synchronization and linking across facilities + * - Clinical data caching and retrieval (lab results, medications, allergies, preventions) + * - Administrative data exchange (appointments, billing, consents) + * - Document and form management + * - Patient consent state management + * + * All methods in this service operate on cached data to improve performance and reduce + * real-time database load. The service uses composite primary keys (FacilityIdIntegerCompositePk) + * to uniquely identify records across multiple facilities. + * + * Security: All service methods require appropriate authentication and authorization. + * PHI (Protected Health Information) transmitted through this service must be protected + * according to HIPAA/PIPEDA requirements. + * + * @see DemographicTransfer + * @see FacilityIdIntegerCompositePk + * @see ObjectFactory + * @since 2026-01-24 + */ @WebService(targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", name = "DemographicWs") @XmlSeeAlso({ ObjectFactory.class }) public interface DemographicWs { + /** + * Retrieves a cached demographic lab result by composite primary key. + * + * @param p0 FacilityIdLabResultCompositePk the composite primary key containing facility ID and lab result ID + * @return CachedDemographicLabResult the cached lab result data, or null if not found + */ @WebMethod @RequestWrapper(localName = "getCachedDemographicLabResult", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicLabResult") @ResponseWrapper(localName = "getCachedDemographicLabResultResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicLabResultResponse") @WebResult(name = "return", targetNamespace = "") CachedDemographicLabResult getCachedDemographicLabResult(@WebParam(name = "arg0", targetNamespace = "") final FacilityIdLabResultCompositePk p0); + /** + * Stores or updates a list of cached clinical measurements. + * + * @param p0 List<CachedMeasurement> the list of clinical measurements to cache (vital signs, lab values, etc.) + */ @WebMethod @RequestWrapper(localName = "setCachedMeasurements", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurements") @ResponseWrapper(localName = "setCachedMeasurementsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementsResponse") void setCachedMeasurements(@WebParam(name = "arg0", targetNamespace = "") final List p0); + /** + * Retrieves all cached allergies for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve allergies for + * @return List<CachedDemographicAllergy> list of cached allergy records from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicAllergies", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicAllergies") @ResponseWrapper(localName = "getLinkedCachedDemographicAllergiesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicAllergiesResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicAllergies(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); + /** + * Stores or updates a list of cached demographic allergies. + * + * @param p0 List<CachedDemographicAllergy> the list of allergy records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicAllergies", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicAllergies") @ResponseWrapper(localName = "setCachedDemographicAllergiesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicAllergiesResponse") void setCachedDemographicAllergies(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Retrieves all cached clinical notes for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve notes for + * @return List<CachedDemographicNote> list of cached clinical notes from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicNotes", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicNotes") @ResponseWrapper(localName = "getLinkedCachedDemographicNotesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicNotesResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicNotes(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Stores or updates a list of cached measurement mappings. + * + * @param p0 List<CachedMeasurementMap> the list of measurement mapping records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedMeasurementMaps", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementMaps") @ResponseWrapper(localName = "setCachedMeasurementMapsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementMapsResponse") void setCachedMeasurementMaps(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Adds binary content for a cached demographic document. + * + * @param p0 int the document ID + * @param p1 byte[] the binary document content + */ @WebMethod @RequestWrapper(localName = "addCachedDemographicDocumentContents", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicDocumentContents") @ResponseWrapper(localName = "addCachedDemographicDocumentContentsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicDocumentContentsResponse") void addCachedDemographicDocumentContents(@WebParam(name = "arg0", targetNamespace = "") final int p0, @WebParam(name = "arg1", targetNamespace = "") final byte[] p1); + /** + * Retrieves all cached clinical issues for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve issues for + * @return List<CachedDemographicIssue> list of cached clinical issues from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicIssuesByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicIssuesByDemographicId") @ResponseWrapper(localName = "getLinkedCachedDemographicIssuesByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicIssuesByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicIssuesByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Stores or updates a list of cached HL7 lab results. + * + * @param p0 List<CachedDemographicHL7LabResult> the list of HL7 lab result records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicHL7Labs", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicHL7Labs") @ResponseWrapper(localName = "setCachedDemographicHL7LabsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicHL7LabsResponse") void setCachedDemographicHL7Labs(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Retrieves all cached prevention records (immunizations, screening) for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve prevention records for + * @return List<CachedDemographicPrevention> list of cached prevention records from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicPreventionsByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicPreventionsByDemographicId") @ResponseWrapper(localName = "getLinkedCachedDemographicPreventionsByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicPreventionsByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicPreventionsByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Stores or updates a demographic record in the integrator. + * + * @param p0 DemographicTransfer the demographic data to store or update + */ @WebMethod @RequestWrapper(localName = "setDemographic", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetDemographic") @ResponseWrapper(localName = "setDemographicResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetDemographicResponse") void setDemographic(@WebParam(name = "arg0", targetNamespace = "") final DemographicTransfer p0); + /** + * Retrieves all cached appointments for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve appointments for + * @return List<CachedAppointment> list of cached appointments from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedAppointments", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedAppointments") @ResponseWrapper(localName = "getLinkedCachedAppointmentsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedAppointmentsResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedAppointments(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Retrieves demographics directly linked to the specified demographic (one-hop relationships). + * + * @param p0 Integer the CAISI demographic ID to retrieve directly linked demographics for + * @return List<DemographicTransfer> list of directly linked demographic records + */ @WebMethod @RequestWrapper(localName = "getDirectlyLinkedDemographicsByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDirectlyLinkedDemographicsByDemographicId") @ResponseWrapper(localName = "getDirectlyLinkedDemographicsByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDirectlyLinkedDemographicsByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getDirectlyLinkedDemographicsByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Retrieves all cached medication/drug records for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve drugs for + * @return List<CachedDemographicDrug> list of cached drug/medication records from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicDrugsByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicDrugsByDemographicId") @ResponseWrapper(localName = "getLinkedCachedDemographicDrugsByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicDrugsByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicDrugsByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Stores or updates a list of cached measurement extension data. + * + * @param p0 List<CachedMeasurementExt> the list of measurement extension records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedMeasurementExts", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementExts") @ResponseWrapper(localName = "setCachedMeasurementExtsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementExtsResponse") void setCachedMeasurementExts(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Stores or updates a list of cached hospital/program admissions. + * + * @param p0 List<CachedAdmission> the list of admission records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedAdmissions", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedAdmissions") @ResponseWrapper(localName = "setCachedAdmissionsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedAdmissionsResponse") void setCachedAdmissions(@WebParam(name = "arg0", targetNamespace = "") final List p0); + /** + * Retrieves a cached demographic document by composite primary key. + * + * @param p0 FacilityIdIntegerCompositePk the composite primary key containing facility ID and document ID + * @return CachedDemographicDocument the cached document metadata, or null if not found + */ @WebMethod @RequestWrapper(localName = "getCachedDemographicDocument", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicDocument") @ResponseWrapper(localName = "getCachedDemographicDocumentResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicDocumentResponse") @WebResult(name = "return", targetNamespace = "") CachedDemographicDocument getCachedDemographicDocument(@WebParam(name = "arg0", targetNamespace = "") final FacilityIdIntegerCompositePk p0); - + + /** + * Retrieves a cached prevention record by prevention ID. + * + * @param p0 FacilityIdIntegerCompositePk the composite primary key containing facility ID and prevention ID + * @return CachedDemographicPrevention the cached prevention record, or null if not found + */ @WebMethod @RequestWrapper(localName = "getCachedDemographicPreventionsByPreventionId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicPreventionsByPreventionId") @ResponseWrapper(localName = "getCachedDemographicPreventionsByPreventionIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicPreventionsByPreventionIdResponse") @WebResult(name = "return", targetNamespace = "") CachedDemographicPrevention getCachedDemographicPreventionsByPreventionId(@WebParam(name = "preventionId", targetNamespace = "") final FacilityIdIntegerCompositePk p0); - + + /** + * Adds a single cached HL7 lab result record. + * + * @param p0 CachedDemographicHL7LabResult the HL7 lab result to cache + */ @WebMethod @RequestWrapper(localName = "addCachedDemographicHL7LabResult", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicHL7LabResult") @ResponseWrapper(localName = "addCachedDemographicHL7LabResultResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicHL7LabResultResponse") void addCachedDemographicHL7LabResult(@WebParam(name = "arg0", targetNamespace = "") final CachedDemographicHL7LabResult p0); - + + /** + * Stores or updates a list of cached prevention records. + * + * @param p0 List<CachedDemographicPrevention> the list of prevention records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicPreventions", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicPreventions") @ResponseWrapper(localName = "setCachedDemographicPreventionsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicPreventionsResponse") void setCachedDemographicPreventions(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Stores or updates a list of cached Ontario billing items. + * + * @param p0 List<CachedBillingOnItem> the list of Ontario billing item records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedBillingOnItem", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedBillingOnItem") @ResponseWrapper(localName = "setCachedBillingOnItemResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedBillingOnItemResponse") void setCachedBillingOnItem(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Creates a link between demographics at different facilities, establishing a cross-facility patient identity. + * + * @param p0 String the CAISI provider ID of the user creating the link + * @param p1 Integer the demographic ID at the current facility + * @param p2 Integer the facility ID on the integrator for the linked demographic + * @param p3 Integer the demographic ID on the integrator + */ @WebMethod @RequestWrapper(localName = "linkDemographics", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.LinkDemographics") @ResponseWrapper(localName = "linkDemographicsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.LinkDemographicsResponse") void linkDemographics(@WebParam(name = "creatorCaisiProviderId", targetNamespace = "") final String p0, @WebParam(name = "caisiDemographicIdAtCurrentFacility", targetNamespace = "") final Integer p1, @WebParam(name = "integratorDemographicFacilityIdOnIntegrator", targetNamespace = "") final Integer p2, @WebParam(name = "caisiDemographicIdOnIntegrator", targetNamespace = "") final Integer p3); + /** + * Retrieves all cached clinical measurements for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve measurements for + * @return List<CachedMeasurement> list of cached measurement records from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicMeasurementByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicMeasurementByDemographicId") @ResponseWrapper(localName = "getLinkedCachedDemographicMeasurementByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicMeasurementByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicMeasurementByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Retrieves all cached documents for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve documents for + * @return List<CachedDemographicDocument> list of cached document metadata from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicDocuments", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicDocuments") @ResponseWrapper(localName = "getLinkedCachedDemographicDocumentsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicDocumentsResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicDocuments(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Deletes specific cached prevention records for a demographic. + * + * @param p0 Integer the facility ID + * @param p1 List<Integer> the list of prevention IDs to delete + */ @WebMethod @RequestWrapper(localName = "deleteCachedDemographicPreventions", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.DeleteCachedDemographicPreventions") @ResponseWrapper(localName = "deleteCachedDemographicPreventionsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.DeleteCachedDemographicPreventionsResponse") void deleteCachedDemographicPreventions(@WebParam(name = "arg0", targetNamespace = "") final Integer p0, @WebParam(name = "arg1", targetNamespace = "") final List p1); - + + /** + * Stores or updates a list of cached diagnosis research records (dxresearch). + * + * @param p0 List<CachedDxresearch> the list of diagnosis research records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDxresearch", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDxresearch") @ResponseWrapper(localName = "setCachedDxresearchResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDxresearchResponse") void setCachedDxresearch(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Retrieves all cached hospital/program admissions for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve admissions for + * @return List<CachedAdmission> list of cached admission records from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedAdmissionsByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedAdmissionsByDemographicId") @ResponseWrapper(localName = "getLinkedCachedAdmissionsByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedAdmissionsByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedAdmissionsByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); + /** + * Retrieves a cached demographic form by composite primary key. + * + * @param p0 FacilityIdIntegerCompositePk the composite primary key containing facility ID and form ID + * @return CachedDemographicForm the cached form data, or null if not found + */ @WebMethod @RequestWrapper(localName = "getCachedDemographicForm", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicForm") @ResponseWrapper(localName = "getCachedDemographicFormResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicFormResponse") @WebResult(name = "return", targetNamespace = "") CachedDemographicForm getCachedDemographicForm(@WebParam(name = "arg0", targetNamespace = "") final FacilityIdIntegerCompositePk p0); - + + /** + * Retrieves all cached lab results for linked demographics. + * + * @param p0 Integer the CAISI demographic ID to retrieve lab results for + * @return List<CachedDemographicLabResult> list of cached lab results from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicLabResults", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicLabResults") @ResponseWrapper(localName = "getLinkedCachedDemographicLabResultsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicLabResultsResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicLabResults(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Stores or updates a list of cached appointments. + * + * @param p0 List<CachedAppointment> the list of appointment records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedAppointments", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedAppointments") @ResponseWrapper(localName = "setCachedAppointmentsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedAppointmentsResponse") void setCachedAppointments(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Stores or updates a list of cached electronic form values. + * + * @param p0 List<CachedEformValue> the list of eform value records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedEformValues", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedEformValues") @ResponseWrapper(localName = "setCachedEformValuesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedEformValuesResponse") void setCachedEformValues(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Stores or updates a list of cached demographic clinical notes. + * + * @param p0 List<CachedDemographicNote> the list of clinical note records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicNotes", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicNotes") @ResponseWrapper(localName = "setCachedDemographicNotesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicNotesResponse") void setCachedDemographicNotes(@WebParam(name = "arg0", targetNamespace = "") final List p0); + /** + * Retrieves specific cached clinical notes by their composite primary keys. + * + * @param p0 List<CachedDemographicNoteCompositePk> the list of composite primary keys identifying the notes + * @return List<CachedDemographicNote> list of matching cached notes + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicNotesByIds", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicNotesByIds") @ResponseWrapper(localName = "getLinkedCachedDemographicNotesByIdsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicNotesByIdsResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicNotesByIds(@WebParam(name = "cachedDemographicNoteCompositePk", targetNamespace = "") final List p0); - + + /** + * Stores or updates a list of cached demographic drug/medication records. + * + * @param p0 List<CachedDemographicDrug> the list of drug records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicDrugs", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicDrugs") @ResponseWrapper(localName = "setCachedDemographicDrugsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicDrugsResponse") void setCachedDemographicDrugs(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Retrieves the consent state for a demographic at a specific facility. + * + * @param p0 FacilityIdIntegerCompositePk the composite primary key containing integrator facility ID and demographic ID + * @return GetConsentTransfer the consent state information + */ @WebMethod @RequestWrapper(localName = "getConsentState", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetConsentState") @ResponseWrapper(localName = "getConsentStateResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetConsentStateResponse") @WebResult(name = "return", targetNamespace = "") GetConsentTransfer getConsentState(@WebParam(name = "integratorFacilityAndDemographicId", targetNamespace = "") final FacilityIdIntegerCompositePk p0); - + + /** + * Retrieves the binary content of a cached demographic document. + * + * @param p0 FacilityIdIntegerCompositePk the composite primary key containing facility ID and document ID + * @return CachedDemographicDocumentContents the document content with binary data + */ @WebMethod @RequestWrapper(localName = "getCachedDemographicDocumentContents", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicDocumentContents") @ResponseWrapper(localName = "getCachedDemographicDocumentContentsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetCachedDemographicDocumentContentsResponse") @WebResult(name = "return", targetNamespace = "") CachedDemographicDocumentContents getCachedDemographicDocumentContents(@WebParam(name = "arg0", targetNamespace = "") final FacilityIdIntegerCompositePk p0); - + + /** + * Stores or updates a demographic consent record. + * + * @param p0 SetConsentTransfer the consent data to store + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicConsent", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicConsent") @ResponseWrapper(localName = "setCachedDemographicConsentResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicConsentResponse") void setCachedDemographicConsent(@WebParam(name = "consentTransfer", targetNamespace = "") final SetConsentTransfer p0); - + + /** + * Stores or updates a list of cached measurement type definitions. + * + * @param p0 List<CachedMeasurementType> the list of measurement type records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedMeasurementTypes", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementTypes") @ResponseWrapper(localName = "setCachedMeasurementTypesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedMeasurementTypesResponse") void setCachedMeasurementTypes(@WebParam(name = "arg0", targetNamespace = "") final List p0); + /** + * Deletes specific cached demographic clinical issues. + * + * @param p0 Integer the facility ID + * @param p1 List<FacilityIdDemographicIssueCompositePk> the list of composite keys identifying issues to delete + */ @WebMethod @RequestWrapper(localName = "deleteCachedDemographicIssues", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.DeleteCachedDemographicIssues") @ResponseWrapper(localName = "deleteCachedDemographicIssuesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.DeleteCachedDemographicIssuesResponse") void deleteCachedDemographicIssues(@WebParam(name = "arg0", targetNamespace = "") final Integer p0, @WebParam(name = "arg1", targetNamespace = "") final List p1); - + + /** + * Retrieves metadata for cached clinical notes without full content (lightweight query). + * + * @param p0 Integer the CAISI demographic ID to retrieve note metadata for + * @return List<CachedDemographicNote> list of cached note metadata from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicNoteMetaData", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicNoteMetaData") @ResponseWrapper(localName = "getLinkedCachedDemographicNoteMetaDataResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicNoteMetaDataResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicNoteMetaData(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Retrieves all demographics linked to the specified demographic (includes multi-hop relationships). + * + * @param p0 Integer the CAISI demographic ID to retrieve linked demographics for + * @return List<DemographicTransfer> list of all linked demographic records across all facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedDemographicsByDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedDemographicsByDemographicId") @ResponseWrapper(localName = "getLinkedDemographicsByDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedDemographicsByDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedDemographicsByDemographicId(@WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p0); - + + /** + * Records the timestamp of the last data push for a facility. + * + * @param p0 int the facility ID + */ @WebMethod @RequestWrapper(localName = "setLastPushDate", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetLastPushDate") @ResponseWrapper(localName = "setLastPushDateResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetLastPushDateResponse") void setLastPushDate(@WebParam(name = "arg0", targetNamespace = "") final int p0); - + + /** + * Removes a link between demographics at different facilities. + * + * @param p0 Integer the demographic ID at the current facility + * @param p1 Integer the integrator facility ID on the integrator + * @param p2 Integer the demographic ID on the integrator + */ @WebMethod @RequestWrapper(localName = "unLinkDemographics", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.UnLinkDemographics") @ResponseWrapper(localName = "unLinkDemographicsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.UnLinkDemographicsResponse") void unLinkDemographics(@WebParam(name = "caisiDemographicIdAtCurrentFacility", targetNamespace = "") final Integer p0, @WebParam(name = "integratorDemographicFacilityIdOnIntegrator", targetNamespace = "") final Integer p1, @WebParam(name = "caisiDemographicIdOnIntegrator", targetNamespace = "") final Integer p2); + /** + * Retrieves demographics that have been pushed to the integrator after a specified date. + * + * @param p0 Calendar the cutoff date - returns demographics pushed after this date + * @return List<DemographicPushDate> list of demographics with their push timestamps + */ @WebMethod @RequestWrapper(localName = "getDemographicsPushedAfterDate", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDemographicsPushedAfterDate") @ResponseWrapper(localName = "getDemographicsPushedAfterDateResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDemographicsPushedAfterDateResponse") @WebResult(name = "return", targetNamespace = "") List getDemographicsPushedAfterDate(@WebParam(name = "arg0", targetNamespace = "") final Calendar p0); - + + /** + * Retrieves a specific demographic record by facility ID and demographic ID. + * + * @param p0 Integer the integrator facility ID + * @param p1 Integer the CAISI demographic ID + * @return DemographicTransfer the demographic record, or null if not found + */ @WebMethod @RequestWrapper(localName = "getDemographicByFacilityIdAndDemographicId", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDemographicByFacilityIdAndDemographicId") @ResponseWrapper(localName = "getDemographicByFacilityIdAndDemographicIdResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDemographicByFacilityIdAndDemographicIdResponse") @WebResult(name = "return", targetNamespace = "") DemographicTransfer getDemographicByFacilityIdAndDemographicId(@WebParam(name = "integratorFacilityId", targetNamespace = "") final Integer p0, @WebParam(name = "caisiDemographicId", targetNamespace = "") final Integer p1); - + + /** + * Adds a single cached demographic form record. + * + * @param p0 CachedDemographicForm the form data to cache + */ @WebMethod @RequestWrapper(localName = "addCachedDemographicForm", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicForm") @ResponseWrapper(localName = "addCachedDemographicFormResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicFormResponse") void addCachedDemographicForm(@WebParam(name = "arg0", targetNamespace = "") final CachedDemographicForm p0); - + + /** + * Stores or updates a list of cached demographic clinical issues. + * + * @param p0 List<CachedDemographicIssue> the list of clinical issue records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedDemographicIssues", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicIssues") @ResponseWrapper(localName = "setCachedDemographicIssuesResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedDemographicIssuesResponse") void setCachedDemographicIssues(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Searches for demographics matching specified criteria with match scores. + * + * @param p0 MatchingDemographicParameters the search parameters (name, DOB, gender, etc.) + * @return List<MatchingDemographicTransferScore> list of matching demographics with confidence scores + */ @WebMethod @RequestWrapper(localName = "getMatchingDemographics", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetMatchingDemographics") @ResponseWrapper(localName = "getMatchingDemographicsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetMatchingDemographicsResponse") @WebResult(name = "return", targetNamespace = "") List getMatchingDemographics(@WebParam(name = "arg0", targetNamespace = "") final MatchingDemographicParameters p0); + /** + * Adds a single cached demographic document record (metadata only). + * + * @param p0 CachedDemographicDocument the document metadata to cache + */ @WebMethod @RequestWrapper(localName = "addCachedDemographicDocument", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicDocument") @ResponseWrapper(localName = "addCachedDemographicDocumentResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicDocumentResponse") void addCachedDemographicDocument(@WebParam(name = "arg0", targetNamespace = "") final CachedDemographicDocument p0); - + + /** + * Stores or updates a list of cached electronic form data records. + * + * @param p0 List<CachedEformData> the list of eform data records to cache + */ @WebMethod @RequestWrapper(localName = "setCachedEformData", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedEformData") @ResponseWrapper(localName = "setCachedEformDataResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.SetCachedEformDataResponse") void setCachedEformData(@WebParam(name = "arg0", targetNamespace = "") final List p0); - + + /** + * Adds a single cached lab result record. + * + * @param p0 CachedDemographicLabResult the lab result to cache + */ @WebMethod @RequestWrapper(localName = "addCachedDemographicLabResult", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicLabResult") @ResponseWrapper(localName = "addCachedDemographicLabResultResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicLabResultResponse") void addCachedDemographicLabResult(@WebParam(name = "arg0", targetNamespace = "") final CachedDemographicLabResult p0); - + + /** + * Retrieves demographic IDs pushed after a specified date, filtered by requesting facility. + * + * @param p0 Calendar the cutoff date - returns demographic IDs pushed after this date + * @return List<Integer> list of demographic IDs accessible to the requesting facility + */ @WebMethod @RequestWrapper(localName = "getDemographicIdPushedAfterDateByRequestingFacility", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDemographicIdPushedAfterDateByRequestingFacility") @ResponseWrapper(localName = "getDemographicIdPushedAfterDateByRequestingFacilityResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetDemographicIdPushedAfterDateByRequestingFacilityResponse") @WebResult(name = "return", targetNamespace = "") List getDemographicIdPushedAfterDateByRequestingFacility(@WebParam(name = "arg0", targetNamespace = "") final Calendar p0); - + + /** + * Retrieves cached forms of a specific type for linked demographics. + * + * @param p0 Integer the CAISI demographic ID + * @param p1 String the form name/type to filter by + * @return List<CachedDemographicForm> list of matching cached forms from linked facilities + */ @WebMethod @RequestWrapper(localName = "getLinkedCachedDemographicForms", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicForms") @ResponseWrapper(localName = "getLinkedCachedDemographicFormsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.GetLinkedCachedDemographicFormsResponse") @WebResult(name = "return", targetNamespace = "") List getLinkedCachedDemographicForms(@WebParam(name = "arg0", targetNamespace = "") final Integer p0, @WebParam(name = "arg1", targetNamespace = "") final String p1); - + + /** + * Adds a cached demographic document with its binary content in a single operation. + * + * @param p0 CachedDemographicDocument the document metadata + * @param p1 byte[] the binary document content + */ @WebMethod @RequestWrapper(localName = "addCachedDemographicDocumentAndContents", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicDocumentAndContents") @ResponseWrapper(localName = "addCachedDemographicDocumentAndContentsResponse", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/", className = "ca.openosp.openo.caisi_integrator.webserv.AddCachedDemographicDocumentAndContentsResponse") diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWsService.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWsService.java index ad721e08a35..3b2b1e10505 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWsService.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/DemographicWsService.java @@ -10,42 +10,167 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS web service client for CAISI Integrator demographic data integration. + * + * This service provides a SOAP client interface to interact with the CAISI (Client Access to + * Integrated Services and Information) Integrator demographic web service. It enables OpenO EMR + * instances to share and synchronize patient demographic data, clinical records, and other + * healthcare information across multiple facilities within an integrated healthcare network. + * + * The service acts as a client stub generated from the DemographicService WSDL, providing + * type-safe access to demographic operations including: + *
      + *
    • Patient demographic synchronization across facilities
    • + *
    • Clinical data sharing (allergies, medications, lab results)
    • + *
    • Appointment and encounter information exchange
    • + *
    • Document and form management
    • + *
    • Consent and privacy management
    • + *
    + * + * This class extends {@link javax.xml.ws.Service} and follows the JAX-WS service pattern, + * providing multiple constructors for different initialization scenarios with support for + * custom WSDL locations and web service features. + * + * @see DemographicWs + * @see javax.xml.ws.Service + * @see javax.xml.ws.WebServiceClient + * @since 2026-01-24 + */ @WebServiceClient(name = "DemographicWsService", wsdlLocation = "file:DemographicService.wsdl", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/") public class DemographicWsService extends Service { + /** The WSDL location URL for the demographic web service. */ public static final URL WSDL_LOCATION; + + /** The QName representing the service in the WSDL namespace. */ public static final QName SERVICE; + + /** The QName representing the demographic web service port. */ public static final QName DemographicWsPort; - + + /** + * Constructs a new DemographicWsService with a custom WSDL location. + * + * This constructor allows clients to specify a custom WSDL URL for the service, + * useful when the service endpoint is located at a different location than the + * default WSDL file location. The service QName is always set to the default + * SERVICE constant. + * + * @param url URL the custom WSDL location URL + */ public DemographicWsService(final URL url) { super(url, DemographicWsService.SERVICE); } + /** + * Constructs a new DemographicWsService with custom WSDL location and service QName. + * + * This constructor provides full control over both the WSDL location and the service + * qualified name. This is useful when connecting to services with non-standard + * configurations or when working with multiple service definitions. + * + * @param url URL the custom WSDL location URL + * @param qName QName the qualified name identifying the service + */ public DemographicWsService(final URL url, final QName qName) { super(url, qName); } - + + /** + * Constructs a new DemographicWsService with default configuration. + * + * This is the default constructor that uses the WSDL location and service QName + * defined as constants in this class. This is the recommended constructor for + * standard CAISI Integrator demographic service connections. + */ public DemographicWsService() { super(DemographicWsService.WSDL_LOCATION, DemographicWsService.SERVICE); } - + + /** + * Constructs a new DemographicWsService with default configuration and web service features. + * + * This constructor allows specifying JAX-WS features such as MTOM (Message Transmission + * Optimization Mechanism), addressing, or other WS-* specifications while using the + * default WSDL location and service QName. + * + * @param array WebServiceFeature array of web service features to enable (e.g., MTOM, addressing) + */ public DemographicWsService(final WebServiceFeature... array) { super(DemographicWsService.WSDL_LOCATION, DemographicWsService.SERVICE, array); } - + + /** + * Constructs a new DemographicWsService with custom WSDL location and web service features. + * + * This constructor combines a custom WSDL URL with JAX-WS features, useful for + * connecting to non-standard service locations with specific protocol requirements. + * + * @param url URL the custom WSDL location URL + * @param array WebServiceFeature array of web service features to enable + */ public DemographicWsService(final URL url, final WebServiceFeature... array) { super(url, DemographicWsService.SERVICE, array); } - + + /** + * Constructs a new DemographicWsService with full customization. + * + * This is the most flexible constructor, allowing specification of WSDL location, + * service QName, and web service features. This provides complete control over all + * aspects of the service connection configuration. + * + * @param url URL the custom WSDL location URL + * @param qName QName the qualified name identifying the service + * @param array WebServiceFeature array of web service features to enable + */ public DemographicWsService(final URL url, final QName qName, final WebServiceFeature... array) { super(url, qName, array); } + /** + * Retrieves the demographic web service port with default configuration. + * + * This method returns a proxy object that implements the {@link DemographicWs} interface, + * which provides access to all demographic web service operations including patient data + * synchronization, clinical information sharing, and consent management across the CAISI + * Integrator network. + * + * The returned port can be used to invoke all demographic service methods defined in the + * DemographicWs interface, such as: + *
      + *
    • Linking/unlinking demographics across facilities
    • + *
    • Retrieving and setting cached patient data (allergies, drugs, notes, etc.)
    • + *
    • Managing appointments, documents, and lab results
    • + *
    • Handling consent and privacy settings
    • + *
    + * + * @return DemographicWs the demographic web service port proxy + */ @WebEndpoint(name = "DemographicWsPort") public DemographicWs getDemographicWsPort() { return (DemographicWs)super.getPort(DemographicWsService.DemographicWsPort, (Class)DemographicWs.class); } - + + /** + * Retrieves the demographic web service port with custom web service features. + * + * This method returns a proxy object that implements the {@link DemographicWs} interface + * with specified JAX-WS features enabled. This is useful for configuring protocol-specific + * behaviors such as MTOM for binary data transfer (e.g., document contents, lab images), + * WS-Addressing for advanced routing, or other WS-* specifications. + * + * Example use cases: + *
      + *
    • Enabling MTOM when transferring large medical documents or images
    • + *
    • Configuring timeouts for slow network connections between facilities
    • + *
    • Adding security features for enhanced PHI protection
    • + *
    + * + * @param array WebServiceFeature array of web service features to enable on this port + * @return DemographicWs the demographic web service port proxy with specified features + */ @WebEndpoint(name = "DemographicWsPort") public DemographicWs getDemographicWsPort(final WebServiceFeature... array) { return (DemographicWs)super.getPort(DemographicWsService.DemographicWsPort, (Class)DemographicWs.class, array); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/FacilityWsService.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/FacilityWsService.java index 294fd09119c..91844f613fc 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/FacilityWsService.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/FacilityWsService.java @@ -10,42 +10,182 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS client service for accessing the CAISI Integrator Facility Web Service. + * + * This service provides programmatic access to facility management operations in the CAISI + * (Client Access to Integrated Services and Information) Integrator system. The Integrator + * enables multiple OpenO EMR facilities to securely share and synchronize healthcare data + * across organizational boundaries while maintaining patient consent and privacy controls. + * + * The FacilityWsService acts as a web service client stub that connects to the remote + * FacilityWs SOAP endpoint. It provides methods to retrieve facility information, manage + * data import logs, and synchronize facility metadata across the integrated network. + * + *

    Key Operations:

    + *
      + *
    • Retrieve all facilities in the Integrator network
    • + *
    • Get and update local facility information
    • + *
    • Create and manage data import logs for audit trails
    • + *
    • Check file processing status for data synchronization
    • + *
    • Track facility last update timestamps
    • + *
    + * + *

    Healthcare Context:

    + * This service is critical for multi-facility healthcare organizations that need to maintain + * unified patient records across multiple sites while ensuring PIPEDA/HIPAA compliance through + * controlled data sharing and comprehensive audit logging. + * + *

    WSDL Configuration:

    + * The service expects a WSDL file at {@code file:FacilityService.wsdl}. If the WSDL location + * is not accessible during initialization, a warning is logged but the service can still be + * instantiated with alternative URL configurations. + * + *

    Usage Example:

    + *
    + * FacilityWsService service = new FacilityWsService();
    + * FacilityWs port = service.getFacilityWsPort();
    + * List<CachedFacility> facilities = port.getAllFacility();
    + * 
    + * + * @see FacilityWs + * @see CachedFacility + * @see javax.xml.ws.Service + * @since 2026-01-24 + */ @WebServiceClient(name = "FacilityWsService", wsdlLocation = "file:FacilityService.wsdl", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/") public class FacilityWsService extends Service { public static final URL WSDL_LOCATION; public static final QName SERVICE; public static final QName FacilityWsPort; - + + /** + * Constructs a FacilityWsService with a custom WSDL URL location. + * + * This constructor allows clients to override the default WSDL location specified + * in the @WebServiceClient annotation. This is useful when the WSDL is hosted at + * a different location than the default compile-time location. + * + * @param url URL the WSDL document location for the service + */ public FacilityWsService(final URL url) { super(url, FacilityWsService.SERVICE); } - + + /** + * Constructs a FacilityWsService with custom WSDL URL and service QName. + * + * This constructor provides full control over both the WSDL document location and + * the service qualified name. This is typically used in advanced scenarios where + * the service name differs from the default or when working with dynamically + * generated service configurations. + * + * @param url URL the WSDL document location for the service + * @param qName QName the qualified name of the service + */ public FacilityWsService(final URL url, final QName qName) { super(url, qName); } - + + /** + * Constructs a FacilityWsService using default WSDL location and service name. + * + * This is the standard constructor for normal usage. It initializes the service + * using the WSDL location specified in the @WebServiceClient annotation + * (file:FacilityService.wsdl) and the default service QName. If the WSDL file + * cannot be found at the default location, a warning is logged but the service + * instance is still created. + */ public FacilityWsService() { super(FacilityWsService.WSDL_LOCATION, FacilityWsService.SERVICE); } - + + /** + * Constructs a FacilityWsService with custom web service features. + * + * This constructor allows enabling specific JAX-WS features such as MTOM + * (Message Transmission Optimization Mechanism), WS-Addressing, or custom + * handler configurations. The service uses the default WSDL location and + * service name while applying the specified features. + * + * @param array WebServiceFeature... variable-length array of web service features to enable + */ public FacilityWsService(final WebServiceFeature... array) { super(FacilityWsService.WSDL_LOCATION, FacilityWsService.SERVICE, array); } - + + /** + * Constructs a FacilityWsService with custom WSDL URL and web service features. + * + * This constructor combines a custom WSDL location with specific JAX-WS features. + * It is useful when the WSDL is hosted at a non-default location and you need to + * enable features like MTOM for large document transfers or WS-Addressing for + * advanced routing scenarios common in healthcare integrations. + * + * @param url URL the WSDL document location for the service + * @param array WebServiceFeature... variable-length array of web service features to enable + */ public FacilityWsService(final URL url, final WebServiceFeature... array) { super(url, FacilityWsService.SERVICE, array); } - + + /** + * Constructs a FacilityWsService with full customization of all parameters. + * + * This constructor provides complete control over the service configuration, + * allowing specification of the WSDL location, service qualified name, and + * web service features. This is the most flexible constructor, typically used + * in advanced integration scenarios or when programmatically generating service + * configurations from dynamic sources. + * + * @param url URL the WSDL document location for the service + * @param qName QName the qualified name of the service + * @param array WebServiceFeature... variable-length array of web service features to enable + */ public FacilityWsService(final URL url, final QName qName, final WebServiceFeature... array) { super(url, qName, array); } - + + /** + * Retrieves the FacilityWs port proxy for invoking web service operations. + * + * This method returns a port proxy that implements the FacilityWs interface, + * providing access to all facility management operations such as retrieving + * facility lists, managing import logs, and synchronizing facility data across + * the CAISI Integrator network. The port is configured with default settings + * and no additional web service features. + * + *

    Usage Example:

    + *
    +     * FacilityWsService service = new FacilityWsService();
    +     * FacilityWs port = service.getFacilityWsPort();
    +     * CachedFacility myFacility = port.getMyFacility();
    +     * 
    + * + * @return FacilityWs the port proxy for invoking facility web service operations + */ @WebEndpoint(name = "FacilityWsPort") public FacilityWs getFacilityWsPort() { return (FacilityWs)super.getPort(FacilityWsService.FacilityWsPort, (Class)FacilityWs.class); } - + + /** + * Retrieves the FacilityWs port proxy with custom web service features enabled. + * + * This method returns a port proxy configured with the specified JAX-WS features. + * This is useful when you need to enable specific capabilities for facility + * operations, such as: + *
      + *
    • MTOM (Message Transmission Optimization Mechanism) for efficient transfer + * of large facility data exports or document attachments
    • + *
    • WS-Addressing for advanced message routing in complex healthcare networks
    • + *
    • Custom security features for enhanced PHI protection during transmission
    • + *
    + * + * @param array WebServiceFeature... variable-length array of web service features to enable + * @return FacilityWs the port proxy for invoking facility web service operations with specified features + */ @WebEndpoint(name = "FacilityWsPort") public FacilityWs getFacilityWsPort(final WebServiceFeature... array) { return (FacilityWs)super.getPort(FacilityWsService.FacilityWsPort, (Class)FacilityWs.class, array); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/HnrWsService.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/HnrWsService.java index 7ddafdf825b..1fd9cda6985 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/HnrWsService.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/HnrWsService.java @@ -10,42 +10,140 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS web service client for the Hospital/Network Report (HNR) integration service. + * + * This service provides a client interface for accessing the HNR Web Service, which is part + * of the CAISI Integrator module. The CAISI Integrator enables data sharing between multiple + * OpenO EMR installations and external healthcare systems. The HNR service specifically handles + * hospital and network reporting functionality, allowing retrieval and management of hospital + * reports and related healthcare information across integrated systems. + * + * The service client is generated from the HnrService.wsdl contract and provides multiple + * constructor options for different configuration scenarios, including custom WSDL locations + * and JAX-WS features for advanced web service capabilities. + * + * @see HnrWs + * @see javax.xml.ws.Service + * @since 2026-01-24 + */ @WebServiceClient(name = "HnrWsService", wsdlLocation = "file:HnrService.wsdl", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/") public class HnrWsService extends Service { + /** The WSDL location URL for the HNR web service. */ public static final URL WSDL_LOCATION; + + /** The qualified name for the HNR web service. */ public static final QName SERVICE; + + /** The qualified name for the HNR web service port. */ public static final QName HnrWsPort; - + + /** + * Constructs a new HnrWsService client with a custom WSDL location. + * + * This constructor allows specifying a custom WSDL location URL while using the + * default service name. This is useful when the WSDL is hosted at a location + * different from the default file:HnrService.wsdl. + * + * @param url URL the WSDL location URL for the service + */ public HnrWsService(final URL url) { super(url, HnrWsService.SERVICE); } + /** + * Constructs a new HnrWsService client with custom WSDL location and service name. + * + * This constructor provides full control over both the WSDL location and the + * qualified service name, useful for advanced integration scenarios where both + * the WSDL location and service name need to be customized. + * + * @param url URL the WSDL location URL for the service + * @param qName QName the qualified name of the service + */ public HnrWsService(final URL url, final QName qName) { super(url, qName); } - + + /** + * Constructs a new HnrWsService client with default configuration. + * + * This is the default no-argument constructor that uses the WSDL location + * specified in the @WebServiceClient annotation (file:HnrService.wsdl) and + * the default service name. This is the most common constructor for typical + * service usage. + */ public HnrWsService() { super(HnrWsService.WSDL_LOCATION, HnrWsService.SERVICE); } - + + /** + * Constructs a new HnrWsService client with default WSDL location and custom JAX-WS features. + * + * This constructor allows enabling specific JAX-WS features such as MTOM (Message + * Transmission Optimization Mechanism), addressing, or custom bindings while using + * the default WSDL location and service name. + * + * @param array WebServiceFeature varargs array of JAX-WS features to enable + */ public HnrWsService(final WebServiceFeature... array) { super(HnrWsService.WSDL_LOCATION, HnrWsService.SERVICE, array); } - + + /** + * Constructs a new HnrWsService client with custom WSDL location and JAX-WS features. + * + * This constructor combines a custom WSDL location with JAX-WS feature configuration, + * useful when the WSDL is hosted at a non-default location and specific web service + * features need to be enabled. + * + * @param url URL the WSDL location URL for the service + * @param array WebServiceFeature varargs array of JAX-WS features to enable + */ public HnrWsService(final URL url, final WebServiceFeature... array) { super(url, HnrWsService.SERVICE, array); } - + + /** + * Constructs a new HnrWsService client with full customization options. + * + * This is the most flexible constructor providing complete control over WSDL location, + * service name, and JAX-WS features. This is useful for advanced integration scenarios + * requiring complete customization of the service client configuration. + * + * @param url URL the WSDL location URL for the service + * @param qName QName the qualified name of the service + * @param array WebServiceFeature varargs array of JAX-WS features to enable + */ public HnrWsService(final URL url, final QName qName, final WebServiceFeature... array) { super(url, qName, array); } + /** + * Retrieves the HNR web service port with default configuration. + * + * Returns a proxy to the HNR web service endpoint using the default port configuration. + * The returned HnrWs interface provides access to all operations defined in the WSDL + * for hospital and network reporting functionality. + * + * @return HnrWs the web service port interface for accessing HNR operations + */ @WebEndpoint(name = "HnrWsPort") public HnrWs getHnrWsPort() { return (HnrWs)super.getPort(HnrWsService.HnrWsPort, (Class)HnrWs.class); } - + + /** + * Retrieves the HNR web service port with custom JAX-WS features. + * + * Returns a proxy to the HNR web service endpoint with specific JAX-WS features enabled. + * This allows customization of the port behavior through features such as MTOM for + * optimized binary data transmission or WS-Addressing for enhanced message routing. + * + * @param array WebServiceFeature varargs array of JAX-WS features to enable on the port + * @return HnrWs the web service port interface for accessing HNR operations + */ @WebEndpoint(name = "HnrWsPort") public HnrWs getHnrWsPort(final WebServiceFeature... array) { return (HnrWs)super.getPort(HnrWsService.HnrWsPort, (Class)HnrWs.class, array); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProgramWsService.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProgramWsService.java index 6f5c3086290..5d4c359933d 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProgramWsService.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProgramWsService.java @@ -10,42 +10,114 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS service client for the CAISI Integrator Program web service. + * + * This service provides connectivity to the CAISI (Client Access to Integrated Services and Information) + * Integrator system for program management operations. The CAISI Integrator enables inter-EMR data sharing + * and integration across multiple OpenO installations, supporting community health programs and regional + * health information exchange. + * + * The service client is auto-generated from the WSDL definition and provides access to program-related + * operations through the ProgramWs port interface. It supports multiple instantiation patterns including + * default configuration, custom WSDL locations, and JAX-WS feature customization. + * + * @since 2026-01-24 + * @see ProgramWs + * @see Service + */ @WebServiceClient(name = "ProgramWsService", wsdlLocation = "file:ProgramService.wsdl", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/") public class ProgramWsService extends Service { public static final URL WSDL_LOCATION; public static final QName SERVICE; public static final QName ProgramWsPort; - + + /** + * Creates a new ProgramWsService instance with a custom WSDL location. + * + * @param url URL the WSDL location for the Program web service + */ public ProgramWsService(final URL url) { super(url, ProgramWsService.SERVICE); } - + + /** + * Creates a new ProgramWsService instance with a custom WSDL location and service QName. + * + * @param url URL the WSDL location for the Program web service + * @param qName QName the qualified name of the service + */ public ProgramWsService(final URL url, final QName qName) { super(url, qName); } - + + /** + * Creates a new ProgramWsService instance using the default WSDL location. + * + * The default WSDL location is loaded from the static initializer and points to + * the ProgramService.wsdl file. + */ public ProgramWsService() { super(ProgramWsService.WSDL_LOCATION, ProgramWsService.SERVICE); } - + + /** + * Creates a new ProgramWsService instance using the default WSDL location with custom features. + * + * @param array WebServiceFeature[] array of JAX-WS features to enable on the service (e.g., MTOM, addressing) + */ public ProgramWsService(final WebServiceFeature... array) { super(ProgramWsService.WSDL_LOCATION, ProgramWsService.SERVICE, array); } - + + /** + * Creates a new ProgramWsService instance with a custom WSDL location and features. + * + * @param url URL the WSDL location for the Program web service + * @param array WebServiceFeature[] array of JAX-WS features to enable on the service (e.g., MTOM, addressing) + */ public ProgramWsService(final URL url, final WebServiceFeature... array) { super(url, ProgramWsService.SERVICE, array); } - + + /** + * Creates a new ProgramWsService instance with a custom WSDL location, service QName, and features. + * + * This is the most flexible constructor allowing full customization of the service configuration. + * + * @param url URL the WSDL location for the Program web service + * @param qName QName the qualified name of the service + * @param array WebServiceFeature[] array of JAX-WS features to enable on the service (e.g., MTOM, addressing) + */ public ProgramWsService(final URL url, final QName qName, final WebServiceFeature... array) { super(url, qName, array); } + /** + * Retrieves the ProgramWs port for accessing program management operations. + * + * This method returns the default port for the CAISI Integrator Program web service, + * providing access to program-related operations such as program enrollment, case management, + * and inter-EMR program data exchange. + * + * @return ProgramWs the Program web service port interface + */ @WebEndpoint(name = "ProgramWsPort") public ProgramWs getProgramWsPort() { return (ProgramWs)super.getPort(ProgramWsService.ProgramWsPort, (Class)ProgramWs.class); } - + + /** + * Retrieves the ProgramWs port with custom JAX-WS features enabled. + * + * This method allows customization of the port with specific features such as MTOM + * (Message Transmission Optimization Mechanism) for binary attachments or WS-Addressing + * for enhanced message routing in the CAISI Integrator system. + * + * @param array WebServiceFeature[] array of JAX-WS features to enable on the port + * @return ProgramWs the Program web service port interface with features applied + */ @WebEndpoint(name = "ProgramWsPort") public ProgramWs getProgramWsPort(final WebServiceFeature... array) { return (ProgramWs)super.getPort(ProgramWsService.ProgramWsPort, (Class)ProgramWs.class, array); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProviderWsService.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProviderWsService.java index 8124358dd95..d419baa1ca4 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProviderWsService.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/ProviderWsService.java @@ -10,42 +10,164 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS web service client for accessing provider information through the CAISI Integrator system. + * + *

    This service provides a client interface for accessing healthcare provider data across + * multiple OpenO EMR installations through the CAISI Integrator inter-EMR data sharing system. + * The service is generated from the ProviderService.wsdl definition and provides multiple + * constructor variations to support different web service configuration scenarios.

    + * + *

    The service supports JAX-WS WebServiceFeature configurations, allowing clients to customize + * behavior such as MTOM (Message Transmission Optimization Mechanism), addressing, and other + * WS-* specifications as needed for healthcare data exchange.

    + * + *

    Healthcare Context: This service facilitates provider information exchange + * between different EMR installations, supporting collaborative care scenarios where patient + * information needs to be shared across healthcare organizations while maintaining proper + * access controls and PHI protection.

    + * + * @see ProviderWs + * @see Service + * @since 2026-01-24 + */ @WebServiceClient(name = "ProviderWsService", wsdlLocation = "file:ProviderService.wsdl", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/") public class ProviderWsService extends Service { + /** + * The WSDL location URL for the ProviderWsService. + * Initialized from the file:ProviderService.wsdl location in the static initializer. + */ public static final URL WSDL_LOCATION; + + /** + * The QName for the ProviderWsService. + * Namespace: http://ws.caisi_integrator.oscarehr.org/ + */ public static final QName SERVICE; + + /** + * The QName for the ProviderWsPort endpoint. + * Namespace: http://ws.caisi_integrator.oscarehr.org/ + */ public static final QName ProviderWsPort; - + + /** + * Constructs a ProviderWsService client with a custom WSDL location URL. + * + *

    This constructor allows clients to specify an alternative WSDL location + * instead of using the default file:ProviderService.wsdl location. This is useful + * when the WSDL is hosted at a different location or retrieved from a remote server.

    + * + * @param url URL the custom WSDL location for the service definition + */ public ProviderWsService(final URL url) { super(url, ProviderWsService.SERVICE); } - + + /** + * Constructs a ProviderWsService client with a custom WSDL location and custom service QName. + * + *

    This constructor provides full control over both the WSDL location and the service + * QName. This is the most flexible constructor and is typically used in advanced scenarios + * where both the WSDL location and service definition need to be customized.

    + * + * @param url URL the custom WSDL location for the service definition + * @param qName QName the custom qualified name for the service + */ public ProviderWsService(final URL url, final QName qName) { super(url, qName); } - + + /** + * Constructs a ProviderWsService client using the default WSDL location and service QName. + * + *

    This is the default no-argument constructor that uses the WSDL_LOCATION and SERVICE + * constants initialized from the static block. This is the most common constructor used + * when creating a service client with default configuration.

    + */ public ProviderWsService() { super(ProviderWsService.WSDL_LOCATION, ProviderWsService.SERVICE); } - + + /** + * Constructs a ProviderWsService client with default WSDL location and custom web service features. + * + *

    This constructor allows clients to enable specific JAX-WS features while using the + * default WSDL location and service QName. Common features include MTOM for optimized + * binary data transmission, WS-Addressing for enhanced message routing, and other + * WS-* specifications supported by JAX-WS.

    + * + * @param array WebServiceFeature... array of web service features to enable for this client + */ public ProviderWsService(final WebServiceFeature... array) { super(ProviderWsService.WSDL_LOCATION, ProviderWsService.SERVICE, array); } - + + /** + * Constructs a ProviderWsService client with custom WSDL location and web service features. + * + *

    This constructor combines a custom WSDL location with the ability to enable specific + * JAX-WS features. This is useful when the WSDL is hosted at a different location and + * specific features need to be enabled for the service interaction.

    + * + * @param url URL the custom WSDL location for the service definition + * @param array WebServiceFeature... array of web service features to enable for this client + */ public ProviderWsService(final URL url, final WebServiceFeature... array) { super(url, ProviderWsService.SERVICE, array); } - + + /** + * Constructs a ProviderWsService client with fully customized configuration. + * + *

    This is the most flexible constructor, allowing full control over the WSDL location, + * service QName, and enabled web service features. This constructor is typically used in + * advanced integration scenarios where all aspects of the service configuration need to + * be customized.

    + * + * @param url URL the custom WSDL location for the service definition + * @param qName QName the custom qualified name for the service + * @param array WebServiceFeature... array of web service features to enable for this client + */ public ProviderWsService(final URL url, final QName qName, final WebServiceFeature... array) { super(url, qName, array); } - + + /** + * Retrieves the ProviderWs port for accessing provider web service operations. + * + *

    This method returns a proxy to the ProviderWs web service endpoint, which provides + * operations for querying and managing healthcare provider information through the CAISI + * Integrator system. The returned port can be used to invoke web service operations + * defined in the ProviderWs interface.

    + * + *

    Healthcare Usage: Use this port to access provider directories, + * retrieve provider credentials, and obtain provider demographic information for + * inter-EMR collaboration and referral workflows.

    + * + * @return ProviderWs the web service port for provider operations + */ @WebEndpoint(name = "ProviderWsPort") public ProviderWs getProviderWsPort() { return (ProviderWs)super.getPort(ProviderWsService.ProviderWsPort, (Class)ProviderWs.class); } - + + /** + * Retrieves the ProviderWs port with custom web service features enabled. + * + *

    This method returns a proxy to the ProviderWs web service endpoint with specific + * JAX-WS features enabled. This allows clients to customize the behavior of the web + * service interaction, such as enabling MTOM for optimized binary data transmission, + * WS-Addressing for enhanced message routing, or other WS-* specifications.

    + * + *

    Example Features: Enable MTOM when transferring provider documents + * or credentials, or enable WS-Addressing when specific message routing is required + * in the healthcare integration architecture.

    + * + * @param array WebServiceFeature... array of web service features to enable for this port + * @return ProviderWs the web service port for provider operations with features enabled + */ @WebEndpoint(name = "ProviderWsPort") public ProviderWs getProviderWsPort(final WebServiceFeature... array) { return (ProviderWs)super.getPort(ProviderWsService.ProviderWsPort, (Class)ProviderWs.class, array); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/ReferralWsService.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/ReferralWsService.java index db2b43fbe92..dd33d3a0002 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/ReferralWsService.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/ReferralWsService.java @@ -10,42 +10,176 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.Service; +/** + * JAX-WS web service client for CAISI Integrator referral management. + * + *

    This service client provides access to the CAISI Integrator referral web service, + * enabling healthcare providers to manage patient referrals across integrated EMR systems. + * The CAISI (Client Access to Integrated Services and Information) Integrator facilitates + * data sharing and interoperability between multiple OpenO EMR installations and other + * healthcare systems within a collaborative care network.

    + * + *

    The service uses JAX-WS (Java API for XML Web Services) to communicate with the + * referral service endpoint defined in ReferralService.wsdl. It provides multiple + * constructors to support various web service feature configurations and custom + * WSDL locations for different deployment environments.

    + * + *

    Healthcare Context:

    + *
      + *
    • Supports inter-provider referral workflows in community health settings
    • + *
    • Enables referral tracking across integrated healthcare facilities
    • + *
    • Maintains referral data consistency in multi-site deployments
    • + *
    • Complies with healthcare information exchange standards
    • + *
    + * + *

    Security Considerations:

    + *
      + *
    • All referral data contains Protected Health Information (PHI)
    • + *
    • Transport security must be configured at the deployment level
    • + *
    • Authentication and authorization handled by service endpoint
    • + *
    • WSDL location must be properly secured in production environments
    • + *
    + * + * @see ReferralWs + * @see javax.xml.ws.Service + * @see javax.xml.ws.WebServiceClient + * @since 2026-01-24 + */ @WebServiceClient(name = "ReferralWsService", wsdlLocation = "file:ReferralService.wsdl", targetNamespace = "http://ws.caisi_integrator.oscarehr.org/") public class ReferralWsService extends Service { + /** The URL location of the WSDL document for this service. */ public static final URL WSDL_LOCATION; + + /** The qualified name of the service in the WSDL namespace. */ public static final QName SERVICE; + + /** The qualified name of the ReferralWs port in the WSDL namespace. */ public static final QName ReferralWsPort; - + + /** + * Constructs a new ReferralWsService with a custom WSDL location. + * + *

    This constructor allows clients to specify an alternative WSDL location + * while using the default service QName. Useful for environments where the + * WSDL document is hosted at a different URL than the default.

    + * + * @param url URL the location of the WSDL document for this service + */ public ReferralWsService(final URL url) { super(url, ReferralWsService.SERVICE); } + /** + * Constructs a new ReferralWsService with custom WSDL location and service QName. + * + *

    This constructor provides maximum flexibility by allowing specification of both + * the WSDL location and the service qualified name. Typically used in advanced + * integration scenarios or when the service definition differs from defaults.

    + * + * @param url URL the location of the WSDL document for this service + * @param qName QName the qualified name of the service + */ public ReferralWsService(final URL url, final QName qName) { super(url, qName); } - + + /** + * Constructs a new ReferralWsService using default configuration. + * + *

    This is the default constructor that uses the predefined WSDL location + * (file:ReferralService.wsdl) and service QName. This constructor is typically + * used in standard deployments where the WSDL is deployed alongside the application.

    + */ public ReferralWsService() { super(ReferralWsService.WSDL_LOCATION, ReferralWsService.SERVICE); } - + + /** + * Constructs a new ReferralWsService with custom web service features. + * + *

    This constructor allows enabling JAX-WS features such as MTOM (Message + * Transmission Optimization Mechanism), addressing, or custom handlers while + * using the default WSDL location and service QName.

    + * + * @param array WebServiceFeature[] array of web service features to enable + */ public ReferralWsService(final WebServiceFeature... array) { super(ReferralWsService.WSDL_LOCATION, ReferralWsService.SERVICE, array); } - + + /** + * Constructs a new ReferralWsService with custom WSDL location and web service features. + * + *

    Combines custom WSDL location with configurable web service features, + * using the default service QName. Useful for deployments that require both + * alternative WSDL hosting and specific JAX-WS feature configuration.

    + * + * @param url URL the location of the WSDL document for this service + * @param array WebServiceFeature[] array of web service features to enable + */ public ReferralWsService(final URL url, final WebServiceFeature... array) { super(url, ReferralWsService.SERVICE, array); } - + + /** + * Constructs a new ReferralWsService with full customization. + * + *

    This constructor provides complete control over the service configuration, + * allowing specification of WSDL location, service QName, and web service features. + * Intended for advanced integration scenarios requiring maximum flexibility.

    + * + * @param url URL the location of the WSDL document for this service + * @param qName QName the qualified name of the service + * @param array WebServiceFeature[] array of web service features to enable + */ public ReferralWsService(final URL url, final QName qName, final WebServiceFeature... array) { super(url, qName, array); } + /** + * Retrieves the ReferralWs port for invoking referral service operations. + * + *

    Returns a proxy instance that implements the ReferralWs interface, allowing + * clients to invoke referral management operations on the remote web service. + * The port is configured with default settings and no additional web service features.

    + * + *

    Usage Example:

    + *
    +     * ReferralWsService service = new ReferralWsService();
    +     * ReferralWs port = service.getReferralWsPort();
    +     * // Use port to invoke referral operations
    +     * 
    + * + * @return ReferralWs the service port for referral operations + * @see ReferralWs + */ @WebEndpoint(name = "ReferralWsPort") public ReferralWs getReferralWsPort() { return (ReferralWs)super.getPort(ReferralWsService.ReferralWsPort, (Class)ReferralWs.class); } - + + /** + * Retrieves the ReferralWs port with custom web service features. + * + *

    Returns a proxy instance that implements the ReferralWs interface with + * specified JAX-WS features enabled. This allows clients to configure advanced + * features such as MTOM for attachment handling, WS-Addressing for message routing, + * or custom handlers for logging and security processing.

    + * + *

    Usage Example:

    + *
    +     * ReferralWsService service = new ReferralWsService();
    +     * MTOMFeature mtom = new MTOMFeature();
    +     * ReferralWs port = service.getReferralWsPort(mtom);
    +     * // Use port with MTOM enabled
    +     * 
    + * + * @param array WebServiceFeature[] array of web service features to enable on the port + * @return ReferralWs the service port configured with specified features + * @see ReferralWs + * @see javax.xml.ws.WebServiceFeature + */ @WebEndpoint(name = "ReferralWsPort") public ReferralWs getReferralWsPort(final WebServiceFeature... array) { return (ReferralWs)super.getPort(ReferralWsService.ReferralWsPort, (Class)ReferralWs.class, array); diff --git a/src/main/java/ca/openosp/openo/caisi_integrator/ws/transfer/DemographicTransfer.java b/src/main/java/ca/openosp/openo/caisi_integrator/ws/transfer/DemographicTransfer.java index 09e9bb480c1..f768c62f30c 100644 --- a/src/main/java/ca/openosp/openo/caisi_integrator/ws/transfer/DemographicTransfer.java +++ b/src/main/java/ca/openosp/openo/caisi_integrator/ws/transfer/DemographicTransfer.java @@ -4,6 +4,23 @@ import java.util.Date; import java.io.Serializable; +/** + * Data transfer object for demographic information in the CAISI Integrator web service layer. + * + * This class is used to transfer patient demographic data between OpenO EMR instances through the + * CAISI Integrator system, which enables inter-EMR data sharing across multiple OpenO installations. + * It encapsulates all essential patient identification and contact information required for + * healthcare service delivery in the Canadian context, including Health Insurance Number (HIN) + * management with provincial validation periods. + * + * The class supports bidirectional synchronization of patient records while maintaining PHI + * (Protected Health Information) compliance. It includes optional photo data transfer for + * patient identification and audit trail fields (lastUpdateUser, lastUpdateDate) for tracking + * data changes across systems. + * + * @see ca.openosp.openo.caisi_integrator.dao.CachedDemographic + * @since 2026-01-24 + */ public class DemographicTransfer implements Serializable { private static final long serialVersionUID = 570194986641348591L; @@ -30,7 +47,15 @@ public class DemographicTransfer implements Serializable private Date photoUpdateDate; private byte[] photo; private boolean removeId; - + + /** + * Default constructor that initializes all fields to null or default values. + * + * Creates a new DemographicTransfer instance with all reference fields set to null, + * numeric fields set to 0, and boolean fields set to false. This constructor is + * typically used when creating a new transfer object before populating it with + * demographic data from a source system. + */ public DemographicTransfer() { this.integratorFacilityId = null; this.caisiDemographicId = 0; @@ -51,187 +76,455 @@ public DemographicTransfer() { this.photo = null; this.removeId = false; } - + + /** + * Gets the integrator facility identifier. + * + * @return Integer the unique identifier of the facility in the integrator system, or null if not set + */ public Integer getIntegratorFacilityId() { return this.integratorFacilityId; } - + + /** + * Sets the integrator facility identifier. + * + * @param integratorFacilityId Integer the unique identifier of the facility in the integrator system + */ public void setIntegratorFacilityId(final Integer integratorFacilityId) { this.integratorFacilityId = integratorFacilityId; } - + + /** + * Gets the CAISI demographic identifier. + * + * @return int the unique demographic identifier in the CAISI system + */ public int getCaisiDemographicId() { return this.caisiDemographicId; } - + + /** + * Sets the CAISI demographic identifier. + * + * @param caisiDemographicId int the unique demographic identifier in the CAISI system + */ public void setCaisiDemographicId(final int caisiDemographicId) { this.caisiDemographicId = caisiDemographicId; } - + + /** + * Gets the CAISI provider identifier. + * + * @return String the unique identifier of the provider in the CAISI system, or null if not set + */ public String getCaisiProviderId() { return this.caisiProviderId; } - + + /** + * Sets the CAISI provider identifier. + * + * @param caisiProviderId String the unique identifier of the provider in the CAISI system + */ public void setCaisiProviderId(final String caisiProviderId) { this.caisiProviderId = caisiProviderId; } - + + /** + * Gets the patient's first name. + * + * @return String the patient's first name, or null if not set + */ public String getFirstName() { return this.firstName; } - + + /** + * Sets the patient's first name. + * + * @param firstName String the patient's first name + */ public void setFirstName(final String firstName) { this.firstName = firstName; } - + + /** + * Gets the patient's last name. + * + * @return String the patient's last name, or null if not set + */ public String getLastName() { return this.lastName; } - + + /** + * Sets the patient's last name. + * + * @param lastName String the patient's last name + */ public void setLastName(final String lastName) { this.lastName = lastName; } - + + /** + * Gets the patient's birth date. + * + * @return Date the patient's birth date, or null if not set + */ public Date getBirthDate() { return this.birthDate; } - + + /** + * Sets the patient's birth date. + * + * @param birthDate Date the patient's birth date + */ public void setBirthDate(final Date birthDate) { this.birthDate = birthDate; } - + + /** + * Gets the patient's gender. + * + * @return CachedDemographic.Gender the patient's gender, or null if not set + */ public CachedDemographic.Gender getGender() { return this.gender; } - + + /** + * Sets the patient's gender. + * + * @param gender CachedDemographic.Gender the patient's gender + */ public void setGender(final CachedDemographic.Gender gender) { this.gender = gender; } - + + /** + * Gets the patient's Health Insurance Number (HIN). + * + * The HIN is the provincial health card number used for billing and patient identification + * in the Canadian healthcare system. Each province has its own format and validation rules. + * + * @return String the patient's Health Insurance Number, or null if not set + */ public String getHin() { return this.hin; } - + + /** + * Sets the patient's Health Insurance Number (HIN). + * + * @param hin String the patient's Health Insurance Number + */ public void setHin(final String hin) { this.hin = hin; } - + + /** + * Gets the HIN version code. + * + * The version code is typically a single character that appears on provincial health cards + * and is used for validation purposes. + * + * @return String the HIN version code, or null if not set + */ public String getHinVersion() { return this.hinVersion; } - + + /** + * Sets the HIN version code. + * + * @param hinVersion String the HIN version code + */ public void setHinVersion(final String hinVersion) { this.hinVersion = hinVersion; } - + + /** + * Gets the patient's Social Insurance Number (SIN). + * + * Note: SIN is sensitive personal information and should be handled with appropriate + * security measures and only collected when legally required. + * + * @return String the patient's Social Insurance Number, or null if not set + */ public String getSin() { return this.sin; } - + + /** + * Sets the patient's Social Insurance Number (SIN). + * + * @param sin String the patient's Social Insurance Number + */ public void setSin(final String sin) { this.sin = sin; } - + + /** + * Gets the patient's province of residence. + * + * This field typically contains a two-letter province code (e.g., ON for Ontario, BC for + * British Columbia) and is used for determining applicable provincial healthcare regulations + * and billing rules. + * + * @return String the patient's province code, or null if not set + */ public String getProvince() { return this.province; } - + + /** + * Sets the patient's province of residence. + * + * @param province String the patient's province code + */ public void setProvince(final String province) { this.province = province; } - + + /** + * Gets the patient's city of residence. + * + * @return String the patient's city, or null if not set + */ public String getCity() { return this.city; } - + + /** + * Sets the patient's city of residence. + * + * @param city String the patient's city + */ public void setCity(final String city) { this.city = city; } - + + /** + * Gets the date when the patient's photo was last updated. + * + * This timestamp is used to determine if a photo needs to be synchronized between + * systems in the integrator network. + * + * @return Date the photo's last update date, or null if no photo or not set + */ public Date getPhotoUpdateDate() { return this.photoUpdateDate; } - + + /** + * Sets the date when the patient's photo was last updated. + * + * @param photoUpdateDate Date the photo's last update date + */ public void setPhotoUpdateDate(final Date photoUpdateDate) { this.photoUpdateDate = photoUpdateDate; } - + + /** + * Gets the patient's photo as a byte array. + * + * The photo is stored in binary format and is used for patient identification purposes. + * This field may be null if no photo is available or if photo transfer is not required. + * + * @return byte[] the patient's photo in binary format, or null if not set + */ public byte[] getPhoto() { return this.photo; } - + + /** + * Sets the patient's photo as a byte array. + * + * @param photo byte[] the patient's photo in binary format + */ public void setPhoto(final byte[] photo) { this.photo = photo; } - + + /** + * Gets the HIN type code. + * + * The HIN type indicates the category of health insurance coverage (e.g., regular coverage, + * out-of-province, refugee coverage) and varies by province. + * + * @return String the HIN type code, or null if not set + */ public String getHinType() { return this.hinType; } - + + /** + * Sets the HIN type code. + * + * @param hinType String the HIN type code + */ public void setHinType(final String hinType) { this.hinType = hinType; } - + + /** + * Gets the flag indicating whether to remove the identifier during transfer. + * + * This flag is used in the integrator system to control whether demographic identifiers + * should be stripped from the transfer object, typically for privacy or security reasons + * when sharing data across different facilities. + * + * @return boolean true if the identifier should be removed, false otherwise + */ public boolean getRemoveId() { return this.removeId; } - + + /** + * Sets the flag indicating whether to remove the identifier during transfer. + * + * @param removeId boolean true to remove the identifier, false to keep it + */ public void setRemoveId(final boolean removeId) { this.removeId = removeId; } - + + /** + * Gets the patient's street address. + * + * @return String the patient's street address, or null if not set + */ public String getStreetAddress() { return this.streetAddress; } - + + /** + * Sets the patient's street address. + * + * @param streetAddress String the patient's street address + */ public void setStreetAddress(final String streetAddress) { this.streetAddress = streetAddress; } - + + /** + * Gets the patient's primary phone number. + * + * @return String the patient's primary phone number, or null if not set + */ public String getPhone1() { return this.phone1; } - + + /** + * Sets the patient's primary phone number. + * + * @param phone1 String the patient's primary phone number + */ public void setPhone1(final String phone1) { this.phone1 = phone1; } - + + /** + * Gets the patient's secondary phone number. + * + * @return String the patient's secondary phone number, or null if not set + */ public String getPhone2() { return this.phone2; } - + + /** + * Sets the patient's secondary phone number. + * + * @param phone2 String the patient's secondary phone number + */ public void setPhone2(final String phone2) { this.phone2 = phone2; } - + + /** + * Gets the start date of the HIN validity period. + * + * Provincial health insurance cards have validity periods defined by start and end dates. + * This date indicates when the health card becomes valid. + * + * @return Date the HIN validity start date, or null if not set + */ public Date getHinValidStart() { return this.hinValidStart; } - + + /** + * Sets the start date of the HIN validity period. + * + * @param hinValidStart Date the HIN validity start date + */ public void setHinValidStart(final Date hinValidStart) { this.hinValidStart = hinValidStart; } - + + /** + * Gets the end date of the HIN validity period. + * + * Provincial health insurance cards have validity periods defined by start and end dates. + * This date indicates when the health card expires and requires renewal. + * + * @return Date the HIN validity end date, or null if not set + */ public Date getHinValidEnd() { return this.hinValidEnd; } - + + /** + * Sets the end date of the HIN validity period. + * + * @param hinValidEnd Date the HIN validity end date + */ public void setHinValidEnd(final Date hinValidEnd) { this.hinValidEnd = hinValidEnd; } - + + /** + * Gets the username of the user who last updated this demographic record. + * + * This field is part of the audit trail and tracks who made the most recent changes + * to the demographic information. + * + * @return String the username of the last updating user, or null if not set + */ public String getLastUpdateUser() { return this.lastUpdateUser; } - + + /** + * Sets the username of the user who last updated this demographic record. + * + * @param lastUpdateUser String the username of the last updating user + */ public void setLastUpdateUser(final String lastUpdateUser) { this.lastUpdateUser = lastUpdateUser; } - + + /** + * Gets the date and time when this demographic record was last updated. + * + * This field is part of the audit trail and provides a timestamp for the most recent + * changes to the demographic information. + * + * @return Date the last update timestamp, or null if not set + */ public Date getLastUpdateDate() { return this.lastUpdateDate; } - + + /** + * Sets the date and time when this demographic record was last updated. + * + * @param lastUpdateDate Date the last update timestamp + */ public void setLastUpdateDate(final Date lastUpdateDate) { this.lastUpdateDate = lastUpdateDate; } diff --git a/src/main/java/ca/openosp/openo/casemgmt/service/CaseManagementPrint.java b/src/main/java/ca/openosp/openo/casemgmt/service/CaseManagementPrint.java index a034fb594d6..b82465d450c 100644 --- a/src/main/java/ca/openosp/openo/casemgmt/service/CaseManagementPrint.java +++ b/src/main/java/ca/openosp/openo/casemgmt/service/CaseManagementPrint.java @@ -1,3 +1,35 @@ +/** + * Case Management Print Service for OpenO EMR. + * + * This service provides comprehensive PDF printing capabilities for patient medical records, + * including encounter notes, clinical prevention profiles (CPP), prescriptions, laboratory results, + * preventions, and allergies. It supports both local and remote (integrator) notes, date range + * filtering, and concatenation of multiple PDF documents into a single output. + * + * The service is used by both classic E-Chart and flat E-Chart interfaces to generate + * printable medical documentation for healthcare providers. All printed documents include + * patient demographics, provider information, and timestamps for audit trail purposes. + * + * Key Features: + *
      + *
    • Multi-section printing: notes, CPP, Rx, labs, preventions, allergies
    • + *
    • Date range filtering for historical data retrieval
    • + *
    • Integration with CAISI Integrator for remote facility notes
    • + *
    • HL7/OLIS laboratory report integration
    • + *
    • Configurable note sorting (ascending/descending by observation date)
    • + *
    • Extension point system for custom print sections
    • + *
    + * + * Security Considerations: + * This service handles Protected Health Information (PHI) and must be called within + * authenticated sessions with appropriate provider privileges. All patient data access + * is logged for audit compliance. + * + * @see CaseManagementPrintPdf + * @see CaseManagementManager + * @see NoteService + * @since 2026-01-24 + */ //CHECKSTYLE:OFF package ca.openosp.openo.casemgmt.service; @@ -65,9 +97,52 @@ public class CaseManagementPrint { private AllergyDao allergyDao = SpringUtils.getBean(AllergyDao.class); - /* - *This method was in CaseManagementEntry2Action but has been moved out so that both the classic Echart and the flat echart can use the same printing method. + /** + * Generates a comprehensive PDF printout of patient medical records. * + * This is the primary entry point for printing patient encounter information. It coordinates + * the retrieval and formatting of multiple data types (notes, CPP, prescriptions, labs, + * preventions, allergies) into a single concatenated PDF document. The method supports both + * selective note printing and date-range filtered printing. + * + * The method performs the following operations: + *
      + *
    1. Resolves note IDs based on print mode (all notes, date range, or specific selection)
    2. + *
    3. Retrieves patient demographic information for header
    4. + *
    5. Fetches local and remote (integrator) notes as applicable
    6. + *
    7. Sorts notes according to system configuration (ascending/descending)
    8. + *
    9. Filters notes by date range if specified
    10. + *
    11. Generates CPP sections if requested (OMeds, SocHistory, MedHistory, etc.)
    12. + *
    13. Retrieves prescription, prevention, and allergy data as requested
    14. + *
    15. Creates individual PDF components for notes, labs, and other sections
    16. + *
    17. Concatenates all PDF components into final output stream
    18. + *
    19. Cleans up temporary files
    20. + *
    + * + * Security Note: This method accesses Protected Health Information (PHI). Ensure the + * LoggedInInfo contains valid provider credentials with appropriate access privileges. + * + * This method was originally in CaseManagementEntry2Action but has been moved to this + * service class to enable code reuse between classic E-Chart and flat E-Chart interfaces. + * + * @param loggedInInfo LoggedInInfo the authenticated session information containing provider and facility context + * @param demographicNo Integer the patient's unique demographic identifier + * @param printAllNotes boolean true to print all available notes, false to use noteIds array + * @param noteIds String[] array of note IDs to print (ignored if printAllNotes is true); may contain + * "UUID" prefixed strings for remote integrator notes + * @param printCPP boolean true to include Clinical Prevention Profile sections (OMeds, SocHistory, etc.) + * @param printRx boolean true to include prescription/medication information + * @param printLabs boolean true to include laboratory results (HL7/OLIS reports) + * @param printPreventions boolean true to include prevention/immunization records + * @param printAllergies boolean true to include patient allergy information + * @param useDateRange boolean true to filter notes by date range (requires startDate and endDate) + * @param startDate Calendar the start date for date range filtering (inclusive); may be null if useDateRange is false + * @param endDate Calendar the end date for date range filtering (inclusive); may be null if useDateRange is false + * @param request HttpServletRequest the servlet request containing session data and parameters + * @param os OutputStream the output stream to write the final concatenated PDF document + * + * @throws IOException if file I/O operations fail during PDF generation or cleanup + * @throws DocumentException if PDF document creation or manipulation fails */ public void doPrint(LoggedInInfo loggedInInfo, Integer demographicNo, boolean printAllNotes, String[] noteIds, boolean printCPP, boolean printRx, boolean printLabs, boolean printPreventions, boolean printAllergies, boolean useDateRange, Calendar startDate, Calendar endDate, HttpServletRequest request, OutputStream os) throws IOException, DocumentException { @@ -355,6 +430,16 @@ public void doPrint(LoggedInInfo loggedInInfo, Integer demographicNo, boolean pr } + /** + * Extracts issue IDs from a list of Issue objects into a String array. + * + * This utility method converts a List of Issue domain objects into an array of + * String representations of their IDs, suitable for passing to DAO methods that + * require issue ID arrays. + * + * @param issues List<Issue> the list of Issue objects to extract IDs from + * @return String[] array of issue IDs as strings, in the same order as the input list + */ public String[] getIssueIds(List issues) { String[] issueIds = new String[issues.size()]; int idx = 0; @@ -365,6 +450,20 @@ public String[] getIssueIds(List issues) { return issueIds; } + /** + * Converts a remote CAISI Integrator note into a local CaseManagementNote for printing. + * + * This method creates a lightweight CaseManagementNote object populated with data from + * a remote facility's cached demographic note. The resulting "faked" note can be processed + * by the standard printing pipeline alongside local notes, enabling seamless integration + * of multi-facility patient records. + * + * Only essential fields (observation date and note content) are copied. Other note metadata + * remains unpopulated as it is not required for basic printing functionality. + * + * @param remoteNote CachedDemographicNote the remote note from the CAISI Integrator system + * @return CaseManagementNote a local note object populated with remote data + */ private CaseManagementNote getFakedNote(CachedDemographicNote remoteNote) { CaseManagementNote note = new CaseManagementNote(); @@ -376,6 +475,24 @@ private CaseManagementNote getFakedNote(CachedDemographicNote remoteNote) { } + /** + * Retrieves all note IDs for a patient within a specified date range. + * + * This method queries the note service with a comprehensive set of filter criteria including + * date range boundaries, program context, and session-based filters (roles, providers, issues). + * It respects the user's current program assignment and applies any active E-Chart view filters + * that may have been set by CaseManagementView2Action. + * + * The method defaults to the "OSCAR" program if the provider has not been assigned to a specific + * program. Only local notes (NoteDisplayLocal) are returned; remote integrator notes are excluded. + * + * @param loggedInInfo LoggedInInfo the authenticated session information + * @param request HttpServletRequest the servlet request containing session attributes and parameters + * @param demoNo String the patient's demographic number as a string + * @param startDate Date the start of the date range (inclusive) + * @param endDate Date the end of the date range (inclusive) + * @return String[] array of note IDs (as strings) matching the criteria + */ @SuppressWarnings("unchecked") private String[] getAllNoteIdsWithinDateRange(LoggedInInfo loggedInInfo, HttpServletRequest request, String demoNo, Date startDate, Date endDate) { @@ -434,6 +551,26 @@ private String[] getAllNoteIdsWithinDateRange(LoggedInInfo loggedInInfo, HttpSer return buf.toArray(new String[0]); } + /** + * Retrieves all note IDs for a patient without date range restrictions. + * + * This method queries the note service with filter criteria based on program context and + * session-based filters (roles, providers, issues), but without date range boundaries. + * It retrieves up to Integer.MAX_VALUE notes and respects the user's current program + * assignment and any active E-Chart view filters. + * + * If no session filters are present (roles, providers, issues), the criteria will have + * empty lists, which signals the note service to return all notes without filtering by + * those dimensions. The method defaults to the "OSCAR" program if the provider has not + * been assigned to a specific program. + * + * Only local notes (NoteDisplayLocal) are returned; remote integrator notes are excluded. + * + * @param loggedInInfo LoggedInInfo the authenticated session information + * @param request HttpServletRequest the servlet request containing session attributes and parameters + * @param demoNo String the patient's demographic number as a string + * @return String[] array of all note IDs (as strings) matching the criteria + */ @SuppressWarnings("unchecked") private String[] getAllNoteIds(LoggedInInfo loggedInInfo, HttpServletRequest request, String demoNo) { @@ -493,6 +630,12 @@ private String[] getAllNoteIds(LoggedInInfo loggedInInfo, HttpServletRequest req } + /** + * Retrieves the patient's full name for the specified demographic number. + * + * @param demoNo String the patient's demographic number + * @return String the patient's full name, or empty string if demoNo is null + */ protected String getDemoName(String demoNo) { if (demoNo == null) { return ""; @@ -500,6 +643,12 @@ protected String getDemoName(String demoNo) { return caseManagementMgr.getDemoName(demoNo); } + /** + * Retrieves the patient's gender/sex for the specified demographic number. + * + * @param demoNo String the patient's demographic number + * @return String the patient's gender code (e.g., "M", "F"), or empty string if demoNo is null + */ protected String getDemoSex(String demoNo) { if (demoNo == null) { return ""; @@ -507,21 +656,51 @@ protected String getDemoSex(String demoNo) { return caseManagementMgr.getDemoGender(demoNo); } + /** + * Retrieves the patient's age for the specified demographic number. + * + * @param demoNo String the patient's demographic number + * @return String the patient's age as a string, or empty string if demoNo is null + */ protected String getDemoAge(String demoNo) { if (demoNo == null) return ""; return caseManagementMgr.getDemoAge(demoNo); } + /** + * Retrieves the patient's date of birth for the specified demographic number. + * + * @param demoNo String the patient's demographic number + * @return String the patient's date of birth in YYYY-MM-DD format, or empty string if demoNo is null + */ protected String getDemoDOB(String demoNo) { if (demoNo == null) return ""; return caseManagementMgr.getDemoDOB(demoNo); } + /** + * Retrieves the patient's Personal Health Number (PHN) for the specified demographic number. + * + * The PHN is the provincial health insurance number (e.g., BC CareCard, Ontario Health Card). + * + * @param demoNo String the patient's demographic number + * @return String the patient's PHN/health card number, or empty string if demoNo is null + */ protected String getDemoPhn(String demoNo) { if (demoNo == null) return ""; return caseManagementMgr.getDemoPhn(demoNo); } + /** + * Retrieves the Most Responsible Provider (MRP) name from the encounter session. + * + * The MRP is the family doctor or primary care provider assigned to the patient. + * This method extracts the provider information from the EctSessionBean and formats + * the full name (first name + surname). + * + * @param request HttpServletRequest the servlet request containing the EctSessionBean in session + * @return String the MRP's full name (first name + surname), or empty string if no MRP is assigned + */ protected String getMRP(HttpServletRequest request) { EctSessionBean bean = (EctSessionBean) request.getSession().getAttribute("EctSessionBean"); if (bean == null) return new String(""); @@ -533,6 +712,17 @@ protected String getMRP(HttpServletRequest request) { return name; } + /** + * Converts a date string from YYYY-MM-DD format to DD-MMM-YYYY format. + * + * This method reformats dates for human-readable display on printed documents, + * using the locale from the HTTP request to ensure proper month name localization. + * For example, "2024-03-15" becomes "15-Mar-2024" in English locale. + * + * @param strOldDate String the date in YYYY-MM-DD format + * @param request HttpServletRequest the servlet request providing locale information + * @return String the reformatted date in DD-MMM-YYYY format, or empty string if input is null/empty or parsing fails + */ protected String convertDateFmt(String strOldDate, HttpServletRequest request) { String strNewDate = new String(); if (strOldDate != null && strOldDate.length() > 0) { diff --git a/src/main/java/ca/openosp/openo/commn/dao/DrugDao.java b/src/main/java/ca/openosp/openo/commn/dao/DrugDao.java index 38193a73637..d9ac52fe183 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/DrugDao.java +++ b/src/main/java/ca/openosp/openo/commn/dao/DrugDao.java @@ -62,7 +62,7 @@ public int getNumberOfDemographicsWithRxForProvider(String providerNo, Date star public int getMaxPosition(int demographicNo); public Drug findByEverything(String providerNo, int demographicNo, Date rxDate, Date endDate, Date writtenDate, - String brandName, int gcn_SEQNO, String customName, float takeMin, float takeMax, String frequencyCode, + String brandName, String gcn_SEQNO, String customName, float takeMin, float takeMax, String frequencyCode, String duration, String durationUnit, String quantity, String unitName, int repeat, Date lastRefillDate, boolean nosubs, boolean prn, String escapedSpecial, String outsideProviderName, String outsideProviderOhip, boolean customInstr, Boolean longTerm, boolean customNote, Boolean pastMed, diff --git a/src/main/java/ca/openosp/openo/commn/dao/DrugDaoImpl.java b/src/main/java/ca/openosp/openo/commn/dao/DrugDaoImpl.java index 1d440dbcbb8..9f3e0f4c725 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/DrugDaoImpl.java +++ b/src/main/java/ca/openosp/openo/commn/dao/DrugDaoImpl.java @@ -392,7 +392,7 @@ public int getMaxPosition(int demographicNo) { @Override public Drug findByEverything(String providerNo, int demographicNo, Date rxDate, Date endDate, Date writtenDate, - String brandName, int gcn_SEQNO, String customName, float takeMin, float takeMax, String frequencyCode, + String brandName, String gcn_SEQNO, String customName, float takeMin, float takeMax, String frequencyCode, String duration, String durationUnit, String quantity, String unitName, int repeat, Date lastRefillDate, boolean nosubs, boolean prn, String escapedSpecial, String outsideProviderName, String outsideProviderOhip, boolean customInstr, Boolean longTerm, boolean customNote, Boolean pastMed, diff --git a/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDao.java b/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDao.java index 2ff6c4ed4f9..236650dbc33 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDao.java +++ b/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDao.java @@ -5,7 +5,49 @@ import java.util.Date; - +/** + * Data Access Object (DAO) interface for managing electronic referral attachments in OpenO EMR. + * + *

    This DAO provides database operations for {@link EReferAttachment} entities, which represent + * file attachments associated with electronic referrals (eReferrals) for patient demographics. + * eReferral attachments support the healthcare workflow by allowing providers to attach supporting + * documentation (medical images, lab results, consultation notes) to electronic referral requests + * sent to specialists or other healthcare providers.

    + * + *

    Key features:

    + *
      + *
    • Retrieval of recent attachments by patient demographic number
    • + *
    • Expiry-based filtering for attachment lifecycle management
    • + *
    • Support for archived attachments to maintain data retention compliance
    • + *
    + * + *

    This interface extends {@link AbstractDao} to inherit standard CRUD operations + * (create, read, update, delete) while providing specialized query methods for + * eReferral attachment management.

    + * + * @since 2026-01-24 + * @see EReferAttachment + * @see EReferAttachmentDaoImpl + * @see ca.openosp.openo.commn.model.EReferAttachmentData + */ public interface EReferAttachmentDao extends AbstractDao { + /** + * Retrieves the most recent electronic referral attachment for a specific patient + * that has not expired. + * + *

    This method queries for the latest {@link EReferAttachment} associated with + * the given demographic number where the creation date is after the specified expiry + * date. This supports workflows where attachments have a limited retention period + * or need to be refreshed periodically for active referral processes.

    + * + *

    The method considers only non-archived attachments to ensure that historical + * or deleted attachments are not returned in active referral workflows.

    + * + * @param demographicNo Integer the unique identifier for the patient demographic record + * @param expiry Date the cutoff date for attachment validity; attachments created before + * this date are considered expired and will not be returned + * @return EReferAttachment the most recent non-expired attachment for the patient, + * or {@code null} if no valid attachment exists + */ public EReferAttachment getRecentByDemographic(Integer demographicNo, Date expiry); } diff --git a/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDaoImpl.java b/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDaoImpl.java index d6e391c25d5..5a00a779c8b 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDaoImpl.java +++ b/src/main/java/ca/openosp/openo/commn/dao/EReferAttachmentDaoImpl.java @@ -9,12 +9,67 @@ import java.util.Date; import java.util.List; +/** + * Data Access Object implementation for managing EReferAttachment entities in the OpenO EMR system. + *

    + * This DAO provides database operations for electronic referral (eReferral) attachments associated with + * patient demographics. eReferral attachments are documents, images, or other files that healthcare + * providers attach to electronic referrals when sending patient information to specialists or other + * healthcare facilities. + *

    + *

    + * The implementation extends {@link AbstractDaoImpl} to inherit common CRUD operations and implements + * {@link EReferAttachmentDao} to provide specialized queries for attachment management, including + * retrieval of recent non-archived attachments within a specified time period. + *

    + *

    + * This DAO supports the eReferral workflow by managing attachment metadata and lazy-loading associated + * attachment data to optimize performance when handling large files. + *

    + * + * @see EReferAttachment + * @see EReferAttachmentDao + * @see AbstractDaoImpl + * @since 2026-01-23 + */ @Repository public class EReferAttachmentDaoImpl extends AbstractDaoImpl implements EReferAttachmentDao { + + /** + * Constructs a new EReferAttachmentDaoImpl. + *

    + * Initializes the DAO with the EReferAttachment entity class type for generic operations. + *

    + */ public EReferAttachmentDaoImpl() { super(EReferAttachment.class); } + /** + * Retrieves the most recent non-archived eReferral attachment for a specific patient demographic + * created after a specified expiry date. + *

    + * This method queries for eReferral attachments that meet the following criteria: + *

      + *
    • Not archived (archived = false)
    • + *
    • Belongs to the specified demographic number (patient)
    • + *
    • Created after the specified expiry date
    • + *
    + * If multiple attachments match the criteria, only the first result is returned. The method also + * eagerly initializes the associated attachment data collection to prevent lazy loading exceptions + * when the attachment data is accessed outside the persistence context. + *

    + *

    + * This is commonly used in eReferral workflows to determine if a patient has recent attachments + * that are still valid (not expired) and can be reused for a new referral, avoiding duplicate + * document uploads. + *

    + * + * @param demographicNo Integer the unique identifier of the patient demographic + * @param expiry Date the cutoff date; only attachments created after this date are considered + * @return EReferAttachment the most recent matching attachment with initialized attachment data, + * or null if no matching attachments are found + */ @Override public EReferAttachment getRecentByDemographic(Integer demographicNo, Date expiry) { EReferAttachment eReferAttachment = null; diff --git a/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDao.java b/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDao.java index 575847140c2..cac6897ee5c 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDao.java +++ b/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDao.java @@ -6,9 +6,45 @@ import java.util.Collections; import java.util.List; +/** + * Data Access Object for managing EmailConfig entities in the OpenO EMR system. + * + *

    This DAO provides methods to retrieve and manage email configuration settings + * used for sending email notifications and communications within the healthcare system. + * Email configurations support multiple providers (Gmail, Outlook, SendGrid, Local) and + * types (SMTP, API) to accommodate various healthcare facility requirements.

    + * + *

    The DAO focuses on active email configurations to ensure the system uses only + * currently valid and operational email settings for patient communications, appointment + * reminders, and other healthcare-related notifications.

    + * + * @see EmailConfig + * @see ca.openosp.openo.commn.model.EmailLog + * @since 2026-01-24 + */ public interface EmailConfigDao extends AbstractDao { + /** + * Finds an active email configuration matching the properties of the provided EmailConfig object. + * + *

    This method searches for an active configuration that matches the attributes of the + * given EmailConfig entity. It is typically used to verify if a configuration with specific + * properties already exists in the system before creating a new one.

    + * + * @param emailConfig EmailConfig the email configuration object containing the search criteria + * @return EmailConfig the matching active email configuration, or null if no match is found + */ public EmailConfig findActiveEmailConfig(EmailConfig emailConfig); + /** + * Finds an active email configuration by sender email address. + * + *

    This method retrieves the active email configuration associated with a specific + * sender email address. This is useful for determining which email settings to use + * when sending notifications from a particular email account or healthcare provider.

    + * + * @param senderEmail String the sender email address to search for + * @return EmailConfig the active email configuration for the specified sender email, or null if not found + */ public EmailConfig findActiveEmailConfig(String senderEmail); /** @@ -19,6 +55,17 @@ public interface EmailConfigDao extends AbstractDao { */ public EmailConfig findActiveEmailConfigById(int id); + /** + * Retrieves all active email configurations in the system. + * + *

    This method returns a list of all currently active email configurations available + * for use in the healthcare system. Active configurations are those marked with the + * active flag set to true and can be used for sending emails. This is typically used + * for administrative interfaces or when selecting an email configuration for sending + * notifications.

    + * + * @return List<EmailConfig> list of all active email configurations, or an empty list if none exist + */ @SuppressWarnings("unchecked") public List fillAllActiveEmailConfigs(); } diff --git a/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDaoImpl.java b/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDaoImpl.java index 674485b39f3..ddd572a563e 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDaoImpl.java +++ b/src/main/java/ca/openosp/openo/commn/dao/EmailConfigDaoImpl.java @@ -10,12 +10,55 @@ import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; +/** + * Data Access Object implementation for managing email configuration entities in the OpenO EMR system. + * + *

    This DAO provides persistence operations for email configurations used throughout the healthcare + * system, including SMTP settings, sender credentials, and email provider configurations. Email + * configurations are used for clinical notifications, appointment reminders, lab result notifications, + * and other healthcare communication workflows.

    + * + *

    The implementation supports multiple active email configurations to enable different email + * providers and sender addresses for various clinical workflows and departments within a healthcare + * facility.

    + * + *

    Security Considerations: Email configurations contain sensitive authentication + * credentials and must be handled according to PHI protection standards. Access to email configuration + * data should be restricted to authorized system administrators.

    + * + * @see EmailConfigDao + * @see EmailConfig + * @see AbstractDaoImpl + * @since 2026-01-23 + */ @Repository public class EmailConfigDaoImpl extends AbstractDaoImpl implements EmailConfigDao { + + /** + * Constructs a new EmailConfigDaoImpl instance. + * + *

    Initializes the parent AbstractDaoImpl with the EmailConfig entity class to enable + * generic persistence operations for email configuration entities.

    + */ public EmailConfigDaoImpl() { super(EmailConfig.class); } + /** + * Finds an active email configuration matching the specified criteria. + * + *

    Searches for an active email configuration that matches the sender email, email type, + * and email provider from the provided EmailConfig object. This method is used when multiple + * criteria need to be satisfied to identify a specific email configuration.

    + * + *

    Note: The current query implementation appears to have a potential issue + * where it compares e.emailType twice (parameters 2 and 3) instead of comparing e.emailProvider + * for parameter 3. This is documented as-is and should be reviewed separately.

    + * + * @param emailConfig EmailConfig the email configuration object containing search criteria + * (senderEmail, emailType, emailProvider) + * @return EmailConfig the matching active email configuration, or null if no match is found + */ @Transactional public EmailConfig findActiveEmailConfig(EmailConfig emailConfig) { Query query = entityManager.createQuery("SELECT e FROM EmailConfig e WHERE e.senderEmail = ?1 AND e.emailType = ?2 AND e.emailProvider = ?3 AND e.active = true"); @@ -27,6 +70,20 @@ public EmailConfig findActiveEmailConfig(EmailConfig emailConfig) { return getSingleResultOrNull(query); } + /** + * Finds an active email configuration by sender email address. + * + *

    Retrieves the active email configuration associated with the specified sender email address. + * This is a simplified lookup method used when only the sender email is known and other criteria + * (email type, provider) are not required for the search.

    + * + *

    This method is commonly used for validating outbound email configurations and retrieving + * SMTP credentials for sending clinical notifications, appointment reminders, and other healthcare + * communications.

    + * + * @param senderEmail String the sender email address to search for + * @return EmailConfig the matching active email configuration, or null if no match is found + */ public EmailConfig findActiveEmailConfig(String senderEmail) { Query query = entityManager.createQuery("SELECT e FROM EmailConfig e WHERE e.senderEmail = ?1 AND e.active = true"); query.setParameter(1, senderEmail); @@ -50,6 +107,25 @@ public EmailConfig findActiveEmailConfigById(int id) { return getSingleResultOrNull(query); } + /** + * Retrieves all active email configurations in the system. + * + *

    Returns a list of all email configurations that are currently marked as active. This method + * is used for administrative purposes to display all available email configurations, and for + * system processes that need to iterate through all active email providers.

    + * + *

    The method ensures a non-null return value by returning an empty list if no active + * configurations are found, preventing NullPointerException in calling code.

    + * + *

    Use Cases:

    + *
      + *
    • Administrative interfaces for managing email configurations
    • + *
    • System health checks to verify available email providers
    • + *
    • Batch processing workflows that need to send emails through multiple providers
    • + *
    + * + * @return List<EmailConfig> list of all active email configurations, or an empty list if none exist + */ @SuppressWarnings("unchecked") public List fillAllActiveEmailConfigs() { Query query = entityManager.createQuery("SELECT e FROM EmailConfig e WHERE e.active = true"); diff --git a/src/main/java/ca/openosp/openo/commn/dao/EmailLogDao.java b/src/main/java/ca/openosp/openo/commn/dao/EmailLogDao.java index 74a3073fee0..069e4f0db3a 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/EmailLogDao.java +++ b/src/main/java/ca/openosp/openo/commn/dao/EmailLogDao.java @@ -6,7 +6,86 @@ import java.util.Date; import java.util.List; +/** + * Data Access Object for managing email log records in OpenO EMR. + *

    + * This DAO provides operations for tracking outbound email communications sent from the EMR system, + * including patient notifications, consultation requests, eForm submissions, and tickler alerts. + * Email logs maintain audit trails for compliance with healthcare privacy regulations (PIPEDA/HIPAA) + * and support troubleshooting email delivery issues. + *

    + *

    + * Email logs track: + *

      + *
    • Email delivery status (SUCCESS, FAILED, RESOLVED)
    • + *
    • Transaction context (EFORM, CONSULTATION, TICKLER, DIRECT)
    • + *
    • Associated patient demographics and healthcare provider
    • + *
    • Encryption status for PHI-containing emails
    • + *
    • Error messages for failed delivery attempts
    • + *
    + *

    + *

    + * This interface extends {@link AbstractDao} to inherit standard CRUD operations and adds + * specialized query methods for email status tracking and reporting. + *

    + * + * @see EmailLog + * @see AbstractDao + * @see ca.openosp.openo.commn.model.EmailLog.EmailStatus + * @see ca.openosp.openo.commn.model.EmailLog.TransactionType + * @since 2026-01-23 + */ public interface EmailLogDao extends AbstractDao { + + /** + * Retrieves email log records filtered by date range, patient, sender, and delivery status. + *

    + * This method supports comprehensive email audit queries for healthcare compliance and troubleshooting. + * All parameters are optional (nullable) to allow flexible filtering. Passing null for a parameter + * excludes that criterion from the query. + *

    + *

    + * Common use cases: + *

      + *
    • Audit all emails sent to a specific patient within a date range
    • + *
    • Find failed email deliveries for troubleshooting
    • + *
    • Track emails sent from a specific provider's email address
    • + *
    • Generate compliance reports for email communications
    • + *
    + *

    + * + * @param dateBegin Date the start of the date range filter (inclusive); null to ignore start date + * @param dateEnd Date the end of the date range filter (inclusive); null to ignore end date + * @param demographicNo String the patient demographic number to filter by; null to include all patients + * @param senderEmailAddress String the sender's email address to filter by; null to include all senders + * @param emailStatus String the delivery status to filter by (SUCCESS, FAILED, RESOLVED); null to include all statuses + * @return List<EmailLog> list of email log records matching the specified criteria, ordered by timestamp + */ public List getEmailStatusByDateDemographicSenderStatus(Date dateBegin, Date dateEnd, String demographicNo, String senderEmailAddress, String emailStatus); + + /** + * Updates the delivery status and error information for an email log record. + *

    + * This method is used by email sending services to update the status of email delivery attempts. + * It supports tracking both successful deliveries and failed attempts with error diagnostics. + * For failed emails, the errorMessage parameter should contain specific SMTP error codes or + * exception messages to aid in troubleshooting. + *

    + *

    + * Typical workflow: + *

      + *
    1. Email log created with initial status (typically FAILED for new records)
    2. + *
    3. Email sending service attempts delivery
    4. + *
    5. This method updates status to SUCCESS or maintains FAILED with error details
    6. + *
    7. Status may be updated to RESOLVED when issues are addressed
    8. + *
    + *

    + * + * @param id Integer the unique identifier of the email log record to update + * @param status EmailLog.EmailStatus the new delivery status (SUCCESS, FAILED, or RESOLVED) + * @param errorMessage String the error message for failed deliveries; null for successful deliveries + * @param timestamp Date the timestamp of the status update; typically the current time + * @return int the number of records updated (should be 1 for successful update, 0 if ID not found) + */ public int updateEmailStatus(Integer id, EmailLog.EmailStatus status, String errorMessage, Date timestamp); } diff --git a/src/main/java/ca/openosp/openo/commn/dao/EmailLogDaoImpl.java b/src/main/java/ca/openosp/openo/commn/dao/EmailLogDaoImpl.java index 8a4564dd155..a70bcc4c67a 100644 --- a/src/main/java/ca/openosp/openo/commn/dao/EmailLogDaoImpl.java +++ b/src/main/java/ca/openosp/openo/commn/dao/EmailLogDaoImpl.java @@ -10,23 +10,77 @@ import ca.openosp.openo.commn.model.EmailLog; +/** + * Data Access Object implementation for managing EmailLog entities in the OpenO EMR system. + * + *

    This DAO provides database operations for email communication logs within the healthcare context, + * supporting patient-provider communication tracking, audit trails, and email status management. + * Email logs capture critical metadata about communications including sender, recipient, status, + * encryption details, and transaction context (e-forms, consultations, ticklers, or direct emails).

    + * + *

    Key features include:

    + *
      + *
    • Advanced filtering of email logs by date range, demographic, sender, and status
    • + *
    • Efficient status updates without loading Large Object (LOB) fields
    • + *
    • Support for encrypted patient communications with PHI protection
    • + *
    • Integration with EmailConfig, Demographic, and Provider entities
    • + *
    • Comprehensive audit tracking for healthcare compliance (HIPAA/PIPEDA)
    • + *
    + * + *

    This implementation is used primarily from the Admin > Emails > Manage Emails interface + * to provide administrators with visibility into email communication history and troubleshooting + * capabilities for failed email deliveries.

    + * + * @see EmailLog + * @see EmailLogDao + * @see ca.openosp.openo.commn.model.EmailConfig + * @see ca.openosp.openo.commn.model.Demographic + * @see ca.openosp.openo.commn.model.Provider + * @since 2026-01-24 + */ @Repository public class EmailLogDaoImpl extends AbstractDaoImpl implements EmailLogDao { + /** + * Constructs a new EmailLogDaoImpl with the EmailLog entity class. + * + *

    This constructor initializes the AbstractDaoImpl superclass with the EmailLog + * entity type, enabling standard CRUD operations and custom query methods for + * email log management.

    + */ public EmailLogDaoImpl() { super(EmailLog.class); } /** - * This method is used for retrieving email logs based on various filters such as date range, demographic number, - * sender email address, and email status. It is called from the 'Admin > Emails > Manage Emails' page. + * Retrieves email logs based on multiple filter criteria including date range, demographic, + * sender email address, and email status. + * + *

    This method executes a complex JPQL query joining EmailLog with related entities + * (EmailConfig, Demographic, Provider) to provide comprehensive filtering capabilities. + * Filter parameters use IFNULL semantics, meaning null values are treated as wildcards + * that match all records for that criterion.

    + * + *

    Primary use case: Administrative email management interface at + * 'Admin > Emails > Manage Emails' for troubleshooting failed deliveries, + * auditing patient communications, and tracking email history by provider or patient.

    * - * @param dateBegin The start date for filtering email logs. - * @param dateEnd The end date for filtering email logs. - * @param demographicNo The demographic number for demographic lastname and firstname. - * @param senderEmailAddress The sender email address for filtering email logs. - * @param emailStatus The email status for filtering email logs. - * @return A list of email logs that match the specified filters. + *

    Query behavior:

    + *
      + *
    • Date filtering: Matches DATE portion only (time component ignored)
    • + *
    • Demographic filtering: Uses DemographicNo for patient identification
    • + *
    • Status filtering: Matches EmailStatus enum (SUCCESS, FAILED, RESOLVED)
    • + *
    • Sender filtering: Matches fromEmail field exactly
    • + *
    • Results ordered by timestamp descending (newest first)
    • + *
    + * + * @param dateBegin Date the start date for filtering email logs (required, matches DATE portion only) + * @param dateEnd Date the end date for filtering email logs (required, matches DATE portion only) + * @param demographicNo String the demographic number for filtering by patient (null matches all) + * @param senderEmailAddress String the sender email address for filtering (null matches all) + * @param emailStatus String the email status for filtering (SUCCESS/FAILED/RESOLVED, null matches all) + * @return List<EmailLog> list of email logs matching the specified filters, ordered by timestamp descending; + * empty list if no matches found */ @Override @SuppressWarnings("unchecked") @@ -50,13 +104,32 @@ public List getEmailStatusByDateDemographicSenderStatus(Date dateBegin } /** - * Updates only the status, errorMessage, and timestamp of EmailLog without touching LOB fields. + * Updates the status, error message, and timestamp of an email log without loading or modifying + * Large Object (LOB) fields. + * + *

    This method provides an optimized update operation that avoids loading large binary fields + * (email body, encrypted message, internal comments, attachments) into memory. This is critical + * for performance when processing email status changes in bulk or when email bodies contain + * large amounts of PHI (Protected Health Information).

    + * + *

    The update executes directly via JPQL UPDATE statement, bypassing the entity lifecycle + * and avoiding LOB field hydration. This makes it suitable for:

    + *
      + *
    • Batch status updates after email processing jobs
    • + *
    • Error recording for failed email deliveries
    • + *
    • Status transitions (e.g., FAILED to RESOLVED after manual intervention)
    • + *
    • Timestamp corrections for audit purposes
    • + *
    + * + *

    Important: Setting errorMessage to {@code null} will explicitly clear + * any existing error message in the database (setting the column to NULL). This is useful + * when resolving previously failed emails.

    * - * @param id The ID of the EmailLog to update. - * @param status The new status to set. - * @param errorMessage The error message to set. If {@code null}, the existing error message will be cleared (set to {@code null}). - * @param timestamp The timestamp to set. - * @return The number of rows updated (should be 1 if the record exists). + * @param id Integer the unique identifier of the EmailLog record to update + * @param status EmailLog.EmailStatus the new email status (SUCCESS, FAILED, or RESOLVED) + * @param errorMessage String the error message to record, or {@code null} to clear existing error message + * @param timestamp Date the timestamp to set, typically current time or email processing time + * @return int the number of database rows updated (1 if record exists and was updated, 0 if not found) */ @Override public int updateEmailStatus(Integer id, EmailLog.EmailStatus status, String errorMessage, Date timestamp) { diff --git a/src/main/java/ca/openosp/openo/commn/model/Demographic.java b/src/main/java/ca/openosp/openo/commn/model/Demographic.java index 80bc5771028..926967d2b32 100644 --- a/src/main/java/ca/openosp/openo/commn/model/Demographic.java +++ b/src/main/java/ca/openosp/openo/commn/model/Demographic.java @@ -23,7 +23,7 @@ package ca.openosp.openo.commn.model; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import ca.openosp.openo.PMmodule.utility.DateTimeFormatUtils; @@ -32,7 +32,6 @@ import org.owasp.encoder.Encode; import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; @@ -195,10 +194,8 @@ public Demographic() { public Demographic(Demographic d) { try { - BeanUtils.copyProperties(this, d); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { + BeanUtils.copyProperties(d, this); + } catch (Exception e) { throw new RuntimeException(e); } } diff --git a/src/main/java/ca/openosp/openo/commn/model/EmailLog.java b/src/main/java/ca/openosp/openo/commn/model/EmailLog.java index 22efd2c1000..83ff7567bb2 100644 --- a/src/main/java/ca/openosp/openo/commn/model/EmailLog.java +++ b/src/main/java/ca/openosp/openo/commn/model/EmailLog.java @@ -10,18 +10,61 @@ import java.util.Date; import java.util.List; +/** + * Entity representing an email communication log in the healthcare system. + * + *

    This class tracks all email communications sent through the OpenO EMR system, + * including clinical communications, patient correspondence, consultation requests, + * and other healthcare-related notifications. It provides comprehensive audit trail + * capabilities for regulatory compliance (HIPAA/PIPEDA) and supports encrypted + * messaging for protected health information (PHI).

    + * + *

    Key features:

    + *
      + *
    • Base64-encoded storage of email body and encrypted messages for security
    • + *
    • Support for multiple transaction types (eForm, consultation, tickler, direct)
    • + *
    • Attachment management with encryption support
    • + *
    • Status tracking (success, failed, resolved) for delivery monitoring
    • + *
    • Patient and provider associations for clinical context
    • + *
    • Chart display options for clinical note integration
    • + *
    • Password-protected encrypted messages with password clues
    • + *
    + * + *

    The email body and encrypted messages are stored as Base64-encoded byte arrays + * to ensure proper handling of special characters and to maintain data integrity + * across different character encodings.

    + * + * @see EmailConfig Email configuration settings for SMTP/API providers + * @see EmailAttachment File attachments associated with email logs + * @see Demographic Patient demographic information + * @see Provider Healthcare provider information + * @since 2026-01-14 + */ @Entity @Table(name = "emailLog") public class EmailLog extends AbstractModel implements Comparable { + /** + * Enumeration of possible email delivery statuses. + * Used for tracking the lifecycle and delivery state of email communications. + */ public enum EmailStatus { + /** Email was successfully sent and delivered */ SUCCESS, + /** Email failed to send due to an error */ FAILED, + /** Previously failed email was successfully resent or issue resolved */ RESOLVED } + /** + * Enumeration defining how email content should be displayed in patient charts. + * Controls integration of email correspondence into clinical documentation. + */ public enum ChartDisplayOption { + /** Do not add email content as a clinical note in the patient chart */ WITHOUT_NOTE("doNotAddAsNote"), + /** Add the complete email content as a clinical note in the patient chart */ WITH_FULL_NOTE("addFullNote"); private final String value; @@ -30,15 +73,28 @@ public enum ChartDisplayOption { this.value = value; } + /** + * Gets the string value associated with this chart display option. + * + * @return String the configuration value for this display option + */ public String getValue() { return value; } } + /** + * Enumeration of transaction types that can generate email communications. + * Identifies the source workflow or feature that initiated the email. + */ public enum TransactionType { + /** Email originated from an electronic form (eForm) submission */ EFORM, + /** Email related to a consultation request or referral */ CONSULTATION, + /** Email generated from a tickler or reminder notification */ TICKLER, + /** Direct email communication not tied to a specific transaction type */ DIRECT } @@ -103,9 +159,23 @@ public enum TransactionType { @OneToMany(mappedBy = "emailLog", fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private List emailAttachments; + /** + * Default constructor for JPA entity instantiation. + */ public EmailLog() { } + /** + * Constructs a new EmailLog with essential email details. + * The email body is automatically Base64-encoded for secure storage. + * + * @param emailConfig EmailConfig the email configuration used to send this email + * @param fromEmail String the sender's email address + * @param toEmail String[] array of recipient email addresses + * @param subject String the email subject line + * @param body String the email message body (will be Base64-encoded) + * @param status EmailStatus the initial delivery status of the email + */ public EmailLog(EmailConfig emailConfig, String fromEmail, String[] toEmail, String subject, String body, EmailStatus status) { this.emailConfig = emailConfig; this.fromEmail = fromEmail; @@ -116,170 +186,397 @@ public EmailLog(EmailConfig emailConfig, String fromEmail, String[] toEmail, Str this.timestamp = new Date(); } + /** + * Gets the unique identifier for this email log entry. + * + * @return Integer the email log ID + */ public Integer getId() { return id; } + /** + * Gets the email configuration used to send this email. + * + * @return EmailConfig the email configuration containing SMTP/API settings + */ public EmailConfig getEmailConfig() { return emailConfig; } + /** + * Sets the email configuration for this email log. + * + * @param emailConfig EmailConfig the email configuration to associate with this log + */ public void setEmailConfig(EmailConfig emailConfig) { this.emailConfig = emailConfig; } + /** + * Gets the sender's email address. + * + * @return String the from email address + */ public String getFromEmail() { return fromEmail; } + /** + * Sets the sender's email address. + * + * @param fromEmail String the from email address + */ public void setFromEmail(String fromEmail) { this.fromEmail = fromEmail; } + /** + * Gets the recipient email addresses as an array. + * Multiple recipients are stored internally as semicolon-separated values + * and returned as an array. + * + * @return String[] array of recipient email addresses + */ public String[] getToEmail() { return toEmail.split(";"); } + /** + * Sets the recipient email addresses. + * Multiple recipients are joined with semicolons for storage. + * + * @param toEmail String[] array of recipient email addresses + */ public void setToEmail(String[] toEmail) { this.toEmail = toEmail != null ? String.join(";", toEmail) : ""; } + /** + * Gets the email subject line. + * + * @return String the email subject + */ public String getSubject() { return subject; } + /** + * Sets the email subject line. + * + * @param subject String the email subject + */ public void setSubject(String subject) { this.subject = subject; } + /** + * Gets the email body content. + * The body is stored as Base64-encoded bytes and automatically decoded when retrieved. + * + * @return String the decoded email body content + */ public String getBody() { return new String(Base64.decodeBase64(body), StandardCharsets.UTF_8); } + /** + * Sets the email body content. + * The body is automatically Base64-encoded before storage. + * + * @param body String the email body content to encode and store + */ public void setBody(String body) { this.body = Base64.encodeBase64(body.getBytes(StandardCharsets.UTF_8)); } + /** + * Gets the current delivery status of the email. + * + * @return EmailStatus the email delivery status (SUCCESS, FAILED, or RESOLVED) + */ public EmailStatus getStatus() { return status; } + /** + * Sets the delivery status of the email. + * + * @param status EmailStatus the email delivery status + */ public void setStatus(EmailStatus status) { this.status = status; } + /** + * Gets the error message if the email failed to send. + * + * @return String the error message, or null if no error occurred + */ public String getErrorMessage() { return errorMessage; } + /** + * Sets the error message for failed email delivery. + * + * @param errorMessage String the error message describing the failure + */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } + /** + * Gets the timestamp when this email log entry was created. + * + * @return Date the creation timestamp + */ public Date getTimestamp() { return timestamp; } + /** + * Sets the timestamp for this email log entry. + * + * @param timestamp Date the timestamp to set + */ public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } + /** + * Gets the encrypted message content. + * The encrypted message is stored as Base64-encoded bytes and automatically decoded. + * + * @return String the decoded encrypted message content + */ public String getEncryptedMessage() { return new String(Base64.decodeBase64(encryptedMessage), StandardCharsets.UTF_8); } + /** + * Sets the encrypted message content. + * The message is automatically Base64-encoded before storage. + * + * @param encryptedMessage String the encrypted message content to encode and store + */ public void setEncryptedMessage(String encryptedMessage) { this.encryptedMessage = Base64.encodeBase64(encryptedMessage.getBytes(StandardCharsets.UTF_8)); } + /** + * Gets the password used for message encryption. + * + * @return String the encryption password + */ public String getPassword() { return password; } + /** + * Sets the password for message encryption. + * + * @param password String the password to use for encryption + */ public void setPassword(String password) { this.password = password; } + /** + * Gets the password hint/clue for encrypted messages. + * Helps recipients remember the password without storing it directly. + * + * @return String the password clue + */ public String getPasswordClue() { return passwordClue; } + /** + * Sets the password hint/clue for encrypted messages. + * + * @param passwordClue String the password clue to help recipients + */ public void setPasswordClue(String passwordClue) { this.passwordClue = passwordClue; } + /** + * Checks if the email message is encrypted. + * + * @return boolean true if the message content is encrypted, false otherwise + */ public boolean getIsEncrypted() { return isEncrypted; } + /** + * Sets whether the email message is encrypted. + * + * @param isEncrypted boolean true to mark the message as encrypted + */ public void setIsEncrypted(boolean isEncrypted) { this.isEncrypted = isEncrypted; } + /** + * Checks if email attachments are encrypted. + * + * @return boolean true if attachments are encrypted, false otherwise + */ public boolean getIsAttachmentEncrypted() { return isAttachmentEncrypted; } + /** + * Sets whether email attachments are encrypted. + * + * @param isAttachmentEncrypted boolean true to mark attachments as encrypted + */ public void setIsAttachmentEncrypted(boolean isAttachmentEncrypted) { this.isAttachmentEncrypted = isAttachmentEncrypted; } + /** + * Gets the chart display option for this email. + * Determines how/if this email should be added to the patient's clinical chart. + * + * @return ChartDisplayOption the chart display setting + */ public ChartDisplayOption getChartDisplayOption() { return chartDisplayOption; } + /** + * Sets the chart display option for this email. + * + * @param chartDisplayOption ChartDisplayOption the chart display setting + */ public void setChartDisplayOption(ChartDisplayOption chartDisplayOption) { this.chartDisplayOption = chartDisplayOption; } + /** + * Gets the internal comment for this email log. + * Internal comments are stored as Base64-encoded bytes and automatically decoded. + * Used for staff notes that are not part of the clinical record. + * + * @return String the decoded internal comment + */ public String getInternalComment() { return new String(Base64.decodeBase64(internalComment), StandardCharsets.UTF_8); } + /** + * Sets the internal comment for this email log. + * The comment is automatically Base64-encoded before storage. + * + * @param internalComment String the internal comment to encode and store + */ public void setInternalComment(String internalComment) { this.internalComment = Base64.encodeBase64(internalComment.getBytes(StandardCharsets.UTF_8)); } + /** + * Gets the transaction type that generated this email. + * + * @return TransactionType the source transaction type (EFORM, CONSULTATION, TICKLER, or DIRECT) + */ public TransactionType getTransactionType() { return transactionType; } + /** + * Sets the transaction type that generated this email. + * + * @param transactionType TransactionType the source transaction type + */ public void setTransactionType(TransactionType transactionType) { this.transactionType = transactionType; } + /** + * Gets the patient demographic associated with this email. + * Links the email to a specific patient record when applicable. + * + * @return Demographic the patient demographic record, or null if not patient-specific + */ public Demographic getDemographic() { return demographic; } + /** + * Sets the patient demographic associated with this email. + * + * @param demographic Demographic the patient demographic record + */ public void setDemographic(Demographic demographic) { this.demographic = demographic; } + /** + * Gets the healthcare provider associated with this email. + * Identifies the provider who sent or is responsible for the email. + * + * @return Provider the healthcare provider record, or null if not provider-specific + */ public Provider getProvider() { return provider; } + /** + * Sets the healthcare provider associated with this email. + * + * @param provider Provider the healthcare provider record + */ public void setProvider(Provider provider) { this.provider = provider; } + /** + * Gets additional parameters as a string. + * Used for storing transaction-type-specific metadata or custom parameters. + * + * @return String the additional parameters + */ public String getAdditionalParams() { return additionalParams; } + /** + * Sets additional parameters for this email log. + * + * @param additionalParams String the additional parameters to store + */ public void setAdditionalParams(String additionalParams) { this.additionalParams = additionalParams; } + /** + * Gets the list of file attachments associated with this email. + * + * @return List<EmailAttachment> the list of email attachments + */ public List getEmailAttachments() { return emailAttachments; } + /** + * Sets the list of file attachments for this email. + * + * @param emailAttachments List<EmailAttachment> the list of attachments to associate + */ public void setEmailAttachments(List emailAttachments) { this.emailAttachments = emailAttachments; } + /** + * Compares this email log to another based on timestamp. + * Enables chronological sorting of email logs. + * + * @param other EmailLog the email log to compare to + * @return int negative if this is earlier, positive if later, zero if equal + */ @Override public int compareTo(EmailLog other) { // Compare based on the timestamp diff --git a/src/main/java/ca/openosp/openo/commn/model/UserProperty.java b/src/main/java/ca/openosp/openo/commn/model/UserProperty.java index 82b7ece36c5..54a4d1a233d 100644 --- a/src/main/java/ca/openosp/openo/commn/model/UserProperty.java +++ b/src/main/java/ca/openosp/openo/commn/model/UserProperty.java @@ -58,8 +58,6 @@ public class UserProperty extends AbstractModel implements Serializable public static final String OFFICIAL_LAST_NAME = "official_last_name"; public static final String OFFICIAL_OLIS_IDTYPE = "official_olis_idtype"; public static final String OSCAR_MSG_RECVD = "oscarMsgRecvd"; - public static final String CLINICALCONNECT_DISABLE_CLOSE_WINDOW = "clinicalConnectDisableCloseWindow"; - public static final String CLINICALCONNECT_DISABLE_LOGOUT_WARNING = "clinicalConnectDisableLogoutWarning"; public static final String LAB_MACRO_JSON = "labMacroJSON"; //added to user properties with new interface @@ -151,11 +149,6 @@ public class UserProperty extends AbstractModel implements Serializable public static final String MCEDT_ACCOUNT_PASSWORD = "mcedt_account_password"; public static final String TICKLER_EMAIL_PROVIDER = "tickler_email_provider"; - public static final String CLINICALCONNECT_ID = "clinicalconnect_username"; - public static final String CLINICALCONNECT_TYPE = "clinicalconnect_authentication_type"; - public static final String CLINICALCONNECT_SERVICE_USERNAME = "clinicalconnect_service_username"; - public static final String CLINICALCONNECT_SERVICE_PASSWORD = "clinicalconnect_service_password"; - public static final String CLINICALCONNECT_SERVICE_LOCATION = "clinicalconnect_service_location"; public static final String DASHBOARD_SHARE = "dashboard_share"; public static final String CODE_TO_ADD_PATIENTDX = "code_to_add_patientDx"; diff --git a/src/main/java/ca/openosp/openo/contactRegistry/ProfessionalSpecialist2Action.java b/src/main/java/ca/openosp/openo/contactRegistry/ProfessionalSpecialist2Action.java index 9ef5d0fd0ec..fdd33276bf1 100644 --- a/src/main/java/ca/openosp/openo/contactRegistry/ProfessionalSpecialist2Action.java +++ b/src/main/java/ca/openosp/openo/contactRegistry/ProfessionalSpecialist2Action.java @@ -15,12 +15,49 @@ import javax.servlet.http.HttpServletResponse; import java.util.List; +/** + * Struts2 action class for managing professional specialist contact registry operations in the OpenO EMR system. + * + *

    This action handles retrieval and search functionality for professional specialists (physicians, consultants, + * and other healthcare professionals) that healthcare providers may need to contact for referrals, consultations, + * or collaboration. The action provides JSON-based API endpoints for retrieving individual specialist records + * and performing keyword-based searches across the specialist registry.

    + * + *

    This class follows the 2Action migration pattern, extending Struts2's ActionSupport and providing both + * backwards-compatible dispatch routing via the execute() method and direct method-based routing for modern + * integrations. The action integrates with Spring-managed business services through SpringUtils and maintains + * healthcare context through LoggedInInfo session tracking.

    + * + *

    Security Note: This action does not currently implement SecurityInfoManager privilege + * checks. All methods require valid session context via LoggedInInfo but do not enforce role-based access + * control for specialist registry access.

    + * + * @since 2026-01-24 + * @see ca.openosp.openo.commn.model.ProfessionalSpecialist + * @see ca.openosp.openo.managers.ProfessionalSpecialistsManager + * @see ca.openosp.openo.utility.LoggedInInfo + */ public class ProfessionalSpecialist2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); private final ProfessionalSpecialistsManager professionalSpecialistsManager = SpringUtils.getBean(ProfessionalSpecialistsManager.class); + /** + * Main execution entry point for backwards-compatible action routing. + * + *

    This method provides dispatch routing based on the actionType parameter to maintain + * backwards compatibility with legacy URL patterns. Modern integrations should invoke + * the get() or search() methods directly rather than relying on this dispatch mechanism.

    + * + *

    Supported action types:

    + *
      + *
    • /getProfessionalSpecialist - Routes to get() method for retrieving a single specialist by ID
    • + *
    • /searchProfessionalSpecialist - Routes to search() method for keyword-based specialist search
    • + *
    + * + * @return String always returns null as this action writes directly to the response stream + */ public String execute() { /* @@ -38,6 +75,32 @@ public String execute() { return null; } + /** + * Retrieves a single professional specialist record by ID and returns it as JSON. + * + *

    This method fetches a specific professional specialist from the contact registry using + * the specialist's unique identifier provided via the "id" request parameter. The specialist + * record is serialized to JSON format and written directly to the HTTP response stream.

    + * + *

    The method extracts the logged-in user's healthcare context to ensure proper audit + * logging and facility-scoped data access. If the specialist ID is not provided or the + * specialist record is not found, the method returns without writing to the response stream.

    + * + *

    Request Parameters:

    + *
      + *
    • id (String) - The unique identifier of the professional specialist to retrieve. + * Must be a valid integer value. If null or empty, no response is generated.
    • + *
    + * + *

    Response Format:

    + *
      + *
    • Content-Type: application/json
    • + *
    • Body: JSON representation of ProfessionalSpecialist entity with all fields
    • + *
    • Returns nothing if specialist not found or ID invalid
    • + *
    + * + * @throws NumberFormatException if the id parameter cannot be parsed as an integer + */ public void get() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String specialistId = request.getParameter("id"); @@ -53,6 +116,32 @@ public void get() { } } + /** + * Performs a keyword-based search across the professional specialist registry and returns matching records as JSON. + * + *

    This method searches the professional specialist contact registry using a keyword provided via + * the "keyword" request parameter. The search typically matches against specialist names, specialties, + * and other relevant contact information fields. All matching specialist records are serialized to a + * JSON array and written directly to the HTTP response stream.

    + * + *

    The method extracts the logged-in user's healthcare context to ensure proper audit logging and + * facility-scoped data access. If the keyword parameter is not provided or no matching specialists + * are found, the method returns without writing to the response stream.

    + * + *

    Request Parameters:

    + *
      + *
    • keyword (String) - The search term to match against specialist records. Common search fields + * include specialist name, specialty type, and contact information. If null or empty, no + * response is generated.
    • + *
    + * + *

    Response Format:

    + *
      + *
    • Content-Type: application/json
    • + *
    • Body: JSON array of ProfessionalSpecialist entities matching the search criteria
    • + *
    • Returns nothing if keyword not provided or no matches found
    • + *
    + */ public void search() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String search_keyword = request.getParameter("keyword"); @@ -67,12 +156,31 @@ public void search() { JSONUtil.jsonResponse(response, professionalSpecialistJSON); } } + private String actionType; // Determines the type of action - // Getter and Setter for actionType + + /** + * Retrieves the action type used for backwards-compatible dispatch routing. + * + *

    The action type determines which method is invoked by the execute() method's dispatch + * logic. This field supports legacy URL patterns that specify the operation type as a + * parameter value.

    + * + * @return String the action type path (e.g., "/getProfessionalSpecialist", "/searchProfessionalSpecialist") + */ public String getActionType() { return actionType; } + /** + * Sets the action type for backwards-compatible dispatch routing. + * + *

    This setter is invoked by Struts2's parameter interceptor to populate the actionType + * field from the request parameters, enabling the execute() method to route to the + * appropriate operation handler.

    + * + * @param actionType String the action type path that determines which method to invoke + */ public void setActionType(String actionType) { this.actionType = actionType; } diff --git a/src/main/java/ca/openosp/openo/dashboard/admin/ManageDashboard2Action.java b/src/main/java/ca/openosp/openo/dashboard/admin/ManageDashboard2Action.java index cdf9a2b6e5e..cc044e7dfa9 100644 --- a/src/main/java/ca/openosp/openo/dashboard/admin/ManageDashboard2Action.java +++ b/src/main/java/ca/openosp/openo/dashboard/admin/ManageDashboard2Action.java @@ -30,10 +30,12 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import org.apache.logging.log4j.Logger; import org.apache.struts2.ServletActionContext; -import org.dom4j.Document; -import org.dom4j.io.SAXReader; -import org.dom4j.io.SAXValidator; -import org.dom4j.util.XMLErrorHandler; +import org.jdom2.Document; +import org.jdom2.input.SAXBuilder; +import org.jdom2.input.sax.XMLReaders; +import org.jdom2.output.DOMOutputter; +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXParseException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; @@ -44,6 +46,7 @@ import ca.openosp.openo.managers.SecurityInfoManager; import ca.openosp.openo.utility.LoggedInInfo; import ca.openosp.openo.utility.MiscUtils; +import ca.openosp.openo.utility.PathValidationUtils; import ca.openosp.openo.utility.SpringUtils; import javax.servlet.http.HttpServletRequest; @@ -112,6 +115,9 @@ public String importTemplate() { if (indicatorTemplateFile != null) { try { + // Validate uploaded file before any file operations + PathValidationUtils.validateUpload(indicatorTemplateFile); + filebytes = Files.readAllBytes(indicatorTemplateFile.toPath()); } catch (Exception e) { json = objectMapper.createObjectNode(); @@ -133,48 +139,76 @@ public String importTemplate() { URL schemaSource = Thread.currentThread().getContextClassLoader().getResource("indicatorXMLTemplates/IndicatorXMLTemplateSchema.xsd"); try { - XMLErrorHandler errorHandler = new XMLErrorHandler(); + // Custom error handler to collect validation errors + final StringBuilder errorMessages = new StringBuilder(); + ErrorHandler errorHandler = new ErrorHandler() { + @Override + public void warning(SAXParseException e) { + errorMessages.append("Warning: ").append(e.getMessage()).append("\n"); + } + + @Override + public void error(SAXParseException e) { + errorMessages.append("Error: ").append(e.getMessage()).append("\n"); + } + + @Override + public void fatalError(SAXParseException e) { + errorMessages.append("Fatal: ").append(e.getMessage()).append("\n"); + } + }; + + // Configure SAXBuilder with XXE attack prevention + SAXBuilder builder = new SAXBuilder(XMLReaders.NONVALIDATING); + builder.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); + builder.setFeature("http://xml.org/sax/features/external-general-entities", false); + builder.setFeature("http://xml.org/sax/features/external-parameter-entities", false); + builder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); + + // Build the JDOM2 document + Document xmlDocument = builder.build(indicatorTemplateFile); + + // Setup XSD validation SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(true); factory.setNamespaceAware(true); - + try { - // Disable external entities to prevent XXE attacks + // Disable external entities to prevent XXE attacks in validator factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); - - } catch (SAXNotRecognizedException | SAXNotSupportedException e) { - MiscUtils.getLogger().error("Failed to set XML parser features to prevent XXE attacks", e); - throw new RuntimeException(e); - } - - SAXParser parser = factory.newSAXParser(); - // Configure SAXReader to prevent XXE attacks - SAXReader xmlReader = new SAXReader(); - - try { - xmlReader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); - xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false); - xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); - xmlReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); } catch (SAXNotRecognizedException | SAXNotSupportedException e) { MiscUtils.getLogger().error("Failed to set XML parser features to prevent XXE attacks", e); throw new RuntimeException(e); } - Document xmlDocument = (Document) xmlReader.read(Files.newBufferedReader(indicatorTemplateFile.toPath())); + SAXParser parser = factory.newSAXParser(); parser.setProperty( "http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); parser.setProperty( "http://java.sun.com/xml/jaxp/properties/schemaSource", "file:" + schemaSource.getPath()); - SAXValidator validator = new SAXValidator(parser.getXMLReader()); + + // Convert JDOM2 Document to DOM Document for validation + DOMOutputter domOutputter = new DOMOutputter(); + org.w3c.dom.Document domDocument = domOutputter.output(xmlDocument); + + // Validate using standard javax.xml.validation + javax.xml.validation.SchemaFactory schemaFactory = + javax.xml.validation.SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI); + // Enable secure processing to prevent XXE attacks + schemaFactory.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, true); + schemaFactory.setProperty(javax.xml.XMLConstants.ACCESS_EXTERNAL_DTD, ""); + schemaFactory.setProperty(javax.xml.XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); + javax.xml.validation.Schema schema = schemaFactory.newSchema(schemaSource); + javax.xml.validation.Validator validator = schema.newValidator(); validator.setErrorHandler(errorHandler); - validator.validate(xmlDocument); - if (!errorHandler.getErrors().hasContent()) { + validator.validate(new javax.xml.transform.dom.DOMSource(domDocument)); + + if (errorMessages.length() == 0) { isOscarXml = true; } } catch (Exception e) { diff --git a/src/main/java/ca/openosp/openo/dashboard/factory/DashboardBeanFactory.java b/src/main/java/ca/openosp/openo/dashboard/factory/DashboardBeanFactory.java index 58adfc9dc0b..621256368eb 100644 --- a/src/main/java/ca/openosp/openo/dashboard/factory/DashboardBeanFactory.java +++ b/src/main/java/ca/openosp/openo/dashboard/factory/DashboardBeanFactory.java @@ -24,11 +24,10 @@ */ package ca.openosp.openo.dashboard.factory; -import java.lang.reflect.InvocationTargetException; import java.util.Date; import java.util.List; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.logging.log4j.Logger; import ca.openosp.openo.commn.model.Dashboard; import ca.openosp.openo.commn.model.IndicatorTemplate; @@ -86,10 +85,8 @@ public DashboardBean getDashboardBean() { private void setDashboardBean(DashboardBean dashboardBean) { try { // copy matching properties from Bean to Bean - BeanUtils.copyProperties(dashboardBean, getDashboardEntity()); - } catch (IllegalAccessException e) { - logger.error("Error", e); - } catch (InvocationTargetException e) { + BeanUtils.copyProperties(getDashboardEntity(), dashboardBean); + } catch (Exception e) { logger.error("Error", e); } diff --git a/src/main/java/ca/openosp/openo/dashboard/factory/DrilldownBeanFactory.java b/src/main/java/ca/openosp/openo/dashboard/factory/DrilldownBeanFactory.java index b7508962a9e..e9f15e5b593 100644 --- a/src/main/java/ca/openosp/openo/dashboard/factory/DrilldownBeanFactory.java +++ b/src/main/java/ca/openosp/openo/dashboard/factory/DrilldownBeanFactory.java @@ -26,7 +26,7 @@ import java.util.List; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.logging.log4j.Logger; import ca.openosp.openo.commn.model.IndicatorTemplate; import ca.openosp.openo.dashboard.display.beans.DrilldownBean; @@ -106,7 +106,7 @@ public DrilldownBean getDrilldownBean() { private void setDrilldownBean(DrilldownBean drilldownBean) { // copy what is available in the entity bean try { - BeanUtils.copyProperties(drilldownBean, getIndicatorTemplate()); + BeanUtils.copyProperties(getIndicatorTemplate(), drilldownBean); } catch (Exception e) { logger.error("Error while copying IndicatorTemplate entity id " + getIndicatorTemplate().getId(), e); } diff --git a/src/main/java/ca/openosp/openo/dashboard/handler/TicklerHandler.java b/src/main/java/ca/openosp/openo/dashboard/handler/TicklerHandler.java index 54e483a3603..edca74c12b2 100644 --- a/src/main/java/ca/openosp/openo/dashboard/handler/TicklerHandler.java +++ b/src/main/java/ca/openosp/openo/dashboard/handler/TicklerHandler.java @@ -33,7 +33,7 @@ import java.util.List; import java.util.Map; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.logging.log4j.Logger; import ca.openosp.openo.commn.model.Tickler; import ca.openosp.openo.managers.TicklerManager; @@ -124,7 +124,7 @@ public boolean addTickler(Integer[] demographicArray) { Tickler ticklerCopy = new Tickler(); try { - BeanUtils.copyProperties(ticklerCopy, getMasterTickler()); + BeanUtils.copyProperties(getMasterTickler(), ticklerCopy); } catch (Exception e) { MiscUtils.getLogger().error("Failed to create Tickler for demographicNo: " + demographicNo, e); success = Boolean.FALSE; diff --git a/src/main/java/ca/openosp/openo/demographic/PrintDemoAddressLabel2Action.java b/src/main/java/ca/openosp/openo/demographic/PrintDemoAddressLabel2Action.java index 32297429ff9..348ffb62a2f 100644 --- a/src/main/java/ca/openosp/openo/demographic/PrintDemoAddressLabel2Action.java +++ b/src/main/java/ca/openosp/openo/demographic/PrintDemoAddressLabel2Action.java @@ -27,6 +27,28 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action for generating and printing PDF address labels for patient demographics. + * + *

    This action generates address labels using JasperReports with customizable templates. + * It supports both interactive and silent printing to configured printers, with user-specific + * printer preferences stored in UserProperty settings.

    + * + *

    The action loads an address label template (Addresslabel.xml) from either the user's + * home directory for customization or from the default classpath resource. The generated + * PDF is streamed directly to the HTTP response with optional JavaScript to trigger + * automatic printing in the client's browser.

    + * + *

    Security: Requires "_demographic" read privilege to access patient information.

    + * + *

    Healthcare Context: Address labels are commonly used for patient correspondence, + * lab specimen labels, and medical record filing in Canadian healthcare settings.

    + * + * @see UserProperty + * @see OscarDocumentCreator + * @see UserPropertyDAO + * @since 2026-01-24 + */ public class PrintDemoAddressLabel2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -34,9 +56,48 @@ public class PrintDemoAddressLabel2Action extends ActionSupport { private static Logger logger = MiscUtils.getLogger(); private SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); + /** + * Constructs a new PrintDemoAddressLabel2Action instance. + * + *

    This constructor initializes the action with default settings. Request and response + * objects are automatically injected by Struts2 via ServletActionContext.

    + */ public PrintDemoAddressLabel2Action() { } + /** + * Executes the address label generation and printing workflow. + * + *

    This method performs the following operations:

    + *
      + *
    1. Validates security privileges for demographic access
    2. + *
    3. Retrieves user-specific printer preferences (printer name and silent print mode)
    4. + *
    5. Loads the address label template (Addresslabel.xml) from user home directory or classpath
    6. + *
    7. Configures JasperReports parameters with demographic number
    8. + *
    9. Generates PDF output and streams to HTTP response
    10. + *
    11. Optionally injects JavaScript for automatic printing to configured printer
    12. + *
    + * + *

    Request Parameters:

    + *
      + *
    • demographic_no - String the unique identifier of the patient demographic record
    • + *
    + * + *

    User Properties Used:

    + *
      + *
    • DEFAULT_PRINTER_PDF_ADDRESS_LABEL - String the printer name for address labels
    • + *
    • DEFAULT_PRINTER_PDF_ADDRESS_LABEL_SILENT_PRINT - String "yes" to enable silent printing
    • + *
    + * + *

    Security: Requires "_demographic" read privilege. Throws SecurityException if not authorized.

    + * + *

    Template Resolution: First attempts to load custom template from + * ${user.home}/Addresslabel.xml, falls back to classpath resource + * /oscar/oscarDemographic/Addresslabel.xml if custom template not found.

    + * + * @return String "success" constant from ActionSupport indicating successful execution + * @throws SecurityException if the user lacks "_demographic" read privilege + */ public String execute() { if (!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_demographic", "r", null)) { @@ -117,6 +178,24 @@ public String execute() { return SUCCESS; } + /** + * Constructs HTTP headers for the PDF response. + * + *

    This method generates the Content-Disposition header value for inline PDF display + * in the browser with a default filename of "label_.pdf". It also sets cache control + * headers to prevent caching of the generated document.

    + * + *

    Headers Set:

    + *
      + *
    • Cache-Control: max-age=0 - Prevents caching of the PDF
    • + *
    • Expires: 0 - Sets expiration to epoch time
    • + *
    • Content-Type: application/pdf - Indicates PDF content
    • + *
    • Content-Disposition: inline; filename=label_.pdf - Displays PDF inline with filename
    • + *
    + * + * @param response HttpServletResponse the HTTP response object to configure headers on + * @return StringBuilder the Content-Disposition header value including filename + */ private StringBuilder getHeader(HttpServletResponse response) { StringBuilder strHeader = new StringBuilder(); strHeader.append("label_"); diff --git a/src/main/java/ca/openosp/openo/demographic/PrintDemoChartLabel2Action.java b/src/main/java/ca/openosp/openo/demographic/PrintDemoChartLabel2Action.java index be9f1f7cb66..28d7cbbad5d 100644 --- a/src/main/java/ca/openosp/openo/demographic/PrintDemoChartLabel2Action.java +++ b/src/main/java/ca/openosp/openo/demographic/PrintDemoChartLabel2Action.java @@ -33,6 +33,37 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action for generating and printing patient demographic chart labels in PDF format. + * + * This action handles the creation of various types of chart labels for patient records, + * including standard chart labels and specialized labels such as sexual health clinic labels. + * The generated PDFs can be automatically printed to a configured printer with optional + * silent printing mode. + * + * The action supports: + *
      + *
    • Multiple label types via configurable XML templates (ChartLabel, SexualHealthClinicLabel)
    • + *
    • User-specific printer configuration and silent print mode preferences
    • + *
    • Program-based context information for patient labels
    • + *
    • PDF generation using JasperReports with custom JavaScript for print automation
    • + *
    • Template loading from user home directory or classpath fallback
    • + *
    + * + * Healthcare Context: + * Chart labels are physical labels printed for patient files containing demographic information, + * current program assignment, and other identifying information used in paper-based medical + * record management within healthcare facilities. + * + * Security: + * Requires "_demographic" read privilege to access patient demographic information. + * + * @see ca.openosp.openo.commn.dao.UserPropertyDAO + * @see ca.openosp.openo.managers.ProgramManager2 + * @see ca.openosp.openo.managers.SecurityInfoManager + * @see ca.openosp.OscarDocumentCreator + * @since 2026-01-24 + */ public class PrintDemoChartLabel2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -40,9 +71,53 @@ public class PrintDemoChartLabel2Action extends ActionSupport { private static Logger logger = MiscUtils.getLogger(); private SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); + /** + * Default constructor for PrintDemoChartLabel2Action. + * + * Initializes the action with default state. Spring and Struts2 dependencies + * are injected via field initialization and ServletActionContext. + */ public PrintDemoChartLabel2Action() { } + /** + * Main action execution method that generates and streams a patient chart label PDF. + * + * This method performs the following operations: + *
      + *
    1. Validates user has "_demographic" read privilege
    2. + *
    3. Retrieves user printer preferences (default printer name and silent print mode)
    4. + *
    5. Determines which label template to use (ChartLabel or SexualHealthClinicLabel)
    6. + *
    7. Loads the label template XML from user home directory or classpath
    8. + *
    9. Gathers demographic and program context parameters
    10. + *
    11. Generates PDF using JasperReports via OscarDocumentCreator
    12. + *
    13. Streams PDF to response with optional JavaScript for automatic printing
    14. + *
    + * + * Request Parameters: + *
      + *
    • demographic_no (String) - The patient demographic identifier to generate label for
    • + *
    • labelName (String, optional) - The type of label to generate (e.g., "ChartLabel", "SexualHealthClinicLabel")
    • + *
    + * + * User Properties Consulted: + *
      + *
    • DEFAULT_PRINTER_PDF_CHART_LABEL - Configured printer name for automatic printing
    • + *
    • DEFAULT_PRINTER_PDF_LABEL_SILENT_PRINT - Whether to print silently without dialog ("yes"/"no")
    • + *
    + * + * Template Resolution: + * First attempts to load template from user's home directory, then falls back to + * classpath resource at /oscar/oscarDemographic/{labelFile}. + * + * PDF Generation: + * The generated PDF is streamed directly to the response output stream with content + * type "application/pdf" and inline disposition. If a default printer is configured, + * embedded JavaScript in the PDF will trigger automatic printing on open. + * + * @return String ActionSupport result constant, always returns SUCCESS + * @throws SecurityException if user lacks "_demographic" read privilege + */ public String execute() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -156,6 +231,24 @@ public String execute() { return SUCCESS; } + /** + * Constructs HTTP response headers for PDF download with inline display disposition. + * + * This method configures the HTTP response to display the PDF inline in the browser + * rather than forcing a download. It sets appropriate cache control headers to prevent + * caching of the generated label document. + * + * Headers Set: + *
      + *
    • Cache-Control: max-age=0 - Prevents browser caching
    • + *
    • Expires: 0 - Sets expiration to epoch time
    • + *
    • Content-Type: application/pdf - Identifies response as PDF document
    • + *
    • Content-Disposition: inline; filename=label_.pdf - Displays inline with default filename
    • + *
    + * + * @param response HttpServletResponse the servlet response to configure headers on + * @return StringBuilder containing the Content-Disposition header value in format "inline; filename=label_.pdf" + */ private StringBuilder getHeader(HttpServletResponse response) { StringBuilder strHeader = new StringBuilder(); strHeader.append("label_"); diff --git a/src/main/java/ca/openosp/openo/demographic/PrintDemoLabel2Action.java b/src/main/java/ca/openosp/openo/demographic/PrintDemoLabel2Action.java index 0ddacc4dc93..a7deda840fe 100644 --- a/src/main/java/ca/openosp/openo/demographic/PrintDemoLabel2Action.java +++ b/src/main/java/ca/openosp/openo/demographic/PrintDemoLabel2Action.java @@ -26,6 +26,44 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action that generates and prints patient demographic labels as PDF documents. + * + *

    This 2Action class handles the generation of patient demographic labels for printing, + * typically used for chart filing, specimen labeling, or patient identification purposes + * in a healthcare setting. The action supports configurable label templates and printer + * settings per provider.

    + * + *

    Key features include:

    + *
      + *
    • PDF label generation from XML templates using JasperReports
    • + *
    • Per-provider default printer configuration
    • + *
    • Silent printing support (automatic printing without user interaction)
    • + *
    • Multiple label template support (MRP labels, appointment provider labels)
    • + *
    • Integration with patient demographic and appointment data
    • + *
    + * + *

    Security: Requires the "_demographic" security privilege with read access. + * All patient data access is logged through the LoggedInInfo framework for + * HIPAA/PIPEDA compliance.

    + * + *

    Label templates are configurable via OscarProperties:

    + *
      + *
    • pdfLabelMRP - Path to the MRP (Most Responsible Provider) label template
    • + *
    • pdfLabelApptProvider - Path to the appointment provider label template
    • + *
    + * + *

    Default printer settings are managed per provider using UserProperty entries:

    + *
      + *
    • DEFAULT_PRINTER_PDF_LABEL - Default printer name for PDF labels
    • + *
    • DEFAULT_PRINTER_PDF_LABEL_SILENT_PRINT - Silent print flag (yes/no)
    • + *
    + * + * @see ca.openosp.openo.commn.model.UserProperty + * @see ca.openosp.OscarDocumentCreator + * @see ca.openosp.openo.managers.SecurityInfoManager + * @since 2026-01-24 + */ public class PrintDemoLabel2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -33,9 +71,56 @@ public class PrintDemoLabel2Action extends ActionSupport { private static Logger logger = MiscUtils.getLogger(); private SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); + /** + * Default constructor for PrintDemoLabel2Action. + * + *

    Initializes the action with Spring-injected dependencies via SpringUtils. + * The HttpServletRequest and HttpServletResponse are obtained from ServletActionContext + * following the Struts2 2Action pattern.

    + */ public PrintDemoLabel2Action() { } + /** + * Executes the main action logic to generate and stream a PDF label for a patient. + * + *

    This method performs the following workflow:

    + *
      + *
    1. Validates security privilege for demographic data access
    2. + *
    3. Retrieves provider-specific printer settings from UserProperty
    4. + *
    5. Determines the appropriate label template (MRP or appointment provider)
    6. + *
    7. Loads the label template XML from configured path or default classpath resource
    8. + *
    9. Generates PDF using OscarDocumentCreator with patient demographic data
    10. + *
    11. Streams the PDF to the response output with appropriate headers
    12. + *
    13. Optionally injects JavaScript for automatic/silent printing
    14. + *
    + * + *

    Request parameters:

    + *
      + *
    • demographic_no - String the patient demographic number (required)
    • + *
    • appointment_no - Integer the appointment number (optional, triggers + * appointment provider label if configured)
    • + *
    + * + *

    The method uses the provider's configured printer settings to determine whether + * to enable automatic printing and which printer to use. If silent printing is enabled, + * the PDF will include JavaScript to automatically print to the specified printer + * without user interaction.

    + * + *

    Label template resolution follows this order:

    + *
      + *
    1. If appointment_no provided and pdfLabelApptProvider configured: use appointment provider template
    2. + *
    3. Otherwise: use pdfLabelMRP template (default: ~/label.xml)
    4. + *
    5. Fallback: use bundled /oscar/oscarDemographic/label.xml resource
    6. + *
    + * + *

    The generated PDF is streamed directly to the HttpServletResponse with + * Content-Type: application/pdf and Content-Disposition: inline, causing + * the browser to display the PDF inline rather than prompting for download.

    + * + * @return String always returns SUCCESS after streaming the PDF + * @throws SecurityException if the current user lacks "_demographic" read privilege + */ public String execute() { if (!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_demographic", "r", null)) { @@ -131,6 +216,27 @@ public String execute() { return SUCCESS; } + /** + * Constructs the HTTP Content-Disposition header value for the PDF label response. + * + *

    This method builds the Content-Disposition header to instruct the browser to + * display the PDF inline (within the browser) rather than prompting for download. + * It also sets cache control headers to prevent caching of the PDF document.

    + * + *

    The method sets the following response headers:

    + *
      + *
    • Cache-Control: max-age=0 - Prevents browser caching
    • + *
    • Expires: 0 - Sets expiration to epoch (prevents caching)
    • + *
    • Content-Type: application/pdf - Identifies content as PDF
    • + *
    + * + *

    The generated filename is always "label_.pdf". This appears to be a potential + * issue as the underscore suggests a missing identifier (demographic_no or timestamp) + * should be included in the filename.

    + * + * @param response HttpServletResponse the HTTP response object to configure headers on + * @return StringBuilder the Content-Disposition header value in format "inline; filename=label_.pdf" + */ private StringBuilder getHeader(HttpServletResponse response) { StringBuilder strHeader = new StringBuilder(); strHeader.append("label_"); diff --git a/src/main/java/ca/openosp/openo/demographic/pageUtil/HL7CreateFile.java b/src/main/java/ca/openosp/openo/demographic/pageUtil/HL7CreateFile.java index d1569eb1b89..f594cacb41c 100644 --- a/src/main/java/ca/openosp/openo/demographic/pageUtil/HL7CreateFile.java +++ b/src/main/java/ca/openosp/openo/demographic/pageUtil/HL7CreateFile.java @@ -14,6 +14,52 @@ import java.util.Date; import java.util.List; +/** + * HL7 message generator for laboratory results integration in OpenO EMR. + * + *

    This class constructs HL7 v2.3 ORU^R01 (Unsolicited Observation Result) messages + * from laboratory result data. It supports multiple Canadian laboratory information + * systems including MDS (LifeLabs), GDML (Gamma-Dynacare), CML (Calgary Medical Labs), + * PATHL7, and ExcellerisON.

    + * + *

    The generated HL7 messages conform to different message structure variants based + * on the laboratory type:

    + *
      + *
    • MDS - Uses custom Z-segments (ZLB, ZRG, ZMN, ZMC, ZCL, ZPD, ZFR, ZCT) for + * LifeLabs-specific data elements
    • + *
    • GDML - Gamma-Dynacare format with standard HL7 segments
    • + *
    • CML - Calgary Medical Labs standard format with ORC/OBR/OBX segments
    • + *
    • PATHL7 - Wrapped in XML container for laboratory systems requiring XML transport
    • + *
    • ExcellerisON - Ontario-specific Excelleris format with XML wrapper
    • + *
    + * + *

    Key HL7 message components generated:

    + *
      + *
    • MSH - Message Header with sender/receiver identification and message type
    • + *
    • PID - Patient Identification with demographics and health card number
    • + *
    • ORC - Common Order segment for order control information
    • + *
    • OBR - Observation Request with test code and collection times
    • + *
    • OBX - Observation Result with test results, units, and reference ranges
    • + *
    • NTE - Notes and Comments for lab-provided narrative text
    • + *
    • Z-segments - Custom segments for laboratory-specific data (MDS only)
    • + *
    + * + *

    The class handles various data formats including embedded PDF results encoded in Base64, + * multi-line notes, and province-specific health card number formatting.

    + * + *

    Healthcare Context:

    + *
      + *
    • Supports Canadian provincial health insurance number (HIN) formats
    • + *
    • Handles laboratory result status (Final, Preliminary, Corrected)
    • + *
    • Processes abnormal flags (Normal, Abnormal, Critical, Low, High)
    • + *
    • Manages reference ranges and units of measure
    • + *
    • Supports blocked test results (privacy-protected)
    • + *
    + * + * @see ca.openosp.openo.commn.model.Demographic + * @see cds.LaboratoryResultsDocument + * @since 2026-01-24 + */ public class HL7CreateFile { private Demographic demographic; String LAB_TYPE = "CML"; @@ -26,10 +72,44 @@ public class HL7CreateFile { private static final SimpleDateFormat fullDate = new SimpleDateFormat("yyyyMMdd"); + /** + * Constructs an HL7 message generator for a specific patient. + * + * @param demographic Demographic the patient demographic information including name, date of birth, + * sex, health insurance number, and contact information + */ public HL7CreateFile(Demographic demographic) { this.demographic = demographic; } + /** + * Generates a complete HL7 v2.3 ORU^R01 message from laboratory results. + * + *

    This method constructs an HL7 message by assembling multiple segments in the proper + * sequence based on the laboratory type. The message structure varies depending on whether + * the results are from MDS (LifeLabs), GDML (Gamma-Dynacare), CML, PATHL7, or ExcellerisON.

    + * + *

    The laboratory type is automatically detected from the laboratory name in the first + * result and determines which segments and segment order to use:

    + *
      + *
    • MDS: MSH, ZLB, ZRG, ZMN, ZMC, ZCL, PID, ZPD (if blocked), PV1, ZFR, ZCT, OBR, OBX, NTE
    • + *
    • GDML: MSH, PID, OBR, OBX, NTE
    • + *
    • CML/PATHL7/ExcellerisON: MSH, PID, ORC, OBR, OBX, NTE (wrapped in XML for PATHL7/ExcellerisON)
    • + *
    + * + *

    The method handles special cases including:

    + *
      + *
    • Blocked test results (privacy-protected results indicated by ZPD segment)
    • + *
    • Base64-encoded PDF results embedded in OBX segments
    • + *
    • Multi-line laboratory notes split across multiple NTE or ZMC segments
    • + *
    • XML wrapper for PATHL7 and ExcellerisON laboratory systems
    • + *
    + * + * @param labs List<LaboratoryResultsDocument.LaboratoryResults> the laboratory results to include + * in the HL7 message; must contain at least one result + * @return String the complete HL7 message with newline-separated segments, or empty string if + * the labs list is null or empty + */ public String generateHL7(List labs) { StringBuilder hl7 = new StringBuilder(); diff --git a/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManager.java b/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManager.java index b7c3ef19b61..3414b07d82d 100644 --- a/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManager.java +++ b/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManager.java @@ -14,12 +14,80 @@ import java.nio.file.Path; import java.util.*; +/** + * Manages document attachments within the OpenO EMR healthcare system. + * + *

    This interface provides comprehensive functionality for managing medical document attachments + * across various healthcare contexts including consultations, eForms, laboratory results, and + * clinical encounters. It supports attachment operations, PDF generation, rendering, and + * integration with external systems such as OceanMD.

    + * + *

    Key capabilities include:

    + *
      + *
    • Retrieving and managing attachments for consultations and eForms
    • + *
    • Handling laboratory results with version sorting for the attachment workflow
    • + *
    • PDF document concatenation and rendering for multiple document types
    • + *
    • Integration with e-referral systems (OceanMD) for automatic attachment synchronization
    • + *
    • Converting eForms to electronic documents (eDocs) for archival purposes
    • + *
    • Base64 encoding of PDFs for data transmission and storage
    • + *
    + * + *

    This interface is central to OpenO EMR's document management workflow and ensures + * proper handling of patient health information (PHI) in compliance with HIPAA/PIPEDA + * regulatory requirements.

    + * + * @since 2026-01-24 + * @see DocumentType + * @see LoggedInInfo + * @see EFormData + * @see AttachmentLabResultData + * @see PDFGenerationException + */ public interface DocumentAttachmentManager { + /** + * Retrieves all attachments associated with a specific consultation request. + * + *

    This method returns a list of document identifiers that are currently attached to + * a consultation request. The attachments can be of various types including eForms, + * laboratory results, clinical documents, and other medical records.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param requestId Integer the unique identifier of the consultation request + * @param documentType DocumentType the type of documents to retrieve + * @param demographicNo Integer the patient's unique demographic identifier + * @return List<String> list of document identifiers attached to the consultation + */ public List getConsultAttachments(LoggedInInfo loggedInInfo, Integer requestId, DocumentType documentType, Integer demographicNo); + /** + * Retrieves all attachments associated with a specific eForm. + * + *

    This method returns a list of document identifiers that are currently attached to + * an electronic form (eForm). The attachments can include various document types such as + * clinical documents, laboratory results, imaging reports, and other medical records.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param fdid Integer the unique identifier of the eForm (form data ID) + * @param documentType DocumentType the type of documents to retrieve + * @param demographicNo Integer the patient's unique demographic identifier + * @return List<String> list of document identifiers attached to the eForm + */ public List getEFormAttachments(LoggedInInfo loggedInInfo, Integer fdid, DocumentType documentType, Integer demographicNo); + /** + * Retrieves clinical encounter forms that are attached to a specific eForm. + * + *

    This method returns encounter forms (such as Rourke charts, BCAR forms, and other + * clinical assessment forms) that have been attached to an electronic form. These forms + * represent structured clinical data collected during patient encounters.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param fdid Integer the unique identifier of the eForm (form data ID) + * @param documentType DocumentType the type of documents to retrieve + * @param demographicNo Integer the patient's unique demographic identifier + * @return List<EctFormData.PatientForm> list of patient encounter forms attached to the eForm + */ public List getFormsAttachedToEForms(LoggedInInfo loggedInInfo, Integer fdid, DocumentType documentType, Integer demographicNo); /** @@ -35,44 +103,202 @@ public interface DocumentAttachmentManager { */ public List getAllEFormsExpectFdid(LoggedInInfo loggedInInfo, Integer demographicNo, Integer fdid); + /** + * Attaches documents to a consultation request. + * + *

    This method associates one or more documents with a specific consultation request, + * allowing healthcare providers to include relevant medical records, laboratory results, + * imaging reports, and other clinical information as part of the referral process.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param documentType DocumentType the type of documents being attached + * @param attachments String[] array of document identifiers to attach to the consultation + * @param providerNo String the provider number performing the attachment operation + * @param requestId Integer the unique identifier of the consultation request + * @param demographicNo Integer the patient's unique demographic identifier + */ public void attachToConsult(LoggedInInfo loggedInInfo, DocumentType documentType, String[] attachments, String providerNo, Integer requestId, Integer demographicNo); - /* - * @param editOnOcean When editOnOcean is set to false, it signifies a normal consult request, performing just attach or detach operations on the consult request form. - * When editOnOcean is set to true, it signifies that the attach or detach operation is being performed on a consult request created by OceanMD. - * In this case, it will do two things: - * 1. Attach or detach attachments from the consult request. - * 2. Add those new attachments to the 'EreferAttachment' table, so Oscar can sent those attachment to OceanMD. - * By doing this, the user will not have to manually upload new attachments to e-refer. They will be automatically fetched. + /** + * Attaches documents to a consultation request with optional OceanMD integration. + * + *

    This method provides enhanced functionality for attaching documents to consultation requests, + * including automatic synchronization with OceanMD e-referral system when applicable. This allows + * for seamless integration with external referral management platforms.

    + * + *

    When editOnOcean is set to false, this performs standard attach/detach operations on the + * consultation request form. When editOnOcean is set to true, indicating the consultation was + * created by OceanMD, the method performs two operations:

    + *
      + *
    1. Attaches or detaches documents from the consultation request in OpenO EMR
    2. + *
    3. Adds new attachments to the 'EreferAttachment' table for automatic synchronization with OceanMD
    4. + *
    + * + *

    This dual operation eliminates the need for manual attachment uploads to the e-referral system, + * as attachments are automatically synchronized and made available to the receiving specialist.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param documentType DocumentType the type of documents being attached + * @param attachments String[] array of document identifiers to attach to the consultation + * @param providerNo String the provider number performing the attachment operation + * @param requestId Integer the unique identifier of the consultation request + * @param demographicNo Integer the patient's unique demographic identifier + * @param editOnOcean Boolean true if the consultation was created by OceanMD and requires automatic synchronization, false for standard attach/detach operations */ public void attachToConsult(LoggedInInfo loggedInInfo, DocumentType documentType, String[] attachments, String providerNo, Integer requestId, Integer demographicNo, Boolean editOnOcean); + /** + * Attaches documents to an electronic form (eForm). + * + *

    This method associates one or more documents with a specific eForm, allowing healthcare + * providers to include supporting documentation, laboratory results, imaging reports, and + * other relevant medical records alongside structured form data.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param documentType DocumentType the type of documents being attached + * @param attachments String[] array of document identifiers to attach to the eForm + * @param providerNo String the provider number performing the attachment operation + * @param fdid Integer the unique identifier of the eForm (form data ID) + * @param demographicNo Integer the patient's unique demographic identifier + */ public void attachToEForm(LoggedInInfo loggedInInfo, DocumentType documentType, String[] attachments, String providerNo, Integer fdid, Integer demographicNo); + /** + * Concatenates multiple PDF documents into a single PDF file. + * + *

    This method combines a list of PDF document objects into a single consolidated PDF file. + * This is commonly used when generating comprehensive patient records that include multiple + * clinical documents, laboratory results, imaging reports, and other medical records.

    + * + * @param pdfDocumentList ArrayList<Object> list of PDF document objects to concatenate + * @return Path the file system path to the concatenated PDF document + * @throws PDFGenerationException if an error occurs during the PDF concatenation process + */ public Path concatPDF(ArrayList pdfDocumentList) throws PDFGenerationException; + /** + * Concatenates multiple PDF documents specified by file paths into a single PDF file. + * + *

    This method combines multiple PDF files, identified by their file system paths, into + * a single consolidated PDF document. This is particularly useful for creating comprehensive + * patient records that merge various clinical documents stored as separate PDF files.

    + * + * @param pdfDocuments List<Path> list of file system paths to PDF documents to concatenate + * @return Path the file system path to the concatenated PDF document + * @throws PDFGenerationException if an error occurs during the PDF concatenation process + */ public Path concatPDF(List pdfDocuments) throws PDFGenerationException; + /** + * Renders a medical document to PDF format based on HTTP request parameters. + * + *

    This method generates a PDF representation of a medical document by processing + * HTTP request parameters to identify the document and its rendering requirements. + * The rendered PDF is suitable for printing, archival, or transmission to external systems.

    + * + * @param request HttpServletRequest the HTTP request containing document parameters + * @param response HttpServletResponse the HTTP response for potential streaming operations + * @param documentType DocumentType the type of document to render (eForm, lab result, clinical document, etc.) + * @return Path the file system path to the rendered PDF document + * @throws PDFGenerationException if an error occurs during the PDF rendering process + */ public Path renderDocument(HttpServletRequest request, HttpServletResponse response, DocumentType documentType) throws PDFGenerationException; /** - * This renderDocument method is written to render EForms, Docs, HRMs and Labs. + * Renders a medical document to PDF format by document type and identifier. + * + *

    This method generates a PDF representation of various healthcare document types including + * electronic forms (eForms), clinical documents (Docs), hospital report manager records (HRMs), + * and laboratory results (Labs). The rendered PDF is suitable for printing, archival, electronic + * transmission, or attachment to other clinical documents.

    + * + *

    This method provides a streamlined interface for document rendering by directly accepting + * the document identifier and type, without requiring HTTP request/response objects.

    * - * @param loggedInInfo The LoggedInInfo object. - * @param documentType The type of the document to be rendered. - * @param documentId The documentId integer. - * @return The Path to the rendered document. + * @param loggedInInfo LoggedInInfo the current user's session information for security and audit purposes + * @param documentType DocumentType the type of document to render (eForm, Doc, HRM, or Lab) + * @param documentId Integer the unique identifier of the document to render + * @return Path the file system path to the rendered PDF document + * @throws PDFGenerationException if an error occurs during the PDF rendering process */ public Path renderDocument(LoggedInInfo loggedInInfo, DocumentType documentType, Integer documentId) throws PDFGenerationException; + /** + * Renders a consultation form along with all its associated attachments as a single PDF. + * + *

    This method generates a comprehensive PDF document that includes the consultation request + * form and all attached medical records, laboratory results, imaging reports, and other + * supporting documentation. This consolidated PDF is suitable for specialist referrals, + * e-referral system transmission, or archival purposes.

    + * + * @param request HttpServletRequest the HTTP request containing consultation parameters + * @param response HttpServletResponse the HTTP response for potential streaming operations + * @return Path the file system path to the rendered PDF document containing the consultation form and attachments + * @throws PDFGenerationException if an error occurs during the PDF rendering or concatenation process + */ public Path renderConsultationFormWithAttachments(HttpServletRequest request, HttpServletResponse response) throws PDFGenerationException; + /** + * Renders an electronic form (eForm) along with all its associated attachments as a single PDF. + * + *

    This method generates a comprehensive PDF document that includes the eForm data and all + * attached medical records, laboratory results, clinical documents, and other supporting + * documentation. This consolidated PDF is suitable for archival, printing, or conversion + * to an electronic document (eDoc) for permanent storage.

    + * + * @param request HttpServletRequest the HTTP request containing eForm parameters + * @param response HttpServletResponse the HTTP response for potential streaming operations + * @return Path the file system path to the rendered PDF document containing the eForm and attachments + * @throws PDFGenerationException if an error occurs during the PDF rendering or concatenation process + */ public Path renderEFormWithAttachments(HttpServletRequest request, HttpServletResponse response) throws PDFGenerationException; + /** + * Converts an electronic form (eForm) to an electronic document (eDoc) for permanent archival. + * + *

    This method renders an eForm as a PDF and saves it as an electronic document in the + * OpenO EMR document management system. This conversion creates a permanent, immutable record + * of the eForm data and any attachments, which is essential for regulatory compliance and + * long-term patient record retention.

    + * + *

    The resulting eDoc maintains all the clinical information from the original eForm while + * providing a stable format for archival and retrieval purposes.

    + * + * @param request HttpServletRequest the HTTP request containing eForm parameters + * @param response HttpServletResponse the HTTP response for potential streaming operations + * @return Integer the unique identifier of the newly created electronic document (eDoc) + * @throws PDFGenerationException if an error occurs during the PDF rendering or document saving process + */ public Integer saveEFormAsEDoc(HttpServletRequest request, HttpServletResponse response) throws PDFGenerationException; + /** + * Converts a PDF document to Base64-encoded string representation. + * + *

    This method reads a PDF document from the file system and encodes it as a Base64 string, + * which is suitable for embedding in JSON/XML payloads, transmitting via web services, or + * storing in text-based fields. This is commonly used for integration with external healthcare + * systems such as e-referral platforms, laboratory information systems, and document exchange networks.

    + * + * @param renderedDocument Path the file system path to the PDF document to encode + * @return String the Base64-encoded representation of the PDF document + * @throws PDFGenerationException if an error occurs during the file reading or encoding process + */ public String convertPDFToBase64(Path renderedDocument) throws PDFGenerationException; + /** + * Flattens interactive form fields in a PDF document to make them non-editable. + * + *

    This method converts all interactive form fields (text fields, checkboxes, radio buttons, etc.) + * in a PDF document into static content, effectively making the document non-editable. This process + * is important for creating final, immutable versions of clinical documents for archival purposes, + * preventing accidental modifications to patient health information.

    + * + *

    Flattening is commonly applied before transmitting documents to external systems or when + * creating permanent records that must remain unchanged for regulatory compliance.

    + * + * @param pdfPath Path the file system path to the PDF document to flatten + * @throws PDFGenerationException if an error occurs during the PDF flattening process + */ public void flattenPDFFormFields(Path pdfPath) throws PDFGenerationException; } diff --git a/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManagerImpl.java b/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManagerImpl.java index 682edea484a..b8af3fad8ff 100644 --- a/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManagerImpl.java +++ b/src/main/java/ca/openosp/openo/documentManager/DocumentAttachmentManagerImpl.java @@ -34,6 +34,35 @@ import java.nio.file.Path; import java.util.*; +/** + * Implementation of the DocumentAttachmentManager interface providing comprehensive document attachment + * and rendering services for OpenO EMR healthcare documents. + * + * This service manages the lifecycle of document attachments across multiple healthcare document types + * including consultation requests, electronic forms (eForms), electronic documents (eDocs), laboratory + * results, hospital reports (HRMs), and clinical encounter forms. It provides functionality for: + * + *
      + *
    • Attaching and retrieving documents from consultation requests and eForms
    • + *
    • Rendering individual documents and composite documents with all attachments as PDF
    • + *
    • Converting documents to Base64 encoding for electronic transmission
    • + *
    • Concatenating multiple PDF documents with proper form field flattening
    • + *
    • Managing version-controlled laboratory results
    • + *
    • Supporting OceanMD eReferral integration for external consultation workflows
    • + *
    + * + * All operations enforce security through privilege checks using SecurityInfoManager to ensure + * healthcare providers have appropriate read/write access to patient health information (PHI). + * The service integrates with multiple healthcare standards including HL7 for lab results and + * supports Canadian provincial healthcare workflows (BC, ON). + * + * @see DocumentAttachmentManager + * @see DocumentType + * @see ConsultationManager + * @see EformDataManager + * @see SecurityInfoManager + * @since 2026-01-24 + */ @Service public class DocumentAttachmentManagerImpl implements DocumentAttachmentManager { @Autowired @@ -61,6 +90,20 @@ public class DocumentAttachmentManagerImpl implements DocumentAttachmentManager // this.eformDataManager = eformDataManager; // } + /** + * Retrieves a list of document IDs attached to a specific consultation request. + * + * This method queries the consultation documents database to find all documents of a specified type + * that are attached to a given consultation request. Security checks ensure the user has read access + * to consultation data for the specified patient. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param requestId Integer the unique identifier of the consultation request + * @param documentType DocumentType the type of documents to retrieve (e.g., DOC, LAB, EFORM, HRM, FORM) + * @param demographicNo Integer the patient's demographic number for security validation + * @return List<String> a list of document IDs as strings attached to the consultation request + * @throws RuntimeException if the user lacks the required "_con" read privilege + */ public List getConsultAttachments(LoggedInInfo loggedInInfo, Integer requestId, DocumentType documentType, Integer demographicNo) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_con", SecurityInfoManager.READ, demographicNo)) { throw new RuntimeException("missing required sec object (_con)"); @@ -74,6 +117,20 @@ public List getConsultAttachments(LoggedInInfo loggedInInfo, Integer req return consultAttachments; } + /** + * Retrieves a list of document IDs attached to a specific electronic form (eForm). + * + * This method queries the eForm documents database to find all documents of a specified type + * that are attached to a given eForm instance. Security checks ensure the user has read access + * to eForm data for the specified patient. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param fdid Integer the unique form data identifier of the eForm + * @param documentType DocumentType the type of documents to retrieve (e.g., DOC, LAB, EFORM, HRM, FORM) + * @param demographicNo Integer the patient's demographic number for security validation + * @return List<String> a list of document IDs as strings attached to the eForm + * @throws RuntimeException if the user lacks the required "_eform" read privilege + */ public List getEFormAttachments(LoggedInInfo loggedInInfo, Integer fdid, DocumentType documentType, Integer demographicNo) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_eform", SecurityInfoManager.READ, demographicNo)) { throw new RuntimeException("missing required sec object (_eform)"); @@ -87,6 +144,20 @@ public List getEFormAttachments(LoggedInInfo loggedInInfo, Integer fdid, return eFormAttachments; } + /** + * Retrieves a list of clinical encounter forms attached to a specific eForm. + * + * This method retrieves the full form objects (not just IDs) for all clinical encounter forms + * that are attached to a given eForm. It first retrieves the list of attached form IDs, then + * filters the patient's complete form list to return only the attached forms. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param fdid Integer the unique form data identifier of the eForm + * @param documentType DocumentType the type of documents to retrieve (typically FORM) + * @param demographicNo Integer the patient's demographic number for security validation + * @return List<EctFormData.PatientForm> a list of PatientForm objects attached to the eForm + * @throws RuntimeException if the user lacks the required "_eform" read privilege + */ public List getFormsAttachedToEForms(LoggedInInfo loggedInInfo, Integer fdid, DocumentType documentType, Integer demographicNo) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_eform", SecurityInfoManager.READ, demographicNo)) { throw new RuntimeException("missing required sec object (_eform)"); @@ -108,8 +179,24 @@ public List getFormsAttachedToEForms(LoggedInInfo logge } /** - * This method is responsible for lab version sorting and is intended for use in the attachment window (attachDocument.jsp). - * In other parts of the application, developers should utilize CommonLabResultData.populateLabResultsData() to access all available lab data. + * Retrieves all laboratory results for a patient, sorted and grouped by version relationships. + * + * This method is specifically designed for the attachment window (attachDocument.jsp) to present + * laboratory results in a user-friendly format where the latest version of each lab is shown with + * its historical versions grouped together. The method performs complex version tracking to ensure + * that amended or corrected lab results are properly linked to their original versions. + * + * The algorithm identifies version relationships between labs (e.g., original, correction, amendment) + * and groups them together, with the latest version as the primary entry and older versions as + * sub-entries. This prevents duplicate selection and provides clear version history. + * + * Note: For general lab data access in other parts of the application, developers + * should use CommonLabResultData.populateLabResultsData() instead. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param demographicNo String the patient's demographic number + * @return List<AttachmentLabResultData> a list of lab results with version information, + * where each entry contains the latest version and a map of its historical versions */ public List getAllLabsSortedByVersions(LoggedInInfo loggedInInfo, String demographicNo) { CommonLabResultData commonLabResultData = new CommonLabResultData(); @@ -169,9 +256,21 @@ public List getAllLabsSortedByVersions(LoggedInInfo log } /** - * This method is intended for use in the attachment window (attachDocument.jsp) and is designed to retrieve a list of eForms except one. - * In other parts of the application, developers are encouraged to use EFormUtil.listPatientEformsCurrent() to access all available eForms. - * The reason for this function is to ensure a user cannot attach an eForm to itself. + * Retrieves all current eForms for a patient, excluding a specified eForm. + * + * This method is specifically designed for the attachment window (attachDocument.jsp) to provide + * a list of available eForms that can be attached to another eForm. The primary purpose is to + * prevent circular references by excluding the target eForm from the list of attachable documents. + * This ensures a user cannot attach an eForm to itself, which would create an invalid relationship. + * + * Note: For general eForm access in other parts of the application, developers + * should use EFormUtil.listPatientEformsCurrent() instead. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param demographicNo Integer the patient's demographic number + * @param fdid Integer the form data identifier of the eForm to exclude from results + * @return List<EFormData> a list of all current eForms for the patient except the specified one + * @throws RuntimeException if the user lacks the required "_eform" read privilege */ public List getAllEFormsExpectFdid(LoggedInInfo loggedInInfo, Integer demographicNo, Integer fdid) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_eform", SecurityInfoManager.READ, demographicNo)) { @@ -190,6 +289,21 @@ public List getAllEFormsExpectFdid(LoggedInInfo loggedInInfo, Integer return allEForms; } + /** + * Attaches documents to a consultation request. + * + * This method creates attachment relationships between specified documents and a consultation request. + * It supports attaching multiple document types (eDocs, labs, eForms, HRMs, forms) to a single + * consultation request, enabling comprehensive patient information sharing for specialist referrals. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param documentType DocumentType the type of documents being attached + * @param attachments String[] an array of document IDs to attach to the consultation + * @param providerNo String the provider number performing the attachment operation + * @param requestId Integer the unique identifier of the consultation request + * @param demographicNo Integer the patient's demographic number for security validation + * @throws RuntimeException if the user lacks the required "_con" write privilege + */ public void attachToConsult(LoggedInInfo loggedInInfo, DocumentType documentType, String[] attachments, String providerNo, Integer requestId, Integer demographicNo) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_con", SecurityInfoManager.WRITE, demographicNo)) { throw new RuntimeException("missing required sec object (_con)"); @@ -199,13 +313,24 @@ public void attachToConsult(LoggedInInfo loggedInInfo, DocumentType documentType documentAttach.attachToConsult(attachments, documentType, providerNo, requestId); } - /* - * @param editOnOcean When editOnOcean is set to false, it signifies a normal consult request, performing just attach or detach operations on the consult request form. - * When editOnOcean is set to true, it signifies that the attach or detach operation is being performed on a consult request created by OceanMD. - * In this case, it will do two things: - * 1. Attach or detach attachments from the consult request. - * 2. Add those new attachments to the 'EreferAttachment' table, so Oscar can sent those attachment to OceanMD. - * By doing this, the user will not have to manually upload new attachments to e-refer. They will be automatically fetched. + /** + * Attaches documents to a consultation request with optional OceanMD eReferral integration. + * + * This method extends the basic consultation attachment functionality to support OceanMD eReferral + * workflows. When editOnOcean is enabled, the method performs dual operations: it attaches documents + * to the consultation request locally and registers them in the EreferAttachment table for automatic + * transmission to OceanMD. This eliminates the need for manual attachment upload to external eReferral + * systems, streamlining the specialist referral process. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param documentType DocumentType the type of documents being attached + * @param attachments String[] an array of document IDs to attach to the consultation + * @param providerNo String the provider number performing the attachment operation + * @param requestId Integer the unique identifier of the consultation request + * @param demographicNo Integer the patient's demographic number for security validation + * @param editOnOcean Boolean when true, registers attachments for OceanMD transmission; + * when false, performs standard local attachment only + * @throws RuntimeException if the user lacks the required "_con" write privilege */ public void attachToConsult(LoggedInInfo loggedInInfo, DocumentType documentType, String[] attachments, String providerNo, Integer requestId, Integer demographicNo, Boolean editOnOcean) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_con", SecurityInfoManager.WRITE, demographicNo)) { @@ -216,6 +341,21 @@ public void attachToConsult(LoggedInInfo loggedInInfo, DocumentType documentType documentAttach.attachToConsult(attachments, documentType, providerNo, requestId); } + /** + * Attaches documents to an electronic form (eForm). + * + * This method creates attachment relationships between specified documents and an eForm instance. + * It enables clinicians to build comprehensive electronic forms by attaching supporting documents + * such as lab results, imaging reports, previous forms, and other clinical documentation. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param documentType DocumentType the type of documents being attached + * @param attachments String[] an array of document IDs to attach to the eForm + * @param providerNo String the provider number performing the attachment operation + * @param fdid Integer the unique form data identifier of the eForm + * @param demographicNo Integer the patient's demographic number for security validation + * @throws RuntimeException if the user lacks the required "_eform" write privilege + */ public void attachToEForm(LoggedInInfo loggedInInfo, DocumentType documentType, String[] attachments, String providerNo, Integer fdid, Integer demographicNo) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_eform", SecurityInfoManager.WRITE, demographicNo)) { throw new RuntimeException("missing required sec object (_eform)"); @@ -225,6 +365,19 @@ public void attachToEForm(LoggedInInfo loggedInInfo, DocumentType documentType, documentAttach.attachToEForm(attachments, documentType, providerNo, fdid); } + /** + * Concatenates multiple PDF documents into a single PDF file with flattened form fields. + * + * This method accepts a list of PDF documents (as Path strings or other compatible objects) and + * merges them into a single consolidated PDF. After concatenation, all PDF form fields are + * flattened to prevent further editing and ensure consistent rendering across different PDF + * viewers. The resulting PDF is saved as a temporary file. + * + * @param pdfDocumentList ArrayList<Object> a list of PDF documents to concatenate, + * where each entry can be a file path string or compatible object + * @return Path the file system path to the generated concatenated PDF file + * @throws PDFGenerationException if an error occurs during PDF concatenation or form field flattening + */ public Path concatPDF(ArrayList pdfDocumentList) throws PDFGenerationException { Path path = null; try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { @@ -237,6 +390,17 @@ public Path concatPDF(ArrayList pdfDocumentList) throws PDFGenerationExc return path; } + /** + * Concatenates multiple PDF documents from Path objects into a single PDF file. + * + * This is a convenience method that converts a list of Path objects to the format required by + * the primary concatPDF method. It then delegates to that method for the actual concatenation + * and form field flattening operations. + * + * @param pdfDocuments List<Path> a list of Path objects pointing to PDF files to concatenate + * @return Path the file system path to the generated concatenated PDF file + * @throws PDFGenerationException if an error occurs during PDF concatenation or form field flattening + */ public Path concatPDF(List pdfDocuments) throws PDFGenerationException { ArrayList pdfDocumentList = new ArrayList<>(); for (Path pdfDocument : pdfDocuments) { @@ -245,22 +409,58 @@ public Path concatPDF(List pdfDocuments) throws PDFGenerationException { return concatPDF(pdfDocumentList); } + /** + * Renders a document to PDF format using HTTP request/response context. + * + * This is a convenience method that delegates to the primary renderDocument method with + * minimal parameters. It is typically used when the document ID is not known in advance + * and will be extracted from the request context. + * + * @param request HttpServletRequest the HTTP request containing document context + * @param response HttpServletResponse the HTTP response for output streaming + * @param documentType DocumentType the type of document to render + * @return Path the file system path to the generated PDF file + * @throws PDFGenerationException if an error occurs during document rendering + */ public Path renderDocument(HttpServletRequest request, HttpServletResponse response, DocumentType documentType) throws PDFGenerationException { return renderDocument(null, request, response, documentType, 0); } /** - * This renderDocument method is written to render EForms, Docs, HRMs and Labs. + * Renders a healthcare document to PDF format based on document type and ID. * - * @param loggedInInfo The LoggedInInfo object. - * @param documentType The type of the document to be rendered. - * @param documentId The documentId integer. - * @return The Path to the rendered document. + * This method provides a unified interface for rendering various types of healthcare documents + * including electronic forms (eForms), electronic documents (eDocs), hospital report manager + * documents (HRMs), and laboratory results (Labs). It delegates to the appropriate specialized + * rendering service based on the document type. + * + * @param loggedInInfo LoggedInInfo the current user's session information + * @param documentType DocumentType the type of document to render (EFORM, DOC, HRM, or LAB) + * @param documentId Integer the unique identifier of the document to render + * @return Path the file system path to the generated PDF file + * @throws PDFGenerationException if an error occurs during document rendering */ public Path renderDocument(LoggedInInfo loggedInInfo, DocumentType documentType, Integer documentId) throws PDFGenerationException { return renderDocument(loggedInInfo, null, null, documentType, documentId); } + /** + * Renders a complete consultation request form with all attached documents as a single PDF. + * + * This method generates a comprehensive consultation package by rendering the consultation request + * form and all its attachments (eForms, eDocs, lab results, HRMs, and clinical forms) into a single + * concatenated PDF document. This is typically used for printing or electronic transmission of + * complete consultation referrals to specialists. + * + * The method retrieves the consultation request ID and demographic ID from request attributes, + * renders the consultation form, fetches all attached documents, renders each attachment to PDF, + * and concatenates everything into a single document with flattened form fields. + * + * @param request HttpServletRequest the HTTP request containing reqId and demographicId attributes + * @param response HttpServletResponse the HTTP response for output streaming + * @return Path the file system path to the generated consolidated PDF file + * @throws PDFGenerationException if an error occurs during rendering or concatenation + */ public Path renderConsultationFormWithAttachments(HttpServletRequest request, HttpServletResponse response) throws PDFGenerationException { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String requestId = (String) request.getAttribute("reqId"); @@ -285,6 +485,23 @@ public Path renderConsultationFormWithAttachments(HttpServletRequest request, Ht return concatPDF(pdfDocumentList); } + /** + * Renders a complete eForm with all attached documents as a single PDF. + * + * This method generates a comprehensive eForm package by rendering the eForm itself and all its + * attachments (other eForms, eDocs, lab results, HRMs, and clinical forms) into a single + * concatenated PDF document. This is typically used for printing, archiving, or electronic + * transmission of complete electronic forms with supporting documentation. + * + * The method retrieves the form data ID (fdid) and demographic ID from request attributes, + * renders the eForm, fetches all attached documents, renders each attachment to PDF, + * and concatenates everything into a single document with flattened form fields. + * + * @param request HttpServletRequest the HTTP request containing fdid and demographicId attributes + * @param response HttpServletResponse the HTTP response for output streaming + * @return Path the file system path to the generated consolidated PDF file + * @throws PDFGenerationException if an error occurs during rendering or concatenation + */ public Path renderEFormWithAttachments(HttpServletRequest request, HttpServletResponse response) throws PDFGenerationException { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String fdid = (String) request.getAttribute("fdid"); @@ -309,6 +526,19 @@ public Path renderEFormWithAttachments(HttpServletRequest request, HttpServletRe return concatPDF(pdfDocumentList); } + /** + * Saves an eForm with all attachments as a permanent electronic document (eDoc). + * + * This method provides eForm archival functionality by rendering the eForm with all its + * attachments as a PDF and saving it as a permanent eDoc in the document management system. + * This is useful for creating immutable snapshots of eForms at specific points in time, + * such as when submitting forms to external systems or archiving completed clinical assessments. + * + * @param request HttpServletRequest the HTTP request containing fdid and demographicId attributes + * @param response HttpServletResponse the HTTP response for output streaming + * @return Integer the unique document ID of the newly created eDoc + * @throws PDFGenerationException if an error occurs during rendering or document creation + */ public Integer saveEFormAsEDoc(HttpServletRequest request, HttpServletResponse response) throws PDFGenerationException { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String fdid = (String) request.getAttribute("fdid"); @@ -317,6 +547,18 @@ public Integer saveEFormAsEDoc(HttpServletRequest request, HttpServletResponse r return eformDataManager.saveEFormWithAttachmentsAsEDoc(loggedInInfo, fdid, demographicId, eFormPath); } + /** + * Converts a PDF document to Base64-encoded string for electronic transmission. + * + * This method reads a PDF file from the file system and encodes it as a Base64 string, + * which is suitable for embedding in JSON/XML payloads, transmitting via web services, + * or storing in text-based databases. This is commonly used for integration with external + * healthcare systems such as provincial eReferral platforms or health information exchanges. + * + * @param renderedDocument Path the file system path to the PDF document to encode + * @return String the Base64-encoded representation of the PDF file, or empty string if path is null + * @throws PDFGenerationException if an error occurs while reading the PDF file + */ public String convertPDFToBase64(Path renderedDocument) throws PDFGenerationException { String base64 = ""; if (renderedDocument == null) { @@ -396,6 +638,20 @@ private String getDisplayLabName(LabResultData labResultData) { return StringUtils.isNullOrEmpty(labTitle) ? "UNLABELLED" : labTitle; } + /** + * Flattens all form fields in a PDF document to prevent further editing. + * + * This method processes a PDF file containing interactive form fields (AcroForm) and flattens + * them by converting the fields into static content. Flattening ensures that form data cannot + * be modified after generation and provides consistent rendering across different PDF viewers + * and platforms. This is particularly important for healthcare documents that must maintain + * data integrity and comply with record-keeping regulations. + * + * The operation modifies the PDF file in place, replacing the original file with the flattened version. + * + * @param pdfPath Path the file system path to the PDF document to flatten + * @throws PDFGenerationException if an error occurs while loading, processing, or saving the PDF file + */ public void flattenPDFFormFields(Path pdfPath) throws PDFGenerationException { try (PDDocument document = PDDocument.load(pdfPath.toFile())) { PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm(); diff --git a/src/main/java/ca/openosp/openo/documentManager/actions/DocumentPreview2Action.java b/src/main/java/ca/openosp/openo/documentManager/actions/DocumentPreview2Action.java index 46647644243..306b16fc1cc 100644 --- a/src/main/java/ca/openosp/openo/documentManager/actions/DocumentPreview2Action.java +++ b/src/main/java/ca/openosp/openo/documentManager/actions/DocumentPreview2Action.java @@ -42,6 +42,23 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action for previewing and rendering medical documents as PDFs in the OpenO EMR system. + * + * This action handles the preview and rendering of various healthcare document types including + * electronic documents (EDocs), electronic forms (EForms), hospital report manager documents (HRM), + * laboratory results, encounter forms, and consultation documents. It provides secure PDF generation + * and delivery for clinical documentation while enforcing path traversal protection to maintain + * PHI (Patient Health Information) security. + * + * The action supports method-based routing via the "method" request parameter to handle different + * document rendering operations and document retrieval workflows. + * + * @since 2026-01-24 + * @see DocumentAttachmentManager + * @see DocumentType + * @see PathValidationUtils + */ public class DocumentPreview2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -51,6 +68,22 @@ public class DocumentPreview2Action extends ActionSupport { private final FormsManager formsManager = SpringUtils.getBean(FormsManager.class); private final ObjectMapper objectMapper = new ObjectMapper(); + /** + * Main execution entry point for the DocumentPreview2Action. + * + * Routes requests to appropriate document handling methods based on the "method" request parameter. + * Supports the following methods: + * - fetchEFormDocuments: Retrieves electronic forms for document selection + * - renderEDocPDF: Renders electronic documents as PDF + * - renderEFormPDF: Renders electronic forms as PDF + * - renderHrmPDF: Renders hospital report manager documents as PDF + * - renderLabPDF: Renders laboratory results as PDF + * - renderFormPDF: Renders encounter forms as PDF + * - renderPDF: Renders arbitrary PDF files with security validation + * - fetchConsultDocuments: Retrieves consultation-related documents (default) + * + * @return String result name for Struts2 result mapping, or null for direct response rendering + */ public String execute() { String method = request.getParameter("method"); @@ -88,6 +121,20 @@ else if (method.equalsIgnoreCase("fetchConsultDocuments")) return fetchConsultDocuments(); } + /** + * Renders an electronic document (EDoc) as a PDF and returns it as base64-encoded JSON. + * + * Retrieves the specified EDoc by ID and generates a PDF representation using the + * DocumentAttachmentManager. The resulting PDF is converted to base64 and returned + * in a JSON response. This method writes directly to the HTTP response and returns + * null to prevent additional view rendering. + * + * Expected request parameters: + * - eDocId: String the unique identifier of the electronic document to render + * + * Response format: JSON object with "base64Data" field containing the PDF data, + * or "errorMessage" field if PDF generation fails. + */ public void renderEDocPDF() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String eDocId = request.getParameter("eDocId"); @@ -100,6 +147,20 @@ public void renderEDocPDF() { } } + /** + * Renders an electronic form (EForm) as a PDF and returns it as base64-encoded JSON. + * + * Retrieves the specified EForm by ID and generates a PDF representation using the + * DocumentAttachmentManager. Electronic forms are structured clinical data entry forms + * used throughout the OpenO EMR system. The resulting PDF is converted to base64 and + * returned in a JSON response. + * + * Expected request parameters: + * - eFormId: String the unique identifier of the electronic form to render + * + * Response format: JSON object with "base64Data" field containing the PDF data, + * or "errorMessage" field if PDF generation fails. + */ public void renderEFormPDF() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String eFormId = request.getParameter("eFormId"); @@ -112,6 +173,20 @@ public void renderEFormPDF() { } } + /** + * Renders a Hospital Report Manager (HRM) document as a PDF and returns it as base64-encoded JSON. + * + * Retrieves the specified HRM document by ID and generates a PDF representation. HRM documents + * contain reports from hospitals and external healthcare facilities, typically including lab + * results, diagnostic imaging reports, and consultation notes from specialists. The resulting + * PDF is converted to base64 and returned in a JSON response. + * + * Expected request parameters: + * - hrmId: String the unique identifier of the HRM document to render + * + * Response format: JSON object with "base64Data" field containing the PDF data, + * or "errorMessage" field if PDF generation fails. + */ public void renderHrmPDF() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String hrmId = request.getParameter("hrmId"); @@ -124,6 +199,20 @@ public void renderHrmPDF() { } } + /** + * Renders a laboratory result document as a PDF and returns it as base64-encoded JSON. + * + * Retrieves the specified lab result by segment ID and generates a PDF representation. + * Laboratory results include HL7-formatted lab reports from provincial lab systems such + * as OLIS (Ontario Laboratory Information System) and other integrated laboratory + * information systems. The resulting PDF is converted to base64 and returned in a JSON response. + * + * Expected request parameters: + * - segmentId: String the unique segment identifier of the laboratory result to render + * + * Response format: JSON object with "base64Data" field containing the PDF data, + * or "errorMessage" field if PDF generation fails. + */ public void renderLabPDF() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String segmentID = request.getParameter("segmentId"); @@ -136,6 +225,18 @@ public void renderLabPDF() { } } + /** + * Renders an encounter form as a PDF and returns it as base64-encoded JSON. + * + * Retrieves and generates a PDF representation of an encounter form (classic form data). + * Encounter forms include various clinical assessment forms such as Rourke growth charts, + * BCAR (British Columbia Antenatal Record), mental health assessments, and other + * province-specific medical forms. The resulting PDF is converted to base64 and returned + * in a JSON response. + * + * Response format: JSON object with "base64Data" field containing the PDF data, + * or "errorMessage" field if PDF generation fails. + */ public void renderFormPDF() { try { Path formPDFPath = documentAttachmentManager.renderDocument(request, response, DocumentType.FORM); @@ -146,6 +247,30 @@ public void renderFormPDF() { } } + /** + * Renders a PDF file from a validated file path and streams it directly to the HTTP response. + * + * This method performs comprehensive security validation to prevent path traversal attacks + * before serving PDF files. It validates that the requested file path exists within allowed + * directories (DOCUMENT_DIR, TMP_DIR, eform_image, or system temp directory) using + * PathValidationUtils. Only files that pass canonical path validation and exist as regular + * files are served. This method is critical for maintaining PHI security and preventing + * unauthorized file access. + * + * Expected request parameters: + * - pdfPath: String the file system path to the PDF file to render + * + * Security measures: + * - Validates path is not empty + * - Resolves canonical path to detect traversal attempts + * - Validates path is within allowed directories using PathValidationUtils + * - Verifies file exists and is a regular file + * - Sets appropriate HTTP status codes (400 for bad requests, 403 for forbidden paths, + * 404 for missing files, 500 for server errors) + * + * Response: Streams PDF content directly with "application/pdf" content type, or sets + * appropriate HTTP error status code if validation fails. + */ public void renderPDF() { String pdfPathString = StringUtils.isNullOrEmpty(request.getParameter("pdfPath")) ? "" : request.getParameter("pdfPath"); @@ -218,6 +343,26 @@ public void renderPDF() { } } + /** + * Fetches all consultation-related documents for a specified patient. + * + * Retrieves comprehensive medical documentation for consultation workflows including + * electronic documents, hospital reports, laboratory results sorted by versions, + * encounter forms, and current electronic forms. The documents are populated as + * request attributes for rendering in the consultation document selection interface. + * + * Expected request parameters: + * - demographicNo: String the patient's demographic number (defaults to "0" if not provided) + * + * Request attributes set: + * - allDocuments: List<EDoc> all electronic documents for the patient + * - allHRMDocuments: ArrayList<HashMap<String,? extends Object>> all HRM documents + * - allLabsSortedByVersions: List<AttachmentLabResultData> lab results sorted by versions + * - allForms: List<EctFormData.PatientForm> all encounter forms + * - allEForms: List<EFormData> all current electronic forms + * + * @return String "fetchDocuments" result name for Struts2 result mapping + */ public String fetchConsultDocuments() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -230,6 +375,27 @@ public String fetchConsultDocuments() { return "fetchDocuments"; } + /** + * Fetches electronic form documents for a specified patient, excluding a specific form. + * + * Retrieves comprehensive medical documentation similar to fetchConsultDocuments, but + * filters out a specific electronic form by form data ID (fdid). This is typically used + * when attaching documents to an existing eForm to prevent self-reference. The documents + * are populated as request attributes for rendering in the document selection interface. + * + * Expected request parameters: + * - demographicNo: String the patient's demographic number (defaults to "0" if not provided) + * - fdid: String the form data ID to exclude from the eForm list (defaults to "0" if not provided) + * + * Request attributes set: + * - allDocuments: List<EDoc> all electronic documents for the patient + * - allHRMDocuments: ArrayList<HashMap<String,? extends Object>> all HRM documents + * - allLabsSortedByVersions: List<AttachmentLabResultData> lab results sorted by versions + * - allForms: List<EctFormData.PatientForm> all encounter forms + * - allEForms: List<EFormData> all electronic forms excluding the specified fdid + * + * @return String "fetchDocuments" result name for Struts2 result mapping + */ public String fetchEFormDocuments() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -243,6 +409,17 @@ public String fetchEFormDocuments() { return "fetchDocuments"; } + /** + * Generates a JSON response containing a base64-encoded PDF document. + * + * Converts the PDF file at the specified path to base64 encoding and wraps it in a JSON + * object for transmission to the client. This method is used by the various renderXXXPDF + * methods to return PDF data in a format suitable for JavaScript-based document viewers. + * + * @param response HttpServletResponse the HTTP response object to write to + * @param pdfPath Path the file system path to the PDF file to encode + * @throws PDFGenerationException if an error occurs during base64 conversion or writing the response + */ private void generateResponse(HttpServletResponse response, Path pdfPath) throws PDFGenerationException { ObjectNode json = objectMapper.createObjectNode(); String base64Data = documentAttachmentManager.convertPDFToBase64(pdfPath); @@ -255,6 +432,16 @@ private void generateResponse(HttpServletResponse response, Path pdfPath) throws } } + /** + * Generates a JSON error response for PDF generation failures. + * + * Creates a JSON object containing the error message and writes it to the HTTP response. + * This method provides consistent error reporting for PDF generation failures across + * all document rendering methods. + * + * @param response HttpServletResponse the HTTP response object to write to + * @param errorMessage String the error message describing the PDF generation failure + */ private void generateResponse(HttpServletResponse response, String errorMessage) { ObjectNode json = objectMapper.createObjectNode(); json.put("errorMessage", errorMessage); diff --git a/src/main/java/ca/openosp/openo/documentManager/actions/ManageDocument2Action.java b/src/main/java/ca/openosp/openo/documentManager/actions/ManageDocument2Action.java index f42e70bacc8..12474595bd9 100644 --- a/src/main/java/ca/openosp/openo/documentManager/actions/ManageDocument2Action.java +++ b/src/main/java/ca/openosp/openo/documentManager/actions/ManageDocument2Action.java @@ -42,8 +42,6 @@ import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.rendering.ImageType; import org.apache.pdfbox.rendering.PDFRenderer; -import org.jpedal.PdfDecoder; -import org.jpedal.fonts.FontMappings; import ca.openosp.openo.PMmodule.caisi_integrator.CaisiIntegratorManager; import ca.openosp.openo.PMmodule.caisi_integrator.IntegratorFallBackManager; import ca.openosp.openo.PMmodule.model.ProgramProvider; @@ -554,9 +552,24 @@ public byte[] createCacheVersion2(Document d, Integer pageNum) { parser.parse(); PDDocument pdf = parser.getPDDocument(); + // Validate page number is within bounds + if (pageNum == null) { + log.error("Page number is null for document " + d.getDocfilename()); + pdf.close(); + return null; + } + + int pageIndex = pageNum - 1; + int totalPages = pdf.getNumberOfPages(); + if (pageIndex < 0 || pageIndex >= totalPages) { + log.error("Invalid page number " + pageNum + " for document " + d.getDocfilename() + " with " + totalPages + " pages"); + pdf.close(); + return null; + } + PDFRenderer rend = new PDFRenderer(pdf); //Page index starts at 0, subtracts 1 to account for that - BufferedImage image = rend.renderImageWithDPI(pageNum - 1, 90, ImageType.RGB); + BufferedImage image = rend.renderImageWithDPI(pageIndex, 96, ImageType.RGB); // write cache file ImageIO.write(image, "png", pngFile.toFile()); @@ -1217,7 +1230,7 @@ public void viewIncomingDocPageAsPdf() throws Exception { ResourceBundle props = ResourceBundle.getBundle("oscarResources", locale); if (pageNum == null) { - pageNum = "0"; + pageNum = "1"; } int pageNumber = Integer.parseInt(pageNum); @@ -1227,8 +1240,21 @@ public void viewIncomingDocPageAsPdf() throws Exception { try { PDDocument reader = PDDocument.load(file); + + // Validate page number is within bounds + int pageIndex = pageNumber - 1; + int totalPages = reader.getNumberOfPages(); + if (pageIndex < 0 || pageIndex >= totalPages) { + log.error("Invalid page number " + pageNumber + " for PDF " + sanitizedPdfName + " with " + totalPages + " pages"); + reader.close(); + response.setContentType("text/html"); + response.getWriter().print(props.getString("dms.incomingDocs.errorInOpening") + Encode.forHtml(sanitizedPdfName)); + response.getWriter().print("
    Invalid page number"); + return; + } + PDDocument extractedPage = new PDDocument(); - extractedPage.addPage(reader.getDocumentCatalog().getPages().get(pageNumber - 1)); + extractedPage.addPage(reader.getDocumentCatalog().getPages().get(pageIndex)); extractedPage.save(response.getOutputStream()); extractedPage.close(); reader.close(); @@ -1359,7 +1385,7 @@ public void viewIncomingDocPageAsImage() throws Exception { } if (pageNum == null) { - pageNum = "0"; + pageNum = "1"; } BufferedInputStream bfis = null; @@ -1433,38 +1459,41 @@ public File createIncomingCacheVersion(String queueId, String pdfDir, String pdf File file = new File(documentDir, sanitizedPdfName); PathValidationUtils.validateExistingPath(file, baseDir); - PdfDecoder decode_pdf = new PdfDecoder(true); - // Re-validate file path at point of use for static analysis visibility File validatedFile = PathValidationUtils.validateExistingPath(file, baseDir); - try (FileInputStream is = new FileInputStream(validatedFile)) { - - FontMappings.setFontReplacements(); - decode_pdf.useHiResScreenDisplay(true); + try (PDDocument document = PDDocument.load(validatedFile)) { + PDFRenderer renderer = new PDFRenderer(document); - decode_pdf.setExtractionMode(0, 96, 96 / 72f); + // Validate page number is within bounds + if (pageNum == null) { + log.error("Page number is null for PDF " + pdfDir + File.separator + sanitizedPdfName); + return null; + } - decode_pdf.openPdfFileFromInputStream(is, false); + int pageIndex = pageNum - 1; + int totalPages = document.getNumberOfPages(); + if (pageIndex < 0 || pageIndex >= totalPages) { + log.error("Invalid page number " + pageNum + " for PDF " + pdfDir + File.separator + sanitizedPdfName + " with " + totalPages + " pages"); + return null; + } - BufferedImage image_to_save = decode_pdf.getPageAsImage(pageNum); + // Render at 96 DPI to match jpedal settings (96 DPI / 72 DPI = 1.33 scale) + // Note: PDFBox uses 0-based page indexing, jpedal uses 1-based + BufferedImage image_to_save = renderer.renderImageWithDPI(pageIndex, 96, ImageType.RGB); // Use sanitized filename for cache file and validate path String cacheFileName = sanitizedPdfName.substring(0, sanitizedPdfName.lastIndexOf('.')) + "_" + pageNum + ".png"; File cacheFile = PathValidationUtils.validatePath(cacheFileName, documentCacheDir); - decode_pdf.getObjectStore().saveStoredImage(cacheFile.getCanonicalPath(), image_to_save, true, false, "png"); - - decode_pdf.flushObjectValues(true); + // Write PNG using standard ImageIO + ImageIO.write(image_to_save, "png", cacheFile); + image_to_save.flush(); return cacheFile; } catch (Exception e) { - log.error("Error decoding pdf file " + pdfDir + sanitizedPdfName); + log.error("Error decoding pdf file " + pdfDir + File.separator + sanitizedPdfName, e); return null; - } finally { - if (decode_pdf != null) { - decode_pdf.closePdfFile(); - } } } diff --git a/src/main/java/ca/openosp/openo/eform/EFormLoader.java b/src/main/java/ca/openosp/openo/eform/EFormLoader.java index d1975c59b71..fbf235b45a8 100644 --- a/src/main/java/ca/openosp/openo/eform/EFormLoader.java +++ b/src/main/java/ca/openosp/openo/eform/EFormLoader.java @@ -27,7 +27,7 @@ package ca.openosp.openo.eform; import ca.openosp.OscarProperties; -import org.apache.commons.digester.Digester; +import org.apache.commons.digester3.Digester; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.Logger; import ca.openosp.openo.utility.MiscUtils; diff --git a/src/main/java/ca/openosp/openo/eform/EformLogError2Action.java b/src/main/java/ca/openosp/openo/eform/EformLogError2Action.java index 6478f5e2ee2..e622e2ddf81 100644 --- a/src/main/java/ca/openosp/openo/eform/EformLogError2Action.java +++ b/src/main/java/ca/openosp/openo/eform/EformLogError2Action.java @@ -10,10 +10,57 @@ import org.jsoup.internal.StringUtil; import org.apache.commons.text.StringEscapeUtils; +/** + * Struts2 action for logging errors that occur during eForm processing. + * + *

    This action provides a silent logging mechanism for eForm errors without + * returning any user-facing response. It receives error details via HTTP parameters, + * sanitizes the error message to prevent XSS vulnerabilities, and persists the + * error information to the eForm error log.

    + * + *

    This is a 2Action class following the OpenO EMR Struts2 migration pattern, + * designed to coexist with legacy Struts 1.x actions during the framework transition.

    + * + *

    Security Features:

    + *
      + *
    • Validates formId is numeric to prevent injection attacks
    • + *
    • Sanitizes error messages using HTML entity encoding via StringEscapeUtils
    • + *
    • Performs null and empty checks on the formId parameter
    • + *
    + * + * @see EFormUtil#logError(int, String) + * @see com.opensymphony.xwork2.ActionSupport + * @since 2026-01-24 + */ public class EformLogError2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); + /** + * Processes and logs eForm errors received via HTTP request parameters. + * + *

    This method extracts the form ID and error message from the request, + * validates the form ID is numeric, sanitizes the error message to prevent + * cross-site scripting (XSS) attacks, and persists the error to the eForm + * error log. The action returns null to indicate no view should be rendered, + * making this a silent logging operation suitable for AJAX calls.

    + * + *

    Expected Request Parameters:

    + *
      + *
    • formId (String) - The numeric identifier of the eForm that encountered an error
    • + *
    • error (String) - The error message to be logged
    • + *
    + * + *

    Validation Rules:

    + *
      + *
    • formId must be non-null, non-empty, and numeric
    • + *
    • If validation fails, the error is silently ignored (no logging occurs)
    • + *
    • Error message is sanitized using HTML4 entity encoding
    • + *
    + * + * @return String Always returns null to prevent view rendering + * @throws Exception if an error occurs during error logging or parameter processing + */ public String execute() throws Exception { String formId = request.getParameter("formId"); String error = request.getParameter("error"); diff --git a/src/main/java/ca/openosp/openo/email/action/EmailCompose2Action.java b/src/main/java/ca/openosp/openo/email/action/EmailCompose2Action.java index 1019f969f49..7a888b53299 100644 --- a/src/main/java/ca/openosp/openo/email/action/EmailCompose2Action.java +++ b/src/main/java/ca/openosp/openo/email/action/EmailCompose2Action.java @@ -25,6 +25,53 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action for composing and preparing email messages with patient-related attachments. + * + * This action handles the preparation of email composition screens for sending electronic forms (eForms), + * documents, laboratory results, and other patient health information via email. It manages session-based + * email composition data, prepares attachments with optional PDF encryption, retrieves patient email consent + * status, and validates recipient information before presenting the compose interface. + * + * Key Features: + *
      + *
    • Prepares email composition interface for eForms and patient documents
    • + *
    • Manages session-based email composition state (survives redirects)
    • + *
    • Handles multiple attachment types: eForms, eDocuments, lab results, forms, HRM documents
    • + *
    • Generates and manages PDF password encryption for patient privacy
    • + *
    • Validates patient email consent status before sending
    • + *
    • Retrieves and validates recipient email addresses
    • + *
    • Sanitizes attachment filenames for security
    • + *
    • Validates numeric form ID (fid) parameters to prevent injection attacks
    • + *
    + * + * Healthcare Context: + * This action is part of OpenO EMR's secure patient communication system, ensuring that Protected Health + * Information (PHI) is transmitted with appropriate encryption, consent verification, and audit logging. + * It supports PIPEDA/HIPAA compliance by enforcing patient consent for email communications and providing + * password-protected PDF attachments based on patient demographic data. + * + * Session Management: + * The action retrieves email composition parameters from the HTTP session (allowing for redirect-based + * workflows) and transfers them to request attributes for JSP rendering. Session attributes are cleaned + * up after transfer to prevent stale data accumulation. + * + * Security Considerations: + *
      + *
    • Validates fid parameter to ensure numeric format (prevents injection)
    • + *
    • Uses OWASP Encode.forJava() for sanitizing invalid fid values in logs
    • + *
    • Generates patient-specific PDF passwords based on demographic information
    • + *
    • Sanitizes attachment filenames through EmailComposeManager
    • + *
    • Session cleanup prevents information leakage across requests
    • + *
    + * + * @see ca.openosp.openo.managers.EmailComposeManager + * @see ca.openosp.openo.managers.DemographicManager + * @see ca.openosp.openo.commn.model.EmailAttachment + * @see ca.openosp.openo.commn.model.EmailConfig + * @see ca.openosp.openo.commn.model.EmailLog.TransactionType + * @since 2026-01-24 + */ public class EmailCompose2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -46,10 +93,108 @@ public class EmailCompose2Action extends ActionSupport { }; + /** + * Executes the default action for email composition. + * + * This method serves as the main entry point for the Struts2 action and delegates to + * prepareComposeEFormMailer() to handle the email composition preparation logic. + * + * @return String the Struts2 result name, either "compose" for successful preparation + * or "eFormError" if PDF generation fails + * @see #prepareComposeEFormMailer() + */ public String execute() { return prepareComposeEFormMailer(); } + /** + * Prepares the email composition interface with patient information, attachments, and email settings. + * + * This method orchestrates the complete email composition preparation workflow: + *
      + *
    1. Retrieves email composition parameters from HTTP session (survives redirects)
    2. + *
    3. Validates form ID (fid) parameter for numeric format to prevent injection
    4. + *
    5. Retrieves patient email consent status and validates consent settings
    6. + *
    7. Fetches patient demographic information for recipient name display
    8. + *
    9. Retrieves and validates recipient email addresses (separates valid/invalid)
    10. + *
    11. Loads available sender email account configurations
    12. + *
    13. Generates PDF password encryption based on patient demographics if not already set
    14. + *
    15. Prepares all attachment types: eForms, eDocuments, labs, forms, HRM documents
    16. + *
    17. Sanitizes attachment filenames for security
    18. + *
    19. Transfers session data to request attributes for JSP rendering
    20. + *
    21. Cleans up session attributes to prevent stale data
    22. + *
    + * + * Session Attributes Retrieved: + *
      + *
    • attachEFormItSelf (Boolean) - whether to attach the eForm itself
    • + *
    • fdid (String) - form data ID for the eForm
    • + *
    • demographicId (String) - patient demographic identifier (required)
    • + *
    • emailPDFPassword (String) - password for PDF encryption
    • + *
    • emailPDFPasswordClue (String) - hint for PDF password
    • + *
    • attachedDocuments (String[]) - array of document IDs to attach
    • + *
    • attachedLabs (String[]) - array of lab result IDs to attach
    • + *
    • attachedForms (String[]) - array of form IDs to attach
    • + *
    • attachedEForms (String[]) - array of eForm IDs to attach
    • + *
    • attachedHRMDocuments (String[]) - array of HRM document IDs to attach
    • + *
    • senderEmail (String) - sender email address
    • + *
    • subjectEmail (String) - email subject line
    • + *
    • bodyEmail (String) - email message body
    • + *
    • encryptedMessageEmail (String) - encrypted message content
    • + *
    • emailPatientChartOption (String) - patient chart email option setting
    • + *
    + * + * Request Parameters: + *
      + *
    • fid (String, optional) - form identifier, validated for numeric format
    • + *
    + * + * Request Attributes Set: + *
      + *
    • transactionType (TransactionType) - set to EFORM for transaction logging
    • + *
    • emailConsentName (String) - patient consent form name
    • + *
    • emailConsentStatus (String) - patient email consent status (Yes/No)
    • + *
    • receiverName (String) - formatted patient name for display
    • + *
    • receiverEmailList (List) - list of valid recipient email addresses
    • + *
    • invalidReceiverEmailList (List) - list of invalid email addresses
    • + *
    • senderAccounts (List<EmailConfig>) - available sender account configurations
    • + *
    • emailPDFPassword (String) - generated or existing PDF password
    • + *
    • emailPDFPasswordClue (String) - password hint for recipient
    • + *
    • demographicId (String) - patient demographic identifier
    • + *
    • fdid (String) - form data ID
    • + *
    • fid (String) - validated form ID or null if invalid
    • + *
    + * + * Session Attributes Set: + *
      + *
    • emailAttachmentList (List<EmailAttachment>) - prepared and sanitized attachments
    • + *
    + * + * Security Features: + *
      + *
    • Validates fid parameter with regex pattern to ensure numeric format only
    • + *
    • Logs warnings for invalid fid values using OWASP-encoded output
    • + *
    • Generates patient-specific PDF passwords: YYYYMMDD (DOB) + 10-digit HIN
    • + *
    • Sanitizes all attachment filenames to prevent path traversal attacks
    • + *
    • Verifies patient email consent before allowing composition
    • + *
    • Cleans up session attributes after transfer to prevent information leakage
    • + *
    + * + * Error Handling: + * If PDF generation fails for any attachment (eForm, document, lab, form, HRM), the method + * returns the "eFormError" result with a descriptive error message. This prevents incomplete + * emails from being composed when required attachments cannot be generated. + * + * @return String the Struts2 result name: "compose" for successful preparation, + * "eFormError" if PDF generation fails for any attachment + * @see ca.openosp.openo.managers.EmailComposeManager#getEmailConsentStatus(LoggedInInfo, Integer) + * @see ca.openosp.openo.managers.EmailComposeManager#getRecipients(LoggedInInfo, Integer) + * @see ca.openosp.openo.managers.EmailComposeManager#createEmailPDFPassword(LoggedInInfo, Integer) + * @see ca.openosp.openo.managers.EmailComposeManager#prepareEFormAttachments(LoggedInInfo, String, String[]) + * @see ca.openosp.openo.managers.EmailComposeManager#sanitizeAttachments(List) + * @see #cleanupEmailSessionAttributes(HttpServletRequest) + * @see #emailComposeError(HttpServletRequest, String) + */ public String prepareComposeEFormMailer() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -156,6 +301,27 @@ protected static void cleanupEmailSessionAttributes(HttpServletRequest request) } } + /** + * Handles email composition errors by setting error message and returning error result. + * + * This method is called when email composition preparation fails, typically due to PDF generation + * errors for attachments. It sets the error message as a request attribute for display on the + * error page. + * + * Common Error Scenarios: + *
      + *
    • PDF generation failure for eForms, documents, or forms
    • + *
    • Missing or inaccessible attachment files
    • + *
    • File I/O errors during attachment preparation
    • + *
    • Encryption errors for PDF password protection
    • + *
    + * + * @param request HttpServletRequest the HTTP servlet request to store the error message + * @param errorMessage String the error message to display to the user, typically includes + * the specific exception message from PDFGenerationException + * @return String the Struts2 result name "eFormError" which maps to the error display page + * @see ca.openosp.openo.utility.PDFGenerationException + */ private String emailComposeError(HttpServletRequest request, String errorMessage) { request.setAttribute("errorMessage", errorMessage); return "eFormError"; diff --git a/src/main/java/ca/openosp/openo/email/action/EmailSend2Action.java b/src/main/java/ca/openosp/openo/email/action/EmailSend2Action.java index dfebfa17f14..ec42e814ffe 100644 --- a/src/main/java/ca/openosp/openo/email/action/EmailSend2Action.java +++ b/src/main/java/ca/openosp/openo/email/action/EmailSend2Action.java @@ -21,6 +21,36 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action controller for handling email sending functionality within the OpenO EMR system. + * + *

    This action supports multiple email sending workflows including:

    + *
      + *
    • Sending emails directly with healthcare data and attachments
    • + *
    • Sending electronic forms (EForms) via email with optional deletion after send
    • + *
    • Handling email encryption and password protection for PHI compliance
    • + *
    • Managing email attachments from session storage
    • + *
    • Canceling email operations and redirecting to source contexts
    • + *
    + * + *

    The action integrates with the EmailManager service for core email functionality and + * EformDataManager for electronic form handling. All email operations are logged via + * EmailLog entities for audit trail and compliance purposes.

    + * + *

    This action follows the 2Action pattern for Struts2 migration, using method-based + * routing via the "method" request parameter to handle different email workflows within + * a single action class.

    + * + *

    Security Considerations: This action handles Protected Health Information (PHI) + * and supports encryption for both email bodies and attachments. All operations are performed + * within the context of a logged-in provider using LoggedInInfo.

    + * + * @since 2026-01-24 + * @see ca.openosp.openo.managers.EmailManager + * @see ca.openosp.openo.managers.EformDataManager + * @see ca.openosp.openo.commn.model.EmailLog + * @see ca.openosp.openo.email.core.EmailData + */ public class EmailSend2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -29,6 +59,19 @@ public class EmailSend2Action extends ActionSupport { private EmailManager emailManager = SpringUtils.getBean(EmailManager.class); private EformDataManager eformDataManager = SpringUtils.getBean(EformDataManager.class); + /** + * Main execution method that routes to specific email handling methods based on the "method" request parameter. + * + *

    This method implements method-based routing for the following email workflows:

    + *
      + *
    • sendDirectEmail - Sends email directly without EForm context
    • + *
    • cancel - Cancels email operation and redirects to source
    • + *
    • default - Sends email with EForm context (if no method parameter specified)
    • + *
    + * + * @return String Struts2 result identifier - "success" for successful email operations, + * or transaction type name for cancel operations + */ public String execute () { if ("sendDirectEmail".equals(request.getParameter("method"))) { return sendDirectEmail(); @@ -38,7 +81,22 @@ public String execute () { return sendEFormEmail(); } - + /** + * Sends an email with electronic form (EForm) context and optionally deletes the EForm after successful send. + * + *

    This method handles the complete workflow for emailing EForms including:

    + *
      + *
    • Processing email send operation via EmailManager
    • + *
    • Optionally deleting the source EForm if send is successful and deletion is requested
    • + *
    • Setting request attributes for success status, EForm opening preference, and email log
    • + *
    + * + *

    The method checks the "deleteEFormAfterEmail" request parameter to determine if the + * EForm should be removed after successful email delivery. This is useful for workflows + * where the EForm is a temporary artifact used only for email generation.

    + * + * @return String Struts2 SUCCESS result for rendering the email result page + */ public String sendEFormEmail() { boolean deleteEFormAfterEmail = request.getParameter("deleteEFormAfterEmail") != null && "true".equalsIgnoreCase(request.getParameter("deleteEFormAfterEmail")); @@ -56,6 +114,21 @@ public String sendEFormEmail() { return SUCCESS; } + /** + * Sends an email directly without electronic form (EForm) context. + * + *

    This method provides a simplified email sending workflow for scenarios where + * the email is not associated with an EForm. It handles:

    + *
      + *
    • Processing the email send operation via EmailManager
    • + *
    • Setting request attributes for success status and email log
    • + *
    + * + *

    Unlike sendEFormEmail(), this method does not handle EForm deletion or opening + * preferences, making it suitable for general-purpose email sending within the EMR.

    + * + * @return String Struts2 SUCCESS result for rendering the email result page + */ public String sendDirectEmail() { EmailLog emailLog = sendEmail(request); boolean isEmailSuccessful = emailLog.getStatus() == EmailStatus.SUCCESS; @@ -64,6 +137,23 @@ public String sendDirectEmail() { return SUCCESS; } + /** + * Cancels the email operation and redirects the user back to the appropriate source context. + * + *

    This method handles the cancel workflow by:

    + *
      + *
    • Preparing email fields from the request (to determine transaction type)
    • + *
    • Performing context-specific redirects based on the transaction type
    • + *
    • For EFORM transactions: redirects to the EForm display page with original form data
    • + *
    + * + *

    The method uses the transaction type from the email data to determine the + * appropriate return destination, ensuring users are returned to their original + * workflow context when canceling an email operation.

    + * + * @return String Struts2 result identifier matching the transaction type name + * @throws RuntimeException if IOException occurs during redirect for EFORM transactions + */ public String cancel() { EmailData emailData = prepareEmailFields(request); String emailRedirect = emailData.getTransactionType().name(); @@ -77,12 +167,48 @@ public String cancel() { return emailRedirect; } + /** + * Sends an email using the EmailManager service with data extracted from the HTTP request. + * + *

    This private helper method coordinates the email sending process by:

    + *
      + *
    • Retrieving logged-in provider information from the session
    • + *
    • Preparing email data from request parameters via prepareEmailFields()
    • + *
    • Delegating to EmailManager for actual email transmission
    • + *
    + * + * @param request HttpServletRequest containing email parameters and session data + * @return EmailLog entity containing the result of the email send operation including + * status (SUCCESS/FAILURE), timestamps, and any error messages + */ private EmailLog sendEmail(HttpServletRequest request) { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); EmailData emailData = prepareEmailFields(request); return emailManager.sendEmail(loggedInInfo, emailData); } + /** + * Extracts and prepares email data from HTTP request parameters and session attributes. + * + *

    This private helper method performs comprehensive email data preparation including:

    + *
      + *
    • Extracting sender and recipient email addresses
    • + *
    • Retrieving subject, body, and internal comment fields
    • + *
    • Processing encryption settings (email body and attachment encryption)
    • + *
    • Handling password protection parameters (password and password clue)
    • + *
    • Retrieving patient chart display options and demographic information
    • + *
    • Extracting transaction type and additional URL parameters
    • + *
    • Retrieving email attachments from session storage
    • + *
    • Cleaning up session by removing attachment list after extraction
    • + *
    + * + *

    The method supports PHI protection through encryption options and associates + * emails with specific healthcare providers and patients for audit trail purposes.

    + * + * @param request HttpServletRequest containing email form parameters and session data + * @return EmailData populated data transfer object containing all email parameters + * ready for processing by EmailManager + */ private EmailData prepareEmailFields(HttpServletRequest request) { String senderConfigId = request.getParameter("senderConfigId"); String[] receiverEmails = request.getParameterValues("receiverEmailAddress"); diff --git a/src/main/java/ca/openosp/openo/email/admin/ManageEmails2Action.java b/src/main/java/ca/openosp/openo/email/admin/ManageEmails2Action.java index fafb2e6d850..d17aa479bf7 100644 --- a/src/main/java/ca/openosp/openo/email/admin/ManageEmails2Action.java +++ b/src/main/java/ca/openosp/openo/email/admin/ManageEmails2Action.java @@ -26,6 +26,37 @@ import java.util.ArrayList; import java.util.List; +/** + * Struts2 action for managing and administering emails in the OpenO EMR system. + * + * This action handles the email management interface in the Admin section, providing + * functionality for viewing, searching, filtering, and resending previously sent patient + * emails. It supports comprehensive email log management including status tracking, + * sender filtering, date range queries, and patient-specific email history. + * + *

    Key healthcare functionalities:

    + *
      + *
    • Email log retrieval with multi-criteria filtering (status, sender, date range, patient)
    • + *
    • Email resend capability with full attachment and encryption reconstruction
    • + *
    • Support for various document types (eForms, eDocs, Labs, HRM reports, clinical forms)
    • + *
    • Email status management and resolution tracking
    • + *
    • Patient consent verification and email validation
    • + *
    + * + *

    This is a method-based Struts2 action following the 2Action pattern, routing + * requests via the "method" parameter to different handler methods. The main entry + * point {@link #execute()} delegates to specialized methods based on the requested operation.

    + * + *

    Security: All operations respect the _email security privilege and maintain + * audit trails through the LoggedInInfo context.

    + * + * @see EmailManager + * @see EmailComposeManager + * @see EmailLog + * @see EmailAttachment + * @see DocumentAttachmentManager + * @since 2026-01-24 + */ public class ManageEmails2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -38,6 +69,22 @@ public class ManageEmails2Action extends ActionSupport { private final FormsManager formsManager = SpringUtils.getBean(FormsManager.class); private final SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); + /** + * Main entry point for the ManageEmails2Action, routing requests to appropriate handler methods. + * + * This method examines the "method" parameter from the HTTP request and delegates to + * the corresponding method handler. Supported methods include "fetchEmails" for retrieving + * email logs based on search criteria, and "resendEmail" for preparing a previously sent + * email for resending. + * + * If no method parameter is provided or the method is not recognized, defaults to displaying + * the email management interface via {@link #showEmailManager()}. + * + * @return String Struts2 result name ("show", "emailstatus", "compose", or null for errors) + * @see #fetchEmails() + * @see #resendEmail() + * @see #showEmailManager() + */ public String execute() { String mtd = request.getParameter("method"); if ("fetchEmails".equals(mtd)) { @@ -49,16 +96,47 @@ public String execute() { return showEmailManager(); } + /** + * Displays the email management interface with available email statuses and sender accounts. + * + * This method prepares the initial view for the email management page by populating + * request attributes with all possible email statuses (SENT, FAILED, PENDING, RESOLVED) + * and the list of configured sender email accounts. This data is used to populate + * the filter dropdowns on the email management interface. + * + * The email management interface allows administrators to search and filter sent emails + * by various criteria including status, sender, date range, and patient. + * + * @return String Struts2 result name "show" to display the email management page + * @see EmailStatus + * @see EmailConfig + */ public String showEmailManager() { request.setAttribute("emailStatusList", EmailStatus.values()); request.setAttribute("senderAccountList", emailComposeManager.getAllSenderAccounts()); return "show"; } - /* - * This method is being called from the 'Admin > Emails > Manage Emails' page, when user clicks on the 'Fetch Emails' button - * On that page, the sender email address and status are dropdowns. - * The '-1' option is the default option, and '-1' means 'All'. + /** + * Retrieves and filters email logs based on specified search criteria. + * + * This method is invoked from the 'Admin > Emails > Manage Emails' page when the user + * clicks the 'Fetch Emails' button. It supports multi-criteria filtering including + * email status, sender email address, date range (begin/end), and specific patient + * demographic number. + * + * Special handling for default values: The value '-1' in dropdown fields (emailStatus + * and senderEmailAddress) represents 'All' and is converted to null to retrieve all + * records without that filter applied. Empty or "null" string values for demographic_no + * are also normalized to null. + * + * The method delegates to {@link EmailManager#getEmailStatusByDateDemographicSenderStatus} + * to retrieve matching email records and populates the request with the results for + * display on the email status results page. + * + * @return String Struts2 result name "emailstatus" to display filtered email results + * @see EmailManager#getEmailStatusByDateDemographicSenderStatus + * @see EmailStatusResult */ public String fetchEmails() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -84,6 +162,20 @@ public String fetchEmails() { return "emailstatus"; } + /** + * Marks a specific email log entry as resolved. + * + * This method updates the status of an email log to RESOLVED, typically used when + * an administrator has addressed a failed or problematic email. The method validates + * the provided log ID to ensure it is a valid integer before processing. + * + * If the log ID is invalid (not an integer), the method returns a JSON error response + * to the client and does not modify any data. Upon successful validation, the email + * status is updated via {@link EmailManager#updateEmailStatus}. + * + * @see EmailManager#updateEmailStatus + * @see EmailStatus#RESOLVED + */ public void setResolved() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String emailLogId = request.getParameter("logId"); @@ -95,9 +187,35 @@ public void setResolved() { } /** - * This method is called from the 'Admin > Emails > Manage Emails' section. - * When a user clicks on the 'Resend' email button from any of the sent emails, Oscar will call this method. - * Using this method and the emailLog ID (on which the user clicked Resend), it prepares for the email compose page. + * Prepares a previously sent email for resending by reconstructing its full state. + * + * This method is invoked from the 'Admin > Emails > Manage Emails' section when a user + * clicks the 'Resend' button on a specific email log entry. It retrieves the original + * email details and reconstructs all associated data including attachments, encryption + * settings, patient information, and sender configuration. + * + * The method performs the following operations: + *
      + *
    • Validates the email log ID parameter
    • + *
    • Retrieves the original email log via {@link EmailComposeManager#prepareEmailForResend}
    • + *
    • Refreshes all email attachments by re-rendering PDF documents
    • + *
    • Retrieves patient consent status and email addresses
    • + *
    • Populates request attributes for the email compose page
    • + *
    + * + * If PDF regeneration fails for any attachment, an error message is set and the user + * is advised to create a new email instead of resending. The method returns null in + * case of validation errors (invalid log ID). + * + * All email data including encryption settings, password protection, chart display options, + * and additional parameters are preserved from the original email for potential modification + * before resending. + * + * @return String Struts2 result name "compose" to display the email composition page, or null if validation fails + * @see EmailComposeManager#prepareEmailForResend + * @see #refreshEmailAttachments + * @see EmailLog + * @see TransactionType#DIRECT */ public String resendEmail() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -149,6 +267,41 @@ public String resendEmail() { return "compose"; } + /** + * Refreshes email attachments by re-rendering documents to PDF format. + * + * This private helper method processes all attachments associated with an email log, + * regenerating PDF versions of various document types. It is used when resending emails + * to ensure that all attachments are current and accessible. + * + * The method handles the following document types: + *
      + *
    • EFORM - Electronic forms rendered to PDF
    • + *
    • DOC - Electronic documents rendered to PDF
    • + *
    • LAB - Laboratory results rendered to PDF
    • + *
    • HRM - Hospital Report Manager reports rendered to PDF
    • + *
    • FORM - Clinical forms rendered to PDF
    • + *
    + * + * For each attachment, the method: + *
      + *
    1. Renders the document to PDF using the appropriate manager
    2. + *
    3. Updates the attachment's file path to the newly generated PDF
    4. + *
    5. Calculates and updates the file size
    6. + *
    + * + * Security: Verifies the user has READ privilege for _email before processing. + * + * @param request HttpServletRequest containing the user session with LoggedInInfo + * @param response HttpServletResponse for potential error handling + * @param emailLog EmailLog containing the list of attachments to refresh + * @return List the updated list of email attachments with refreshed PDF paths and sizes + * @throws PDFGenerationException if any document cannot be rendered to PDF + * @throws RuntimeException if the user lacks required _email security privilege + * @see DocumentAttachmentManager#renderDocument + * @see FormsManager#renderForm + * @see DocumentType + */ private List refreshEmailAttachments(HttpServletRequest request, HttpServletResponse response, EmailLog emailLog) throws PDFGenerationException { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.READ, null)) { diff --git a/src/main/java/ca/openosp/openo/email/core/EmailSender.java b/src/main/java/ca/openosp/openo/email/core/EmailSender.java index cc5904c75f1..9c01f2f833a 100644 --- a/src/main/java/ca/openosp/openo/email/core/EmailSender.java +++ b/src/main/java/ca/openosp/openo/email/core/EmailSender.java @@ -18,6 +18,36 @@ import ca.openosp.openo.utility.MiscUtils; import ca.openosp.openo.utility.SpringUtils; +/** + * Core email sending service for OpenO EMR that handles healthcare-related email communications. + * + *

    This class provides a unified interface for sending emails through multiple delivery methods + * (SMTP and API-based) and providers (local SMTP, external SMTP, SendGrid). It enforces security + * checks to ensure only authorized users can send emails, which is critical in a healthcare context + * to prevent unauthorized access to patient information and maintain HIPAA/PIPEDA compliance.

    + * + *

    The EmailSender supports:

    + *
      + *
    • SMTP-based email delivery (both local and external providers)
    • + *
    • API-based email delivery (SendGrid)
    • + *
    • Email attachments for sharing medical documents and reports
    • + *
    • Security privilege checking to ensure proper authorization
    • + *
    • Comprehensive logging for audit trails
    • + *
    + * + *

    All email operations require the user to have the "_email" security privilege with WRITE access. + * This ensures that only authorized healthcare providers and staff can send emails containing + * potentially sensitive patient health information (PHI).

    + * + * @see EmailConfig + * @see EmailData + * @see EmailAttachment + * @see SMTPEmailSender + * @see LocalSMTPEmailSender + * @see APISendGridEmailSender + * @see SecurityInfoManager + * @since 2026-01-24 + */ public class EmailSender { private final Logger logger = MiscUtils.getLogger(); private LoggedInInfo loggedInInfo; @@ -31,9 +61,26 @@ public class EmailSender { private String additionalParams; private List attachments; + /** + * Private no-argument constructor to prevent direct instantiation without required parameters. + * + *

    This constructor is not intended for use. EmailSender instances must be created with + * appropriate configuration and email data using one of the public constructors.

    + */ private EmailSender() { } + /** + * Constructs an EmailSender with email data encapsulated in an EmailData object. + * + *

    This constructor is the preferred way to create an EmailSender when you have + * all email parameters collected in an EmailData object. It extracts recipients, + * subject, body, attachments, and additional parameters from the EmailData instance.

    + * + * @param loggedInInfo LoggedInInfo containing the current user's session information and provider context + * @param emailConfig EmailConfig defining the email provider and delivery method (SMTP or API) + * @param emailData EmailData containing all email content and recipient information + */ public EmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, EmailData emailData) { this.loggedInInfo = loggedInInfo; this.emailConfig = emailConfig; @@ -44,6 +91,20 @@ public EmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, EmailData this.additionalParams = emailData.getAdditionalParams(); } + /** + * Constructs an EmailSender with individual email parameters. + * + *

    This constructor allows direct specification of email recipients, subject, body, and + * attachments without encapsulating them in an EmailData object. Use this when you have + * individual email parameters readily available and don't need additional parameters.

    + * + * @param loggedInInfo LoggedInInfo containing the current user's session information and provider context + * @param emailConfig EmailConfig defining the email provider and delivery method (SMTP or API) + * @param recipients String array of email addresses to receive the email + * @param subject String containing the email subject line + * @param body String containing the email body content (supports HTML and plain text) + * @param attachments List of EmailAttachment objects to include with the email, or null if no attachments + */ public EmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] recipients, String subject, String body, List attachments) { this.loggedInInfo = loggedInInfo; this.emailConfig = emailConfig; @@ -53,6 +114,22 @@ public EmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] this.attachments = attachments; } + /** + * Constructs an EmailSender with individual email parameters including additional parameters. + * + *

    This is the most comprehensive constructor, allowing specification of all email parameters + * including additional provider-specific parameters. The additionalParams field can be used to + * pass configuration options specific to certain email providers (e.g., SendGrid template IDs, + * tracking settings, or custom headers).

    + * + * @param loggedInInfo LoggedInInfo containing the current user's session information and provider context + * @param emailConfig EmailConfig defining the email provider and delivery method (SMTP or API) + * @param recipients String array of email addresses to receive the email + * @param subject String containing the email subject line + * @param body String containing the email body content (supports HTML and plain text) + * @param additionalParams String containing provider-specific additional parameters, or null if not needed + * @param attachments List of EmailAttachment objects to include with the email, or null if no attachments + */ public EmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] recipients, String subject, String body, String additionalParams, List attachments) { this.loggedInInfo = loggedInInfo; this.emailConfig = emailConfig; @@ -63,6 +140,29 @@ public EmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] this.additionalParams = additionalParams; } + /** + * Sends the email using the configured provider and delivery method. + * + *

    This method performs security validation to ensure the current user has the "_email" + * privilege with WRITE access before attempting to send. This is critical for HIPAA/PIPEDA + * compliance as it prevents unauthorized users from sending emails that may contain + * patient health information (PHI).

    + * + *

    The email is dispatched based on the configured email type:

    + *
      + *
    • SMTP: Uses either LocalSMTPEmailSender for local providers or + * SMTPEmailSender for external SMTP servers
    • + *
    • API: Delegates to sendAPIMail() which handles API-based providers + * like SendGrid
    • + *
    + * + *

    All email sending operations are logged for audit trail purposes, which is required + * for healthcare compliance and security monitoring.

    + * + * @throws RuntimeException if the current user lacks the required "_email" security privilege + * @throws EmailSendingException if there is an error during email transmission, including + * invalid configuration, network issues, authentication failures, or provider-specific errors + */ public void send() throws EmailSendingException { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -89,6 +189,25 @@ public void send() throws EmailSendingException { } } + /** + * Sends email using API-based providers. + * + *

    This private helper method handles email delivery through API-based email services + * rather than traditional SMTP. It routes the email to the appropriate provider-specific + * sender implementation based on the configured email provider.

    + * + *

    Currently supported API providers:

    + *
      + *
    • SendGrid: Uses the SendGrid Web API for email delivery with + * support for templates, tracking, and advanced features
    • + *
    + * + *

    This method is called internally by send() when the email configuration specifies + * an API-based delivery method.

    + * + * @throws EmailSendingException if the configured provider is not supported or if there + * is an error during API-based email transmission + */ private void sendAPIMail() throws EmailSendingException { switch (emailConfig.getEmailProvider()) { case SENDGRID: diff --git a/src/main/java/ca/openosp/openo/email/core/EmailStatusResult.java b/src/main/java/ca/openosp/openo/email/core/EmailStatusResult.java index 7d7aa74124d..8de651dbf32 100644 --- a/src/main/java/ca/openosp/openo/email/core/EmailStatusResult.java +++ b/src/main/java/ca/openosp/openo/email/core/EmailStatusResult.java @@ -9,6 +9,26 @@ import ca.openosp.openo.commn.model.EmailLog.EmailStatus; +/** + * Represents the result of an email status query in the OpenO EMR email system. + * + *

    This class encapsulates comprehensive information about an email transaction including + * sender details, recipient information, healthcare provider context, encryption status, + * delivery status, and timestamps. It is primarily used for tracking and displaying + * email communication history within the healthcare environment.

    + * + *

    The class supports natural ordering based on email creation timestamps through + * the Comparable interface, allowing chronological sorting of email status records.

    + * + *

    Healthcare Context: Email communications in OpenO EMR may contain + * Protected Health Information (PHI) and require encryption and audit logging. This class + * tracks encryption status and maintains comprehensive audit information including provider + * associations and delivery status.

    + * + * @see ca.openosp.openo.commn.model.EmailLog + * @see ca.openosp.openo.commn.model.EmailLog.EmailStatus + * @since 2026-01-23 + */ public class EmailStatusResult implements Comparable { private Integer logId; private String subject; @@ -26,9 +46,31 @@ public class EmailStatusResult implements Comparable { private String errorMessage; private Date created; + /** + * Default constructor for creating an empty EmailStatusResult instance. + */ public EmailStatusResult() { } + /** + * Constructs a fully populated EmailStatusResult with all email transaction details. + * + * @param logId Integer the unique identifier for the email log entry + * @param subject String the email subject line + * @param senderFirstName String the first name of the email sender + * @param senderLastName String the last name of the email sender + * @param senderEmail String the email address of the sender + * @param recipientFirstName String the first name of the email recipient + * @param recipientLastName String the last name of the email recipient + * @param recipientEmail String the email address of the recipient (may contain multiple addresses separated by semicolons) + * @param providerFirstName String the first name of the associated healthcare provider + * @param providerLastName String the last name of the associated healthcare provider + * @param isEncrypted boolean flag indicating whether the email was encrypted + * @param password String the encryption password (if applicable) + * @param status EmailStatus the current delivery status of the email + * @param errorMessage String any error message associated with failed delivery (may be null) + * @param created Date the timestamp when the email was created/sent + */ public EmailStatusResult(Integer logId, String subject, String senderFirstName, String senderLastName, String senderEmail, String recipientFirstName, String recipientLastName, String recipientEmail, String providerFirstName, String providerLastName, boolean isEncrypted, String password, EmailStatus status, @@ -50,173 +92,415 @@ public EmailStatusResult(Integer logId, String subject, String senderFirstName, this.created = created; } + /** + * Gets the unique identifier for the email log entry. + * + * @return Integer the log ID + */ public Integer getLogId() { return logId; } + /** + * Sets the unique identifier for the email log entry. + * + * @param logId Integer the log ID to set + */ public void setLogId(Integer logId) { this.logId = logId; } + /** + * Gets the email subject line. + * + * @return String the email subject + */ public String getSubject() { return subject; } + /** + * Sets the email subject line. + * + * @param subject String the email subject to set + */ public void setSubject(String subject) { this.subject = subject; } + /** + * Gets the sender's first name. + * + * @return String the sender's first name + */ public String getSenderFirstName() { return senderFirstName; } + /** + * Sets the sender's first name. + * + * @param senderFirstName String the sender's first name to set + */ public void setSenderFirstName(String senderFirstName) { this.senderFirstName = senderFirstName; } + /** + * Gets the sender's last name. + * + * @return String the sender's last name + */ public String getSenderLastName() { return senderLastName; } + /** + * Sets the sender's last name. + * + * @param senderLastName String the sender's last name to set + */ public void setSenderLastName(String senderLastName) { this.senderLastName = senderLastName; } + /** + * Gets the sender's full name formatted as "FirstName LastName" in camel case. + * + * @return String the formatted sender's full name + */ public String getSenderFullName() { return toCamelCase(senderFirstName) + " " + toCamelCase(senderLastName); } + /** + * Sets both the sender's first and last names. + * + * @param senderFirstName String the sender's first name to set + * @param senderLastName String the sender's last name to set + */ public void setSenderFullName(String senderFirstName, String senderLastName) { this.senderFirstName = senderFirstName; this.senderLastName = senderLastName; } + /** + * Gets the sender's email address. + * + * @return String the sender's email address + */ public String getSenderEmail() { return senderEmail; } + /** + * Sets the sender's email address. + * + * @param senderEmail String the sender's email address to set + */ public void setSenderEmail(String senderEmail) { this.senderEmail = senderEmail; } + /** + * Gets the recipient's first name. + * + * @return String the recipient's first name + */ public String getRecipientFirstName() { return recipientFirstName; } + /** + * Sets the recipient's first name. + * + * @param recipientFirstName String the recipient's first name to set + */ public void setRecipientFirstName(String recipientFirstName) { this.recipientFirstName = recipientFirstName; } + /** + * Gets the recipient's last name. + * + * @return String the recipient's last name + */ public String getRecipientLastName() { return recipientLastName; } + /** + * Sets the recipient's last name. + * + * @param recipientLastName String the recipient's last name to set + */ public void setRecipientLastName(String recipientLastName) { this.recipientLastName = recipientLastName; } + /** + * Gets the recipient's full name formatted as "FirstName LastName" in camel case. + * + * @return String the formatted recipient's full name + */ public String getRecipientFullName() { return toCamelCase(recipientFirstName) + " " + toCamelCase(recipientLastName); } + /** + * Sets both the recipient's first and last names. + * + * @param recipientFirstName String the recipient's first name to set + * @param recipientLastName String the recipient's last name to set + */ public void setRecipientFullName(String recipientFirstName, String recipientLastName) { this.recipientFirstName = recipientFirstName; this.recipientLastName = recipientLastName; } + /** + * Gets the associated healthcare provider's first name. + * + * @return String the provider's first name + */ public String getProviderFirstName() { return providerFirstName; } + /** + * Sets the associated healthcare provider's first name. + * + * @param providerFirstName String the provider's first name to set + */ public void setProviderFirstName(String providerFirstName) { this.providerFirstName = providerFirstName; } + /** + * Gets the associated healthcare provider's last name. + * + * @return String the provider's last name + */ public String getProviderLastName() { return providerLastName; } + /** + * Sets the associated healthcare provider's last name. + * + * @param providerLastName String the provider's last name to set + */ public void setProviderLastName(String providerLastName) { this.providerLastName = providerLastName; } + /** + * Gets the provider's full name formatted as "LastName, FirstName" in camel case. + * + * @return String the formatted provider's full name + */ public String getProviderFullName() { return toCamelCase(providerLastName) + ", " + toCamelCase(providerFirstName); } + /** + * Sets both the provider's first and last names. + * + * @param providerFirstName String the provider's first name to set + * @param providerLastName String the provider's last name to set + */ public void setProviderFullName(String providerFirstName, String providerLastName) { this.providerFirstName = providerFirstName; this.providerLastName = providerLastName; } + /** + * Gets the recipient's email address. + * + * @return String the recipient's email address (may contain multiple addresses separated by commas) + */ public String getRecipientEmail() { return recipientEmail; } + /** + * Sets the recipient's email address, converting semicolon separators to comma-space format. + * + *

    This method automatically converts semicolon-separated email addresses to + * comma-separated format for display purposes.

    + * + *

    Note: This normalization behavior differs from the constructor, + * which assigns the recipientEmail value directly without conversion. When using the + * constructor, ensure email addresses are pre-formatted or call this setter afterward + * if normalization is required.

    + * + * @param recipientEmail String the recipient's email address to set (may contain semicolon-separated addresses) + * @throws NullPointerException if recipientEmail is null + */ public void setRecipientEmail(String recipientEmail) { this.recipientEmail = recipientEmail.replace(";", ", "); } + /** + * Gets the encryption status of the email. + * + * @return boolean true if the email was encrypted, false otherwise + */ public boolean getIsEncrypted() { return isEncrypted; } + /** + * Sets the encryption status of the email. + * + * @param isEncrypted boolean true if the email is encrypted, false otherwise + */ public void setIsEncrypted(boolean isEncrypted) { this.isEncrypted = isEncrypted; } + /** + * Gets the encryption password. + * + *

    Security Note: This password is used for email encryption in a + * healthcare context where emails may contain PHI. Handle this value with appropriate + * security measures: do not log it, avoid exposing it in error messages, and clear it + * from memory when no longer needed.

    + * + * @return String the encryption password (may be null if not encrypted) + */ public String getPassword() { return password; } + /** + * Sets the encryption password. + * + *

    Security Note: This password is used for email encryption in a + * healthcare context where emails may contain PHI. Ensure this value is handled + * securely and not logged or exposed in error messages.

    + * + * @param password String the encryption password to set + */ public void setPassword(String password) { this.password = password; } + /** + * Gets the current delivery status of the email. + * + * @return EmailStatus the email delivery status + */ public EmailStatus getStatus() { return status; } + /** + * Sets the delivery status of the email. + * + * @param status EmailStatus the email delivery status to set + */ public void setStatus(EmailStatus status) { this.status = status; } + /** + * Gets any error message associated with failed email delivery. + * + * @return String the error message, or null if no error occurred + */ public String getErrorMessage() { return errorMessage; } + /** + * Sets the error message for failed email delivery. + * + * @param errorMessage String the error message to set + */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } + /** + * Gets the timestamp when the email was created/sent. + * + * @return Date the creation timestamp + */ public Date getCreated() { return created; } + /** + * Sets the timestamp when the email was created/sent. + * + * @param created Date the creation timestamp to set + */ public void setCreated(Date created) { this.created = created; } + /** + * Gets the creation date formatted as "yyyy-MM-dd". + * + * @return String the formatted creation date + * @throws NullPointerException if the created timestamp is null + */ public String getCreatedDate() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); return dateFormat.format(created); } + /** + * Gets the creation time formatted as "HH:mm:ss". + * + * @return String the formatted creation time + * @throws NullPointerException if the created timestamp is null + */ public String getCreatedTime() { SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss"); return timeFormat.format(created); } + /** + * Gets the creation timestamp formatted as an ISO 8601 local date-time string. + * + * @return String the ISO 8601 formatted creation timestamp + * @throws NullPointerException if the created timestamp is null + */ public String getCreatedStringDate() { LocalDateTime createdLocalDateTime = created.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; return createdLocalDateTime.format(formatter); } + /** + * Converts a string to Title Case format (first letter uppercase, rest lowercase). + * + *

    Note: Despite the method name, this produces Title Case + * (e.g., "Firstname") rather than true camelCase (e.g., "firstName"). This is + * the expected behavior for formatting person names in this class.

    + * + * @param inputString String the input string to convert + * @return String the Title Case formatted string + * @throws NullPointerException if inputString is null + * @throws StringIndexOutOfBoundsException if inputString is empty + */ private String toCamelCase(String inputString) { return Character.toUpperCase(inputString.charAt(0)) + inputString.substring(1).toLowerCase(); } + /** + * Compares this EmailStatusResult with another based on creation timestamp. + * + *

    This method enables chronological sorting of email status records, + * with earlier emails comparing as less than later emails.

    + * + * @param other EmailStatusResult the EmailStatusResult to compare with + * @return int a negative integer, zero, or a positive integer as this email + * was created before, at the same time as, or after the specified email + * @throws NullPointerException if other is null, or if either this.created or other.created is null + */ @Override public int compareTo(EmailStatusResult other) { // Compare based on the timestamp diff --git a/src/main/java/ca/openosp/openo/email/helpers/APISendGridEmailSender.java b/src/main/java/ca/openosp/openo/email/helpers/APISendGridEmailSender.java index e8139e7e725..8a93c787654 100644 --- a/src/main/java/ca/openosp/openo/email/helpers/APISendGridEmailSender.java +++ b/src/main/java/ca/openosp/openo/email/helpers/APISendGridEmailSender.java @@ -31,6 +31,31 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +/** + * SendGrid API-based email sender for OpenO EMR healthcare system. + * + * This class provides functionality to send emails through the SendGrid Web API v3, + * supporting healthcare-specific requirements including security privilege checks, + * SSL/TLS encryption, and file attachments. All email operations are subject to + * HIPAA/PIPEDA compliance requirements and require appropriate security permissions. + * + * The implementation uses Apache HttpClient with SSL context for secure communication + * with SendGrid's API endpoint. Email content is serialized to JSON format according + * to SendGrid's API specification, supporting multiple recipients, HTML/plain text + * content, and Base64-encoded file attachments. + * + * Security considerations: + * - Requires _email WRITE privilege for all send operations + * - API keys are stored in EmailConfig and must be protected + * - SSL client authentication is enabled for enhanced security + * - PHI data in email content must be appropriately secured + * + * @see EmailConfig + * @see EmailAttachment + * @see SecurityInfoManager + * @see ca.openosp.openo.utility.EmailSendingException + * @since 2026-01-24 + */ public class APISendGridEmailSender { private static final ObjectMapper objectMapper = new ObjectMapper(); @@ -45,9 +70,29 @@ public class APISendGridEmailSender { private String DEFAULT_END_POINT = "https://api.sendgrid.com/v3/mail/send"; private List attachments; + /** + * Private no-argument constructor to prevent instantiation without required parameters. + */ private APISendGridEmailSender() { } + /** + * Constructs an APISendGridEmailSender with email parameters and attachments. + * + * This constructor initializes the email sender with all required parameters for + * sending emails through SendGrid's API. The logged-in user information is used + * for security privilege checks to ensure the user has permission to send emails. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information, + * used for security privilege validation + * @param emailConfig EmailConfig the email configuration containing sender details, + * API credentials, and SendGrid endpoint information + * @param recipients String[] array of recipient email addresses in RFC 5322 format + * @param subject String the email subject line + * @param body String the email body content (plain text format) + * @param attachments List<EmailAttachment> list of file attachments to include + * in the email, may be empty but not null + */ public APISendGridEmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] recipients, String subject, String body, List attachments) { this.loggedInInfo = loggedInInfo; this.emailConfig = emailConfig; @@ -57,6 +102,25 @@ public APISendGridEmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig this.attachments = attachments; } + /** + * Constructs an APISendGridEmailSender with email parameters, additional parameters, and attachments. + * + * This extended constructor includes support for additional custom parameters that may be + * required for specific SendGrid API features or custom email processing requirements. + * The logged-in user information is used for security privilege checks. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information, + * used for security privilege validation + * @param emailConfig EmailConfig the email configuration containing sender details, + * API credentials, and SendGrid endpoint information + * @param recipients String[] array of recipient email addresses in RFC 5322 format + * @param subject String the email subject line + * @param body String the email body content (plain text format) + * @param additionalParams String additional custom parameters for SendGrid API, + * may be null if not required + * @param attachments List<EmailAttachment> list of file attachments to include + * in the email, may be empty but not null + */ public APISendGridEmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] recipients, String subject, String body, String additionalParams, List attachments) { this.loggedInInfo = loggedInInfo; this.emailConfig = emailConfig; @@ -67,6 +131,30 @@ public APISendGridEmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig this.attachments = attachments; } + /** + * Sends the email through SendGrid's Web API v3 with security validation. + * + * This method performs the following operations: + * 1. Validates that the logged-in user has _email WRITE privilege + * 2. Establishes an SSL/TLS connection to SendGrid's API endpoint + * 3. Constructs the email JSON payload according to SendGrid API specification + * 4. Transmits the email via HTTP POST request with Bearer token authentication + * 5. Validates the HTTP response status code + * + * The method uses Apache HttpClient with custom SSL context configuration that + * enables client authentication for enhanced security. All attachments are + * Base64-encoded before transmission. + * + * HIPAA/PIPEDA Compliance Note: Ensure that any Protected Health Information (PHI) + * included in email content is appropriately secured and that transmission is + * authorized under applicable privacy regulations. + * + * @throws EmailSendingException if the user lacks required security privileges, + * if SSL context initialization fails, if the HTTP + * request fails (status code >= 400), if API credentials + * are invalid, or if attachment encoding fails + * @throws RuntimeException if the logged-in user does not have _email WRITE privilege + */ public void send() throws EmailSendingException { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required sec object (_email)"); diff --git a/src/main/java/ca/openosp/openo/email/helpers/SMTPEmailSender.java b/src/main/java/ca/openosp/openo/email/helpers/SMTPEmailSender.java index dd4fd7445e6..5d3dac918c0 100644 --- a/src/main/java/ca/openosp/openo/email/helpers/SMTPEmailSender.java +++ b/src/main/java/ca/openosp/openo/email/helpers/SMTPEmailSender.java @@ -24,6 +24,33 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +/** + * SMTP email sender for OpenO EMR healthcare system. + * + *

    Provides secure email transmission functionality with TLS encryption for + * healthcare communications. This class handles the construction and delivery + * of email messages with support for attachments, ensuring all email operations + * comply with security requirements through privilege checks.

    + * + *

    The sender uses JavaMailSender with configurable SMTP settings extracted + * from EmailConfig objects. All email transmissions require the _email write + * privilege.

    + * + *

    Features:

    + *
      + *
    • TLS 1.2 encryption for secure transmission
    • + *
    • Multi-recipient support
    • + *
    • File attachment handling
    • + *
    • Security privilege validation
    • + *
    • Configurable SMTP server settings
    • + *
    + * + * @see ca.openosp.openo.commn.model.EmailConfig + * @see ca.openosp.openo.commn.model.EmailAttachment + * @see ca.openosp.openo.utility.EmailSendingException + * @see ca.openosp.openo.managers.SecurityInfoManager + * @since 2026-01-24 + */ public class SMTPEmailSender { private final Logger logger = MiscUtils.getLogger(); private LoggedInInfo loggedInInfo; @@ -37,9 +64,26 @@ public class SMTPEmailSender { private String body; private List attachments; + /** + * Private default constructor to prevent instantiation without required parameters. + */ private SMTPEmailSender() { } + /** + * Constructs an SMTP email sender with all required email components. + * + *

    Initializes a new email sender instance with the specified configuration, + * recipients, subject, body content, and optional attachments. The logged-in + * user context is required for security privilege validation during send operations.

    + * + * @param loggedInInfo LoggedInInfo the current user's session information for security validation + * @param emailConfig EmailConfig the SMTP server configuration including host, port, and credentials + * @param recipients String[] array of recipient email addresses + * @param subject String the email subject line + * @param body String the email body content (plain text) + * @param attachments List<EmailAttachment> optional list of file attachments, may be null + */ public SMTPEmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, String[] recipients, String subject, String body, List attachments) { this.loggedInInfo = loggedInInfo; this.emailConfig = emailConfig; @@ -49,6 +93,20 @@ public SMTPEmailSender(LoggedInInfo loggedInInfo, EmailConfig emailConfig, Strin this.attachments = attachments; } + /** + * Sends the configured email message via SMTP with TLS encryption. + * + *

    Validates user privileges, creates a TLS-enabled mail sender, constructs + * a MIME message with the configured subject, body, and attachments, and + * transmits the message to all specified recipients.

    + * + *

    Security: Requires the _email write privilege. Throws RuntimeException + * if the user lacks required permissions.

    + * + * @throws EmailSendingException if email transmission fails due to network errors, + * invalid configuration, authentication failure, or attachment processing errors + * @throws RuntimeException if the user lacks required _email write privilege + */ public void send() throws EmailSendingException { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -69,6 +127,27 @@ public void send() throws EmailSendingException { } } + /** + * Creates a JavaMailSender configured for TLS-encrypted SMTP transmission. + * + *

    Parses the EmailConfig's JSON configuration to extract SMTP server settings + * (host, port, username, password) and constructs a JavaMailSenderImpl with + * TLS 1.2 encryption enabled. The mail sender is configured with SMTP authentication + * and requires STARTTLS for secure transmission.

    + * + *

    SMTP Properties configured:

    + *
      + *
    • Transport protocol: smtp
    • + *
    • SMTP authentication: enabled
    • + *
    • STARTTLS: enabled and required
    • + *
    • SSL protocol: TLSv1.2
    • + *
    • Debug mode: disabled
    • + *
    + * + * @param emailConfig EmailConfig the email configuration containing JSON-encoded SMTP settings + * @return JavaMailSender configured mail sender instance ready for message transmission + * @throws EmailSendingException if the configuration JSON is invalid or missing required fields + */ protected JavaMailSender createTLSMailSender(EmailConfig emailConfig) throws EmailSendingException { JavaMailSenderImpl mailSender = new JavaMailSenderImpl(); ObjectMapper objectMapper = new ObjectMapper(); @@ -99,6 +178,18 @@ protected JavaMailSender createTLSMailSender(EmailConfig emailConfig) throws Ema return mailSender; } + /** + * Attaches files to the email message being constructed. + * + *

    Iterates through the provided list of EmailAttachment objects and adds + * each file to the MIME message using the MimeMessageHelper. If the attachments + * list is null, no action is taken.

    + * + * @param helper MimeMessageHelper the message helper for adding attachments to the MIME message + * @param attachments List<EmailAttachment> list of file attachments to add, may be null + * @throws MessagingException if attachment processing fails due to invalid file paths + * or I/O errors when accessing attachment files + */ private void addAttachments(MimeMessageHelper helper, List attachments) throws MessagingException { if (attachments == null) { return; diff --git a/src/main/java/ca/openosp/openo/email/util/EmailNoteUtil.java b/src/main/java/ca/openosp/openo/email/util/EmailNoteUtil.java index 4abb1d6f1b8..f32d90eec12 100644 --- a/src/main/java/ca/openosp/openo/email/util/EmailNoteUtil.java +++ b/src/main/java/ca/openosp/openo/email/util/EmailNoteUtil.java @@ -32,6 +32,32 @@ import ca.openosp.openo.lab.ca.on.LabResultData; import ca.openosp.openo.util.StringUtils; +/** + * Utility class for generating clinical notes from email communications in the OpenO EMR system. + * + *

    This class handles the creation of comprehensive clinical notes from {@link EmailLog} objects, + * which represent email communications between healthcare providers and patients. The generated notes + * include email content, encryption information, attachments (eForms, documents, lab results, HRM documents, + * and forms), and technical metadata for audit trail purposes.

    + * + *

    Key features:

    + *
      + *
    • Formats email subject, body, and metadata into clinical note format
    • + *
    • Handles encrypted email content with password clues
    • + *
    • Processes multiple attachment types (eForms, documents, labs, HRM, forms)
    • + *
    • Supports secure handling of Protected Health Information (PHI)
    • + *
    • Provides formatted date/time stamps for audit trails
    • + *
    • Supports internal comments for provider-to-provider communication
    • + *
    + * + *

    The utility generates notes in a standardized format that includes email content, + * encryption details, attached clinical documents, technical metadata, and internal comments.

    + * + * @see EmailLog + * @see EmailAttachment + * @see LoggedInInfo + * @since 2026-01-23 + */ public class EmailNoteUtil { private EmailLog emailLog; private LoggedInInfo loggedInInfo; @@ -44,15 +70,54 @@ public class EmailNoteUtil { private FormsManager formsManager = SpringUtils.getBean(FormsManager.class); private ProviderExtDao providerExtDao = SpringUtils.getBean(ProviderExtDao.class); + /** + * Private default constructor to prevent instantiation without required parameters. + */ private EmailNoteUtil() { } + /** + * Constructs an EmailNoteUtil instance for generating clinical notes from email communications. + * + *

    This constructor initializes the utility with the logged-in user's context and the email log + * to be processed. It also initializes the {@link CommonLabResultData} instance for processing + * laboratory result attachments.

    + * + * @param loggedInInfo {@link LoggedInInfo} the logged-in user's session information, used for + * accessing healthcare provider context and security credentials + * @param emailLog {@link EmailLog} the email communication record containing subject, body, + * recipients, attachments, encryption information, and metadata + * @since 2026-01-23 + */ public EmailNoteUtil(LoggedInInfo loggedInInfo, EmailLog emailLog) { this.emailLog = emailLog; this.loggedInInfo = loggedInInfo; this.commonLabResultData = new CommonLabResultData(); } + /** + * Generates a comprehensive clinical note from the email log data. + * + *

    This method constructs a formatted clinical note that includes all relevant information + * from the email communication. The note follows a standardized structure to ensure consistency + * across the EMR system and compliance with healthcare documentation requirements.

    + * + *

    The generated note includes:

    + *
      + *
    • Email subject and body content
    • + *
    • Encryption information including password clues when applicable
    • + *
    • Attached clinical documents (eForms, documents, labs, HRM documents, and forms) + * with identifiers, dates, and encryption details
    • + *
    • Technical metadata for audit trail (sender, recipients, timestamp, log ID)
    • + *
    • Internal provider-to-provider comments when configured for display
    • + *
    + * + *

    The method processes multiple clinical document types and includes appropriate metadata + * for each attachment to support clinical workflows and regulatory compliance.

    + * + * @return String the formatted clinical note ready for insertion into the patient's chart + * @since 2026-01-23 + */ public String createNote() { StringBuilder noteBuilder = new StringBuilder(); addHeader(emailLog, noteBuilder); diff --git a/src/main/java/ca/openosp/openo/encounter/oceanEReferal/pageUtil/ERefer2Action.java b/src/main/java/ca/openosp/openo/encounter/oceanEReferal/pageUtil/ERefer2Action.java index a02fbddb19a..5e88c7db84a 100644 --- a/src/main/java/ca/openosp/openo/encounter/oceanEReferal/pageUtil/ERefer2Action.java +++ b/src/main/java/ca/openosp/openo/encounter/oceanEReferal/pageUtil/ERefer2Action.java @@ -23,6 +23,44 @@ import com.opensymphony.xwork2.ActionSupport; import org.apache.struts2.ServletActionContext; +/** + * Struts2 action for managing Ocean eReferral consultation attachments. + *

    + * This action handles the attachment and editing of medical documents (including clinical documents, + * lab results, eforms, and hospital report manager records) to Ocean eReferral consultation requests. + * Ocean eReferral is an integrated healthcare referral management system used in Ontario for + * electronic specialist referrals. This action specifically manages the association of internal + * OpenO EMR documents with outgoing referral requests. + *

    + *

    + * The action supports two primary operations via method-based routing: + *

    + *
      + *
    • attachOceanEReferralConsult - Creates new eReferral attachment records linking + * internal documents to a demographic (patient) for referral purposes
    • + *
    • editOceanEReferralConsult - Updates existing consultation requests by attaching + * additional documents organized by document type
    • + *
    + *

    + * Document attachments are categorized by type using single-character prefixes: + *

    + *
      + *
    • D - Clinical documents (Document Manager)
    • + *
    • L - Laboratory results
    • + *
    • E - Electronic forms (eForms)
    • + *
    • H - Hospital Report Manager records
    • + *
    + *

    + * This is a 2Action implementation following OpenO EMR's Struts2 migration pattern, + * coexisting with legacy Struts 1.x actions during the framework transition. + *

    + * + * @see EReferAttachment + * @see EReferAttachmentData + * @see DocumentAttachmentManager + * @see EReferAttachmentDao + * @since 2026-01-24 + */ public class ERefer2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -30,6 +68,22 @@ public class ERefer2Action extends ActionSupport { private static final Logger logger = MiscUtils.getLogger(); private final DocumentAttachmentManager documentAttachmentManager = SpringUtils.getBean(DocumentAttachmentManager.class); + /** + * Main execution method for this Struts2 action. + *

    + * Routes incoming requests to the appropriate handler method based on the "method" request parameter. + * Supports method-based routing pattern common in OpenO EMR's 2Action implementations. + *

    + *

    + * Supported method parameter values: + *

    + *
      + *
    • attachOceanEReferralConsult - Routes to {@link #attachOceanEReferralConsult()}
    • + *
    • editOceanEReferralConsult - Routes to {@link #editOceanEReferralConsult()}
    • + *
    + * + * @return String always returns {@link ActionSupport#SUCCESS} regardless of routing or execution outcome + */ public String execute() { String method = request.getParameter("method"); @@ -43,9 +97,45 @@ else if (method.equalsIgnoreCase("editOceanEReferralConsult")) return SUCCESS; } - // Documents (attachments) originate from the consult request window. - // Users can attach these documents using the attachment GUI on the consult request form. - // All documents are internal to Oscar. + /** + * Creates new eReferral attachment records for Ocean consultation requests. + *

    + * This method processes document attachments selected from the consultation request window's + * attachment GUI. All documents originate from OpenO EMR's internal document management system + * and are associated with a specific patient (demographic) for inclusion in an outgoing + * Ocean eReferral. + *

    + *

    + * The method expects a pipe-delimited (|) string of document identifiers in the format + * {type}{id}, where: + *

    + *
      + *
    • type - Single character prefix indicating document type (D/L/E/H)
    • + *
    • id - Numeric identifier for the specific document
    • + *
    + *

    + * Example document string: D123|L456|E789 would attach document 123, + * lab result 456, and eform 789. + *

    + *

    + * Upon successful creation, the generated eReferral attachment ID is written to the + * HTTP response output stream for client-side processing. + *

    + *

    + * Request Parameters: + *

    + *
      + *
    • demographicNo - String representation of the patient's demographic number (required)
    • + *
    • documents - Pipe-delimited String of document identifiers in {type}{id} format (required)
    • + *
    + *

    + * If either required parameter is missing or empty, the method returns silently without + * processing or error reporting. + *

    + *

    + * Response: Writes the newly created EReferAttachment ID as a String to the HTTP response + *

    + */ public void attachOceanEReferralConsult() { String demographicNo = StringUtils.isNullOrEmpty(request.getParameter("demographicNo")) ? "" : request.getParameter("demographicNo"); String documents = StringUtils.isNullOrEmpty(request.getParameter("documents")) ? "" : request.getParameter("documents"); @@ -73,9 +163,49 @@ public void attachOceanEReferralConsult() { } } - // Documents (attachments) originate from the consult request window. - // Users can attach these documents using the attachment GUI on the consult request form. - // All documents are internal to Oscar. + /** + * Updates an existing Ocean eReferral consultation request by attaching additional documents. + *

    + * This method processes document attachments from the consultation request window's attachment GUI + * and associates them with an existing consultation request. Documents are organized by type + * and attached using the {@link DocumentAttachmentManager} to ensure proper linkage with the + * consultation, provider, and patient records. + *

    + *

    + * The method parses a pipe-delimited (|) string of document identifiers, categorizes them by + * type prefix, and then performs batch attachment operations for each document category: + *

    + *
      + *
    • D - Clinical documents (DOC) from Document Manager
    • + *
    • L - Laboratory results (LAB)
    • + *
    • E - Electronic forms (EFORM)
    • + *
    • H - Hospital Report Manager records (HRM)
    • + *
    + *

    + * Example document string: D123|D456|L789|E101 would attach two clinical documents, + * one lab result, and one eform to the consultation. + *

    + *

    + * All attachments are marked as active (Boolean.TRUE) and associated with the logged-in provider, + * specified consultation request, and patient demographic. + *

    + *

    + * Request Parameters: + *

    + *
      + *
    • demographicNo - String representation of the patient's demographic number (required)
    • + *
    • requestId - String representation of the consultation request ID (required)
    • + *
    • documents - Pipe-delimited String of document identifiers in {type}{id} format (required)
    • + *
    + *

    + * If any required parameter is missing or empty, the method returns silently without + * processing or error reporting. + *

    + *

    + * Session Requirements: Requires valid {@link LoggedInInfo} in HTTP session to identify + * the provider performing the attachment operation. + *

    + */ public void editOceanEReferralConsult() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String providerNo = loggedInInfo.getLoggedInProviderNo(); diff --git a/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/bean/EctStyleSheetBeanHandler.java b/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/bean/EctStyleSheetBeanHandler.java index f7f887ee627..63b5b8a6bf2 100644 --- a/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/bean/EctStyleSheetBeanHandler.java +++ b/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/bean/EctStyleSheetBeanHandler.java @@ -27,10 +27,10 @@ import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Vector; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.commn.dao.MeasurementCSSLocationDao; import ca.openosp.openo.commn.model.MeasurementCSSLocation; import ca.openosp.openo.utility.SpringUtils; @@ -47,7 +47,7 @@ public EctStyleSheetBeanHandler() { public boolean init() { MeasurementCSSLocationDao dao = SpringUtils.getBean(MeasurementCSSLocationDao.class); List ms = dao.findAll(); - Collections.sort(ms, new BeanComparator("id")); + Collections.sort(ms, Comparator.comparing(MeasurementCSSLocation::getId)); for (MeasurementCSSLocation l : ms) { EctStyleSheetBean location = new EctStyleSheetBean(l.getLocation(), l.getId()); styleSheetNameVector.add(location); diff --git a/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/util/EctFindMeasurementTypeUtil.java b/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/util/EctFindMeasurementTypeUtil.java index 5c79dcde8d9..b6cde7b91a4 100755 --- a/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/util/EctFindMeasurementTypeUtil.java +++ b/src/main/java/ca/openosp/openo/encounter/oscarMeasurements/util/EctFindMeasurementTypeUtil.java @@ -27,7 +27,7 @@ import java.io.InputStream; import java.util.Vector; -import org.apache.commons.digester.Digester; +import org.apache.commons.digester3.Digester; import ca.openosp.openo.commn.dao.MeasurementTypeDao; import ca.openosp.openo.commn.model.MeasurementType; import ca.openosp.openo.utility.MiscUtils; diff --git a/src/main/java/ca/openosp/openo/encounter/pageUtil/EctDisplayEHR2Action.java b/src/main/java/ca/openosp/openo/encounter/pageUtil/EctDisplayEHR2Action.java index 0544bb54a84..dcb6dd465b4 100644 --- a/src/main/java/ca/openosp/openo/encounter/pageUtil/EctDisplayEHR2Action.java +++ b/src/main/java/ca/openosp/openo/encounter/pageUtil/EctDisplayEHR2Action.java @@ -24,27 +24,9 @@ */ package ca.openosp.openo.encounter.pageUtil; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.SSLContexts; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; -import org.codehaus.jettison.json.JSONObject; import ca.openosp.openo.utility.LoggedInInfo; -import ca.openosp.openo.utility.MiscUtils; -import ca.openosp.OscarProperties; -import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; -import java.io.FileInputStream; -import java.net.URLEncoder; -import java.security.KeyStore; -import java.text.SimpleDateFormat; -import java.util.Date; public class EctDisplayEHR2Action extends EctDisplayAction { @@ -55,124 +37,11 @@ public boolean getInfo(EctSessionBean bean, HttpServletRequest request, NavBarDi if (!securityInfoManager.hasPrivilege(loggedInInfo, "_ehr", "r", null)) { return true; - } else { - String winName = "ehr" + bean.demographicNo; - String url = "javascript:void(0)"; - Dao.setLeftHeading("Provincial EHR Services"); - Dao.setLeftURL(url); - - url += ";return false;"; - Dao.setRightURL(url); - Dao.setRightHeadingID(cmd); //no menu so set div id to unique id for this action - - if (request.getSession().getAttribute("oneid_token") != null && tokenValid((String) request.getSession().getAttribute("oneid_token"))) { - NavBarDisplayDAO.Item item = new NavBarDisplayDAO.Item(); - item.setTitle("Clinical Connect Viewer"); - item.setLinkTitle("Open the Clinical Connect EHR Viewer"); - item.setURL("openCCEHRWindow('" + request.getContextPath() + "/clinicalConnectEHRViewer.do?method=launch&demographicNo=" + bean.demographicNo + "','" + bean.demographicNo + "');return false;"); - Dao.addItem(item); - } else { - NavBarDisplayDAO.Item item = new NavBarDisplayDAO.Item(); - item.setTitle("Not logged in"); - item.setLinkTitle("Sign in to OneID required"); - - String backendEconsultUrl = OscarProperties.getInstance().getProperty("backendEconsultUrl"); - //String oscarUrl = request.getRequestURL().toString(); - String oUrl = getBaseUrl(request); - String url2 = null; - try { - url2 = backendEconsultUrl + "/SAML2/login?oscarReturnURL=" + URLEncoder.encode(oUrl + "/econsultSSOLogin.do?operation=launch", "UTF-8") + "&loginStart=" + new Date().getTime() / 1000; - } catch (Exception e) { - - } - - if (url2 != null) { - item.setURL("javascript:location.href='" + url2 + "';return false;"); - - } else { - item.setURL("javascript:void(0);return false;"); - - } - - Dao.addItem(item); - } - - return true; - } - } - - public static String getBaseUrl(HttpServletRequest request) { - String scheme = request.getScheme() + "://"; - String serverName = request.getServerName(); - String serverPort = (request.getServerPort() == 80) ? "" : ":" + request.getServerPort(); - String contextPath = request.getContextPath(); - return scheme + serverName + serverPort + contextPath; - } - - private boolean tokenValid(String token) { - Date d = this.retrieveSessionExpiration(token); - if (d == null) { - return false; - } - - if (d.after(new Date())) { - return true; } - return false; - } - - protected Date retrieveSessionExpiration(String oneIdToken) { - String sessionExpiry = null; - - - try { - //get the context session id - String url = OscarProperties.getInstance().getProperty("backendEconsultUrl") + "/api/getTokenExpiry"; - HttpGet httpGet = new HttpGet(url); - httpGet.addHeader("x-access-token", oneIdToken); - HttpClient httpClient = getHttpClient2(); - HttpResponse httpResponse = httpClient.execute(httpGet); - - if (httpResponse.getStatusLine().getStatusCode() == 200) { - String entity = EntityUtils.toString(httpResponse.getEntity()); - JSONObject obj = new JSONObject(entity); - sessionExpiry = (String) obj.get("sessionExpiration"); - MiscUtils.getLogger().debug("sessionExpiry = " + sessionExpiry); - - SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ"); - Date d = fmt.parse(sessionExpiry + "+0000"); - - return d; - } - } catch (Exception e) { - MiscUtils.getLogger().error("Error", e); - } - - return null; - } - - protected HttpClient getHttpClient2() throws Exception { - - String cmsKeystoreFile = OscarProperties.getInstance().getProperty("clinicalConnect.CMS.keystore"); - String cmsKeystorePassword = OscarProperties.getInstance().getProperty("clinicalConnect.CMS.keystore.password"); - - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(new FileInputStream(cmsKeystoreFile), cmsKeystorePassword.toCharArray()); - - //setup SSL - SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(ks, cmsKeystorePassword.toCharArray()).build(); - sslcontext.getDefaultSSLParameters().setNeedClientAuth(true); - sslcontext.getDefaultSSLParameters().setWantClientAuth(true); - SSLConnectionSocketFactory sf = new SSLConnectionSocketFactory(sslcontext); - - //setup timeouts - int timeout = Integer.parseInt(OscarProperties.getInstance().getProperty("clinicalConnect.CMS.timeout", "60")); - RequestConfig config = RequestConfig.custom().setSocketTimeout(timeout * 1000).setConnectTimeout(timeout * 1000).build(); - - CloseableHttpClient httpclient3 = HttpClients.custom().setDefaultRequestConfig(config).setSSLSocketFactory(sf).build(); - - return httpclient3; + // ClinicalConnect integration removed - no EHR integrations to display + // Return true without modifying the DAO to avoid rendering an empty widget + return true; } public String getCmd() { diff --git a/src/main/java/ca/openosp/openo/entities/S21.java b/src/main/java/ca/openosp/openo/entities/S21.java index 43e605e25a7..52093babd78 100644 --- a/src/main/java/ca/openosp/openo/entities/S21.java +++ b/src/main/java/ca/openosp/openo/entities/S21.java @@ -2,6 +2,27 @@ package ca.openosp.openo.entities; +/** + * Entity representing S21 payment reconciliation records from BC MSP (Medical Services Plan) billing system. + * + *

    The S21 record format is part of British Columbia's Teleplan billing system and contains detailed + * payment information for healthcare provider billing transactions. Each S21 record represents a single + * payment line item showing amounts billed, amounts paid, balances, and cheque information.

    + * + *

    This entity is typically used for:

    + *
      + *
    • Processing payment remittance advice from BC MSP
    • + *
    • Reconciling billed amounts with actual payments received
    • + *
    • Tracking payment history and outstanding balances
    • + *
    • Generating financial reports for healthcare providers
    • + *
    + * + *

    Key fields include payee identification (payeeNo, payeeName), financial data (amtBilled, amtPaid, + * balanceFwd, newBalance, cheque), and administrative metadata (dataCentre, dataSeq, mspCTLno).

    + * + * @since 2025-10-07 + * @see ca.openosp.openo.billing.CA.BC.model.TeleplanS21 + */ public class S21 { private String s21Id; @@ -21,133 +42,325 @@ public class S21 { private String filler; private String status; + /** + * Default constructor for S21 payment reconciliation record. + * + *

    Creates a new S21 instance with all fields initialized to null. + * Fields should be populated using the setter methods after construction.

    + */ public S21() { } + /** + * Gets the unique identifier for this S21 record. + * + * @return String the unique S21 record identifier + */ public String getS21Id() { return s21Id; } + /** + * Sets the unique identifier for this S21 record. + * + * @param s21Id String the unique S21 record identifier to set + */ public void setS21Id(String s21Id) { this.s21Id = s21Id; } + /** + * Gets the name of the file from which this S21 record was imported. + * + * @return String the source file name + */ public String getFileName() { return fileName; } + /** + * Sets the name of the file from which this S21 record was imported. + * + * @param fileName String the source file name to set + */ public void setFileName(String fileName) { this.fileName = fileName; } + /** + * Gets the data centre identifier where this payment record originated. + * + * @return String the data centre code + */ public String getDataCentre() { return dataCentre; } + /** + * Sets the data centre identifier where this payment record originated. + * + * @param dataCentre String the data centre code to set + */ public void setDataCentre(String dataCentre) { this.dataCentre = dataCentre; } + /** + * Gets the data sequence number for ordering records within a batch. + * + * @return String the sequence number + */ public String getDataSeq() { return dataSeq; } + /** + * Sets the data sequence number for ordering records within a batch. + * + * @param dataSeq String the sequence number to set + */ public void setDataSeq(String dataSeq) { this.dataSeq = dataSeq; } + /** + * Gets the date when the payment was processed by BC MSP. + * + *

    Format: YYYYMMDD (e.g., "20250107" for January 7, 2025)

    + * + * @return String the payment date in YYYYMMDD format + */ public String getPaymentDate() { return paymentDate; } + /** + * Sets the date when the payment was processed by BC MSP. + * + * @param paymentDate String the payment date in YYYYMMDD format (e.g., "20250107") + */ public void setPaymentDate(String paymentDate) { this.paymentDate = paymentDate; } + /** + * Gets the line code identifying the type of payment record entry. + * + * @return String the line code + */ public String getLineCode() { return lineCode; } + /** + * Sets the line code identifying the type of payment record entry. + * + * @param lineCode String the line code to set + */ public void setLineCode(String lineCode) { this.lineCode = lineCode; } + /** + * Gets the payee number identifying the healthcare provider receiving payment. + * + * @return String the payee number (provider billing number) + */ public String getPayeeNo() { return payeeNo; } + /** + * Sets the payee number identifying the healthcare provider receiving payment. + * + * @param payeeNo String the payee number (provider billing number) to set + */ public void setPayeeNo(String payeeNo) { this.payeeNo = payeeNo; } + /** + * Gets the MSP control number for tracking and reference purposes. + * + * @return String the MSP control number + */ public String getMspCTLno() { return mspCTLno; } + /** + * Sets the MSP control number for tracking and reference purposes. + * + * @param mspCTLno String the MSP control number to set + */ public void setMspCTLno(String mspCTLno) { this.mspCTLno = mspCTLno; } + /** + * Gets the name of the healthcare provider receiving payment. + * + * @return String the payee name (provider name) + */ public String getPayeeName() { return payeeName; } + /** + * Sets the name of the healthcare provider receiving payment. + * + * @param payeeName String the payee name (provider name) to set + */ public void setPayeeName(String payeeName) { this.payeeName = payeeName; } + /** + * Gets the total amount billed to BC MSP for healthcare services. + * + *

    Monetary values are stored as strings in cents without decimal point + * (e.g., "12345" represents $123.45) to maintain precision in financial calculations.

    + * + * @return String the amount billed in cents (stored as string for precision) + */ public String getAmtBilled() { return amtBilled; } + /** + * Sets the total amount billed to BC MSP for healthcare services. + * + * @param amtBilled String the amount billed in cents (e.g., "12345" for $123.45) + */ public void setAmtBilled(String amtBilled) { this.amtBilled = amtBilled; } + /** + * Gets the actual amount paid by BC MSP for the billed services. + * + *

    This amount may differ from the amount billed due to adjustments, + * denials, or partial payments. Monetary values are stored as strings in cents + * without decimal point (e.g., "12345" represents $123.45).

    + * + * @return String the amount paid in cents (stored as string for precision) + */ public String getAmtPaid() { return amtPaid; } + /** + * Sets the actual amount paid by BC MSP for the billed services. + * + * @param amtPaid String the amount paid in cents (e.g., "12345" for $123.45) + */ public void setAmtPaid(String amtPaid) { this.amtPaid = amtPaid; } + /** + * Gets the balance brought forward from previous payment periods. + * + *

    Represents any outstanding balance or credit from prior billing cycles + * that affects the current payment calculation. Monetary values are stored as + * strings in cents without decimal point (e.g., "12345" represents $123.45).

    + * + * @return String the balance forward amount in cents (stored as string for precision) + */ public String getBalanceFwd() { return balanceFwd; } + /** + * Sets the balance brought forward from previous payment periods. + * + * @param balanceFwd String the balance forward amount in cents (e.g., "12345" for $123.45) + */ public void setBalanceFwd(String balanceFwd) { this.balanceFwd = balanceFwd; } + /** + * Gets the cheque number or payment reference for this transaction. + * + * @return String the cheque number or payment reference + */ public String getCheque() { return cheque; } + /** + * Sets the cheque number or payment reference for this transaction. + * + * @param cheque String the cheque number or payment reference to set + */ public void setCheque(String cheque) { this.cheque = cheque; } + /** + * Gets the new balance after applying this payment transaction. + * + *

    This value is provided by BC MSP billing system and not computed by this entity. + * A typical calculation follows the pattern: + * {@code balance forward + amount billed - amount paid = new balance}, + * but the exact rules (including adjustments, fees, or write-offs) are defined by + * the MSP billing specification. Monetary values are stored as strings in cents + * without decimal point (e.g., "12345" represents $123.45).

    + * + * @return String the new balance amount in cents (stored as string for precision) + */ public String getNewBalance() { return newBalance; } + /** + * Sets the new balance after applying this payment transaction. + * + * @param newBalance String the new balance amount in cents (e.g., "12345" for $123.45) + */ public void setNewBalance(String newBalance) { this.newBalance = newBalance; } + /** + * Gets the filler field reserved for future use or additional data. + * + *

    This field is part of the S21 record format specification and may be + * used for padding or storing supplementary information.

    + * + * @return String the filler field content + */ public String getFiller() { return filler; } + /** + * Sets the filler field reserved for future use or additional data. + * + * @param filler String the filler field content to set + */ public void setFiller(String filler) { this.filler = filler; } + /** + * Gets the processing status of this payment record. + * + *

    Indicates whether the record has been processed, is pending review, + * or requires reconciliation action.

    + * + * @return String the processing status + */ public String getStatus() { return status; } + /** + * Sets the processing status of this payment record. + * + * @param status String the processing status to set + */ public void setStatus(String status) { this.status = status; } diff --git a/src/main/java/ca/openosp/openo/entities/S22.java b/src/main/java/ca/openosp/openo/entities/S22.java index 0f2056cc79f..de4b68cf33a 100644 --- a/src/main/java/ca/openosp/openo/entities/S22.java +++ b/src/main/java/ca/openosp/openo/entities/S22.java @@ -2,6 +2,30 @@ package ca.openosp.openo.entities; +/** + * Entity representing a Teleplan S22 record for BC MSP (Medical Services Plan) billing. + * + *

    The S22 record type contains detailed payment information for individual healthcare + * practitioners, including amounts billed, amounts paid, and practitioner identification + * details. S22 records are associated with S21 records which contain summary payment + * information for the payee.

    + * + *

    This entity is part of the British Columbia Teleplan billing system integration, + * which processes payment remittances from the provincial Medical Services Plan. Each + * S22 record represents a line item in the payment remittance file showing how much was + * billed versus how much was actually paid for a specific practitioner's services.

    + * + *

    Healthcare Context: In BC's MSP billing workflow, healthcare providers + * submit claims for services rendered. The MSP processes these claims and returns payment + * remittance files containing S21 (summary) and S22 (detail) records. The S22 records + * allow the EMR to reconcile individual practitioner billings and identify any discrepancies + * between billed and paid amounts.

    + * + * @see S21 + * @see ca.openosp.openo.billing.CA.BC.model.TeleplanS22 + * @see ca.openosp.openo.billing.CA.BC.dao.TeleplanS22Dao + * @since 2026-01-23 + */ public class S22 { private String s22Id; @@ -21,133 +45,349 @@ public class S22 { private String amtPaid; private String filler; + /** + * Default constructor for S22 entity. + * + *

    Creates a new S22 instance with all fields initialized to null. + * This constructor is typically used by frameworks and data access layers + * when instantiating entities from database records or XML/JSON parsing.

    + */ public S22() { } + /** + * Gets the unique identifier for this S22 record. + * + * @return String the S22 record identifier, or null if not set + */ public String getS22Id() { return s22Id; } + /** + * Sets the unique identifier for this S22 record. + * + * @param s22Id String the S22 record identifier to set + */ public void setS22Id(String s22Id) { this.s22Id = s22Id; } + /** + * Gets the identifier of the parent S21 record. + * + *

    S22 records are detail records associated with a summary S21 record. + * This field links the S22 detail to its parent S21 summary record.

    + * + * @return String the S21 record identifier, or null if not set + */ public String getS21Id() { return s21Id; } + /** + * Sets the identifier of the parent S21 record. + * + * @param s21Id String the S21 record identifier to set + */ public void setS21Id(String s21Id) { this.s21Id = s21Id; } + /** + * Gets the name of the Teleplan remittance file. + * + *

    This is the filename of the BC MSP remittance file that contained + * this S22 record. Used for auditing and troubleshooting payment imports.

    + * + * @return String the filename, or null if not set + */ public String getFileName() { return fileName; } + /** + * Sets the name of the Teleplan remittance file. + * + * @param fileName String the filename to set + */ public void setFileName(String fileName) { this.fileName = fileName; } + /** + * Gets the S22 record type code. + * + *

    Identifies the specific type of S22 record within the Teleplan + * file format specification.

    + * + * @return String the S22 type code, or null if not set + */ public String getS22Type() { return s22Type; } + /** + * Sets the S22 record type code. + * + * @param s22Type String the S22 type code to set + */ public void setS22Type(String s22Type) { this.s22Type = s22Type; } + /** + * Gets the data centre code. + * + *

    Identifies the BC MSP data centre that processed this payment record.

    + * + * @return String the data centre code, or null if not set + */ public String getDataCentre() { return dataCentre; } + /** + * Sets the data centre code. + * + * @param dataCentre String the data centre code to set + */ public void setDataCentre(String dataCentre) { this.dataCentre = dataCentre; } + /** + * Gets the data sequence number. + * + *

    Sequential number used to maintain the order of records within + * the Teleplan remittance file.

    + * + * @return String the sequence number, or null if not set + */ public String getDataSeq() { return dataSeq; } + /** + * Sets the data sequence number. + * + * @param dataSeq String the sequence number to set + */ public void setDataSeq(String dataSeq) { this.dataSeq = dataSeq; } + /** + * Gets the payment date for this remittance. + * + *

    The date when the BC MSP issued this payment. Typically in YYYYMMDD format.

    + * + * @return String the payment date, or null if not set + */ public String getPaymentDate() { return paymentDate; } + /** + * Sets the payment date for this remittance. + * + * @param paymentDate String the payment date to set (typically YYYYMMDD format) + */ public void setPaymentDate(String paymentDate) { this.paymentDate = paymentDate; } + /** + * Gets the line code. + * + *

    Indicates the type of line item in the remittance record, such as + * payment, adjustment, or other transaction types defined by Teleplan.

    + * + * @return String the line code, or null if not set + */ public String getLineCode() { return lineCode; } + /** + * Sets the line code. + * + * @param lineCode String the line code to set + */ public void setLineCode(String lineCode) { this.lineCode = lineCode; } + /** + * Gets the payee number. + * + *

    The BC MSP payee identifier for the healthcare provider or organization + * receiving the payment. This may be a group practice number or billing agent number.

    + * + * @return String the payee number, or null if not set + */ public String getPayeeNo() { return payeeNo; } + /** + * Sets the payee number. + * + * @param payeeNo String the payee number to set + */ public void setPayeeNo(String payeeNo) { this.payeeNo = payeeNo; } + /** + * Gets the payee name. + * + *

    The name of the healthcare provider or organization receiving the payment + * as it appears in BC MSP records.

    + * + * @return String the payee name, or null if not set + */ public String getPayeeName() { return payeeName; } + /** + * Sets the payee name. + * + * @param payeeName String the payee name to set + */ public void setPayeeName(String payeeName) { this.payeeName = payeeName; } + /** + * Gets the MSP control number. + * + *

    A unique control number assigned by BC MSP for tracking and + * reconciliation purposes.

    + * + * @return String the MSP control number, or null if not set + */ public String getMspCTLno() { return mspCTLno; } + /** + * Sets the MSP control number. + * + * @param mspCTLno String the MSP control number to set + */ public void setMspCTLno(String mspCTLno) { this.mspCTLno = mspCTLno; } + /** + * Gets the practitioner number. + * + *

    The BC MSP practitioner number (also known as billing number or provider number) + * of the individual healthcare practitioner who rendered the services. This is + * distinct from the payee number when billing is done through a group or agent.

    + * + * @return String the practitioner number, or null if not set + */ public String getPractitionerNo() { return practitionerNo; } + /** + * Sets the practitioner number. + * + * @param practitionerNo String the practitioner number to set + */ public void setPractitionerNo(String practitionerNo) { this.practitionerNo = practitionerNo; } + /** + * Gets the practitioner name. + * + *

    The name of the individual healthcare practitioner who rendered the services, + * as it appears in BC MSP records.

    + * + * @return String the practitioner name, or null if not set + */ public String getPractitionerName() { return practitionerName; } + /** + * Sets the practitioner name. + * + * @param practitionerName String the practitioner name to set + */ public void setPractitionerName(String practitionerName) { this.practitionerName = practitionerName; } + /** + * Gets the amount billed. + * + *

    The total amount billed by the practitioner for services rendered, as submitted + * in the original claims. This amount is in Canadian dollars and typically includes + * cents as a decimal value in string format (e.g., "123.45").

    + * + * @return String the amount billed, or null if not set + */ public String getAmtBilled() { return amtBilled; } + /** + * Sets the amount billed. + * + * @param amtBilled String the amount billed to set (typically in format "123.45") + */ public void setAmtBilled(String amtBilled) { this.amtBilled = amtBilled; } + /** + * Gets the amount paid. + * + *

    The actual amount paid by BC MSP for the services. This may differ from the + * amount billed due to adjustments, partial payments, or denied claims. The amount + * is in Canadian dollars, typically in decimal string format (e.g., "123.45").

    + * + *

    Comparing amtPaid to amtBilled allows the EMR to identify payment variances + * that may require follow-up or appeals.

    + * + * @return String the amount paid, or null if not set + */ public String getAmtPaid() { return amtPaid; } + /** + * Sets the amount paid. + * + * @param amtPaid String the amount paid to set (typically in format "123.45") + */ public void setAmtPaid(String amtPaid) { this.amtPaid = amtPaid; } + /** + * Gets the filler field value. + * + *

    Reserved field in the Teleplan file format. May contain spaces or be used + * for future extensions to the file format. Not typically used for business logic.

    + * + * @return String the filler field value, or null if not set + */ public String getFiller() { return filler; } + /** + * Sets the filler field value. + * + * @param filler String the filler field value to set + */ public void setFiller(String filler) { this.filler = filler; } diff --git a/src/main/java/ca/openosp/openo/entities/S23.java b/src/main/java/ca/openosp/openo/entities/S23.java index d28b64bd6be..0dc5d59ee8d 100644 --- a/src/main/java/ca/openosp/openo/entities/S23.java +++ b/src/main/java/ca/openosp/openo/entities/S23.java @@ -2,6 +2,29 @@ package ca.openosp.openo.entities; +/** + * Entity representing an S23/S24 record type in the BC MSP (Medical Services Plan) Teleplan billing system. + * + *

    This entity captures detailed payment reconciliation and adjustment information for healthcare provider + * billing in British Columbia. S23 records contain itemized adjustment details including adjustment codes, + * percentages, amounts, and balance calculations that complement the summary information in S21 records.

    + * + *

    Key components tracked by this entity include:

    + *
      + *
    • Payment identification and sequencing (payee number, MSP control number, data centre sequence)
    • + *
    • Adjustment codes and calculations (AJC, AJI, AJM with corresponding percentages and amounts)
    • + *
    • Financial reconciliation (gross amount, running amount, outstanding amount, balance forward)
    • + *
    • Adjustment tracking (adjustments made and outstanding)
    • + *
    + * + *

    This entity is used in the Teleplan billing reconciliation process to parse incoming payment files + * from BC MSP and track the detailed breakdown of adjustments applied to provider billings.

    + * + * @see S21 + * @see ca.openosp.openo.billing.CA.BC.model.TeleplanS23 + * @see ca.openosp.openo.billing.CA.BC.dao.TeleplanS23Dao + * @since 2026-01-23 + */ public class S23 { private String s23Id; @@ -29,197 +52,443 @@ public class S23 { private String adjOutstanding; private String filler; + /** + * Default constructor for creating an empty S23 entity. + * + *

    Initializes a new S23 instance with all fields set to their default values (null for String fields). + * This constructor is typically used by persistence frameworks and during manual entity creation.

    + */ public S23() { } + /** + * Gets the unique identifier for this S23 record. + * + * @return String the unique S23 record identifier + */ public String getS23Id() { return s23Id; } + /** + * Sets the unique identifier for this S23 record. + * + * @param s23Id String the unique S23 record identifier to set + */ public void setS23Id(String s23Id) { this.s23Id = s23Id; } + /** + * Gets the associated S21 summary record identifier. + * + * @return String the S21 parent record identifier + */ public String getS21Id() { return s21Id; } + /** + * Sets the associated S21 summary record identifier. + * + * @param s21Id String the S21 parent record identifier to set + */ public void setS21Id(String s21Id) { this.s21Id = s21Id; } + /** + * Gets the Teleplan file name from which this record was parsed. + * + * @return String the source Teleplan file name + */ public String getFileName() { return fileName; } + /** + * Sets the Teleplan file name from which this record was parsed. + * + * @param fileName String the source Teleplan file name to set + */ public void setFileName(String fileName) { this.fileName = fileName; } + /** + * Gets the S23 record type indicator (S23 or S24). + * + * @return String the record type (typically "S23" or "S24") + */ public String getS23Type() { return s23Type; } + /** + * Sets the S23 record type indicator. + * + * @param s23Type String the record type to set (typically "S23" or "S24") + */ public void setS23Type(String s23Type) { this.s23Type = s23Type; } + /** + * Gets the BC MSP data centre code that processed this record. + * + * @return String the data centre code + */ public String getDataCentre() { return dataCentre; } + /** + * Sets the BC MSP data centre code that processed this record. + * + * @param dataCentre String the data centre code to set + */ public void setDataCentre(String dataCentre) { this.dataCentre = dataCentre; } + /** + * Gets the sequential data number for this record within the payment batch. + * + * @return String the data sequence number + */ public String getDataSeq() { return dataSeq; } + /** + * Sets the sequential data number for this record within the payment batch. + * + * @param dataSeq String the data sequence number to set + */ public void setDataSeq(String dataSeq) { this.dataSeq = dataSeq; } + /** + * Gets the payment date for this billing reconciliation record. + * + * @return String the payment date + */ public String getPaymentDate() { return paymentDate; } + /** + * Sets the payment date for this billing reconciliation record. + * + * @param paymentDate String the payment date to set + */ public void setPaymentDate(String paymentDate) { this.paymentDate = paymentDate; } + /** + * Gets the line code identifying the type of transaction or adjustment. + * + * @return String the line code + */ public String getLineCode() { return lineCode; } + /** + * Sets the line code identifying the type of transaction or adjustment. + * + * @param lineCode String the line code to set + */ public void setLineCode(String lineCode) { this.lineCode = lineCode; } + /** + * Gets the payee number (healthcare provider MSP practitioner number). + * + * @return String the payee number + */ public String getPayeeNo() { return payeeNo; } + /** + * Sets the payee number (healthcare provider MSP practitioner number). + * + * @param payeeNo String the payee number to set + */ public void setPayeeNo(String payeeNo) { this.payeeNo = payeeNo; } + /** + * Gets the name of the payee (healthcare provider). + * + * @return String the payee name + */ public String getPayeeName() { return payeeName; } + /** + * Sets the name of the payee (healthcare provider). + * + * @param payeeName String the payee name to set + */ public void setPayeeName(String payeeName) { this.payeeName = payeeName; } + /** + * Gets the MSP control number for tracking and reconciliation purposes. + * + * @return String the MSP control number + */ public String getMspCTLno() { return mspCTLno; } + /** + * Sets the MSP control number for tracking and reconciliation purposes. + * + * @param mspCTLno String the MSP control number to set + */ public void setMspCTLno(String mspCTLno) { this.mspCTLno = mspCTLno; } + /** + * Gets the AJC (Adjustment Code C) value for billing adjustments. + * + * @return String the AJC adjustment code + */ public String getAjc() { return ajc; } + /** + * Sets the AJC (Adjustment Code C) value for billing adjustments. + * + * @param ajc String the AJC adjustment code to set + */ public void setAjc(String ajc) { this.ajc = ajc; } + /** + * Gets the AJI (Adjustment Code I) value for billing adjustments. + * + * @return String the AJI adjustment code + */ public String getAji() { return aji; } + /** + * Sets the AJI (Adjustment Code I) value for billing adjustments. + * + * @param aji String the AJI adjustment code to set + */ public void setAji(String aji) { this.aji = aji; } + /** + * Gets the AJM (Adjustment Code M) value for billing adjustments. + * + * @return String the AJM adjustment code + */ public String getAjm() { return ajm; } + /** + * Sets the AJM (Adjustment Code M) value for billing adjustments. + * + * @param ajm String the AJM adjustment code to set + */ public void setAjm(String ajm) { this.ajm = ajm; } + /** + * Gets the calculation method used for determining payment adjustments. + * + * @return String the calculation method code + */ public String getCalcMethod() { return calcMethod; } + /** + * Sets the calculation method used for determining payment adjustments. + * + * @param calcMethod String the calculation method code to set + */ public void setCalcMethod(String calcMethod) { this.calcMethod = calcMethod; } + /** + * Gets the R percentage (running adjustment percentage) applied to the billing. + * + * @return String the running adjustment percentage value + */ public String getRpercent() { return rpercent; } + /** + * Sets the R percentage (running adjustment percentage) applied to the billing. + * + * @param rpercent String the running adjustment percentage value to set + */ public void setRpercent(String rpercent) { this.rpercent = rpercent; } + /** + * Gets the O percentage (outstanding adjustment percentage) applied to the billing. + * + * @return String the outstanding adjustment percentage value + */ public String getOpercent() { return opercent; } + /** + * Sets the O percentage (outstanding adjustment percentage) applied to the billing. + * + * @param opercent String the outstanding adjustment percentage value to set + */ public void setOpercent(String opercent) { this.opercent = opercent; } + /** + * Gets the gross amount before adjustments are applied. + * + * @return String the gross billing amount + */ public String getGamount() { return gamount; } + /** + * Sets the gross amount before adjustments are applied. + * + * @param gamount String the gross billing amount to set + */ public void setGamount(String gamount) { this.gamount = gamount; } + /** + * Gets the running amount (cumulative adjusted amount). + * + * @return String the running adjusted amount + */ public String getRamount() { return ramount; } + /** + * Sets the running amount (cumulative adjusted amount). + * + * @param ramount String the running adjusted amount to set + */ public void setRamount(String ramount) { this.ramount = ramount; } + /** + * Gets the outstanding amount remaining after adjustments. + * + * @return String the outstanding amount + */ public String getOamount() { return oamount; } + /** + * Sets the outstanding amount remaining after adjustments. + * + * @param oamount String the outstanding amount to set + */ public void setOamount(String oamount) { this.oamount = oamount; } + /** + * Gets the balance forward amount from previous reconciliation periods. + * + * @return String the balance forward amount + */ public String getBalanceFwd() { return balanceFwd; } + /** + * Sets the balance forward amount from previous reconciliation periods. + * + * @param balanceFwd String the balance forward amount to set + */ public void setBalanceFwd(String balanceFwd) { this.balanceFwd = balanceFwd; } + /** + * Gets the total adjustments made in this reconciliation period. + * + * @return String the adjustments made amount + */ public String getAdjmade() { return adjmade; } + /** + * Sets the total adjustments made in this reconciliation period. + * + * @param adjmade String the adjustments made amount to set + */ public void setAdjmade(String adjmade) { this.adjmade = adjmade; } + /** + * Gets the adjustments still outstanding and not yet resolved. + * + * @return String the outstanding adjustments amount + */ public String getAdjOutstanding() { return adjOutstanding; } + /** + * Sets the adjustments still outstanding and not yet resolved. + * + * @param adjOutstanding String the outstanding adjustments amount to set + */ public void setAdjOutstanding(String adjOutstanding) { this.adjOutstanding = adjOutstanding; } + /** + * Gets the filler field for padding and future use in the Teleplan record format. + * + * @return String the filler content + */ public String getFiller() { return filler; } + /** + * Sets the filler field for padding and future use in the Teleplan record format. + * + * @param filler String the filler content to set + */ public void setFiller(String filler) { this.filler = filler; } diff --git a/src/main/java/ca/openosp/openo/flowsheets/FlowsheetDocument.java b/src/main/java/ca/openosp/openo/flowsheets/FlowsheetDocument.java index d73696677c4..9b11e1540fc 100644 --- a/src/main/java/ca/openosp/openo/flowsheets/FlowsheetDocument.java +++ b/src/main/java/ca/openosp/openo/flowsheets/FlowsheetDocument.java @@ -16,99 +16,317 @@ import org.apache.xmlbeans.xml.stream.XMLStreamException; import org.w3c.dom.Node; +/** + * XML document representing a clinical flowsheet configuration in the OpenO EMR system. + *

    + * Flowsheets are structured data collection forms used in healthcare settings to track + * patient measurements, clinical indicators, and preventive care over time. This document + * type defines the XML schema for flowsheet templates that specify: + *

    + *
      + *
    • Clinical measurements with validation rules (blood pressure, weight, lab values, etc.)
    • + *
    • Visual indicators with color coding for clinical decision support
    • + *
    • Headers and items for organizing related clinical data points
    • + *
    • Rule-based recommendations triggered by measurement values
    • + *
    • Prevention types for tracking immunizations and screening tests
    • + *
    • Integration with diagnosis code triggers for automated workflow
    • + *
    + *

    + * This interface is generated by Apache XMLBeans from the flowsheet XML schema definition. + * It provides type-safe access to flowsheet configuration elements and supports parsing + * flowsheet definitions from various sources (files, streams, URLs, DOM nodes). + *

    + *

    + * Flowsheets in OpenO EMR enable: + *

    + *
      + *
    • Standardized chronic disease management (diabetes, hypertension, etc.)
    • + *
    • Preventive care tracking aligned with clinical practice guidelines
    • + *
    • Automated clinical decision support through rule evaluation
    • + *
    • Visual flowsheet display with color-coded indicators for at-risk values
    • + *
    • Graphable measurement trends over time
    • + *
    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet + * @see org.apache.xmlbeans.XmlObject + * @since 2026-01-24 + */ public interface FlowsheetDocument extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(FlowsheetDocument.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("flowsheetb059doctype"); + /** + * Gets the root flowsheet element containing all flowsheet configuration data. + * + * @return Flowsheet the flowsheet configuration object + */ Flowsheet getFlowsheet(); + /** + * Sets the root flowsheet element with new configuration data. + * + * @param var1 Flowsheet the flowsheet configuration to set + */ void setFlowsheet(Flowsheet var1); + /** + * Adds a new flowsheet element to this document and returns it for configuration. + * + * @return Flowsheet newly created flowsheet object ready for configuration + */ Flowsheet addNewFlowsheet(); + /** + * Factory class providing static methods to create and parse FlowsheetDocument instances. + *

    + * Supports parsing flowsheet XML from multiple sources including strings, files, URLs, + * input streams, readers, XML stream readers, and DOM nodes. All parse methods validate + * the XML against the flowsheet schema definition. + *

    + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty FlowsheetDocument instance with default options. + * + * @return FlowsheetDocument new document instance + */ public static FlowsheetDocument newInstance() { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.type, (XmlOptions)null); } + /** + * Creates a new empty FlowsheetDocument instance with specified XML options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument new document instance + */ public static FlowsheetDocument newInstance(XmlOptions var0) { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.type, var0); } + /** + * Parses a flowsheet document from an XML string. + * + * @param var0 String the XML string to parse + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + */ public static FlowsheetDocument parse(String var0) throws XmlException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from an XML string with specified options. + * + * @param var0 String the XML string to parse + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + */ public static FlowsheetDocument parse(String var0, XmlOptions var1) throws XmlException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } + /** + * Parses a flowsheet document from an XML file. + * + * @param var0 File the XML file containing flowsheet configuration + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error reading the file + */ public static FlowsheetDocument parse(File var0) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from an XML file with specified options. + * + * @param var0 File the XML file containing flowsheet configuration + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error reading the file + */ public static FlowsheetDocument parse(File var0, XmlOptions var1) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } + /** + * Parses a flowsheet document from a URL pointing to an XML resource. + * + * @param var0 URL the URL of the XML resource + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error accessing the URL + */ public static FlowsheetDocument parse(URL var0) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from a URL with specified options. + * + * @param var0 URL the URL of the XML resource + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error accessing the URL + */ public static FlowsheetDocument parse(URL var0, XmlOptions var1) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } + /** + * Parses a flowsheet document from an input stream. + * + * @param var0 InputStream the input stream containing XML data + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error reading from the stream + */ public static FlowsheetDocument parse(InputStream var0) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from an input stream with specified options. + * + * @param var0 InputStream the input stream containing XML data + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error reading from the stream + */ public static FlowsheetDocument parse(InputStream var0, XmlOptions var1) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } + /** + * Parses a flowsheet document from a character reader. + * + * @param var0 Reader the character reader containing XML data + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error reading from the reader + */ public static FlowsheetDocument parse(Reader var0) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from a character reader with specified options. + * + * @param var0 Reader the character reader containing XML data + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws IOException if there is an error reading from the reader + */ public static FlowsheetDocument parse(Reader var0, XmlOptions var1) throws XmlException, IOException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } + /** + * Parses a flowsheet document from an XML stream reader. + * + * @param var0 XMLStreamReader the XML stream reader positioned at the document start + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + */ public static FlowsheetDocument parse(XMLStreamReader var0) throws XmlException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from an XML stream reader with specified options. + * + * @param var0 XMLStreamReader the XML stream reader positioned at the document start + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + */ public static FlowsheetDocument parse(XMLStreamReader var0, XmlOptions var1) throws XmlException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } + /** + * Parses a flowsheet document from a DOM node. + * + * @param var0 Node the DOM node containing flowsheet XML + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + */ public static FlowsheetDocument parse(Node var0) throws XmlException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } + /** + * Parses a flowsheet document from a DOM node with specified options. + * + * @param var0 Node the DOM node containing flowsheet XML + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + */ public static FlowsheetDocument parse(Node var0, XmlOptions var1) throws XmlException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } - /** @deprecated */ + /** + * Parses a flowsheet document from an XMLInputStream. + * + * @param var0 XMLInputStream the XML input stream + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws XMLStreamException if there is an error reading the XML stream + * @deprecated Use parse methods with standard InputStream or XMLStreamReader instead + */ @Deprecated public static FlowsheetDocument parse(XMLInputStream var0) throws XmlException, XMLStreamException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, (XmlOptions)null); } - /** @deprecated */ + /** + * Parses a flowsheet document from an XMLInputStream with specified options. + * + * @param var0 XMLInputStream the XML input stream + * @param var1 XmlOptions options for XML parsing and validation + * @return FlowsheetDocument parsed flowsheet document + * @throws XmlException if the XML is invalid or does not conform to the flowsheet schema + * @throws XMLStreamException if there is an error reading the XML stream + * @deprecated Use parse methods with standard InputStream or XMLStreamReader instead + */ @Deprecated public static FlowsheetDocument parse(XMLInputStream var0, XmlOptions var1) throws XmlException, XMLStreamException { return (FlowsheetDocument)XmlBeans.getContextTypeLoader().parse(var0, FlowsheetDocument.type, var1); } - /** @deprecated */ + /** + * Creates a validating XMLInputStream from an existing XMLInputStream. + * + * @param var0 XMLInputStream the source XML input stream + * @return XMLInputStream validating stream for the flowsheet schema + * @throws XmlException if schema validation setup fails + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated Use standard XML validation mechanisms instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(XMLInputStream var0) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(var0, FlowsheetDocument.type, (XmlOptions)null); } - /** @deprecated */ + /** + * Creates a validating XMLInputStream from an existing XMLInputStream with options. + * + * @param var0 XMLInputStream the source XML input stream + * @param var1 XmlOptions options for XML validation + * @return XMLInputStream validating stream for the flowsheet schema + * @throws XmlException if schema validation setup fails + * @throws XMLStreamException if there is an error with the XML stream + * @deprecated Use standard XML validation mechanisms instead + */ @Deprecated public static XMLInputStream newValidatingXMLInputStream(XMLInputStream var0, XmlOptions var1) throws XmlException, XMLStreamException { return XmlBeans.getContextTypeLoader().newValidatingXMLInputStream(var0, FlowsheetDocument.type, var1); @@ -118,146 +336,536 @@ private Factory() { } } + /** + * Root flowsheet configuration element containing all clinical data tracking specifications. + *

    + * A Flowsheet defines a structured clinical data collection form with the following components: + *

    + *
      + *
    • Indicators: Visual markers with color coding (e.g., red for critical values, yellow for warnings)
    • + *
    • Headers: Column or section headers organizing related clinical items
    • + *
    • Measurements: Clinical measurement types with validation rules (BP, weight, lab values, etc.)
    • + *
    • Rules and Rulesets: Conditional logic for clinical decision support and recommendations
    • + *
    • Prevention Types: Links to preventive care items like immunizations and screening tests
    • + *
    • Diagnosis Code Triggers: ICD codes that activate this flowsheet for relevant patients
    • + *
    + *

    + * Common flowsheet examples in OpenO EMR include: + *

    + *
      + *
    • Diabetes flowsheet - tracking HbA1c, blood glucose, foot exams, eye exams
    • + *
    • Hypertension flowsheet - tracking BP, medications, lifestyle modifications
    • + *
    • Prenatal flowsheet - tracking fundal height, fetal heart rate, maternal weight
    • + *
    • Well-child flowsheet - tracking growth parameters, developmental milestones, immunizations
    • + *
    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Indicator + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Measurement + * @since 2026-01-24 + */ public interface Flowsheet extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Flowsheet.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("flowsheet1136elemtype"); + /** + * Gets array of all indicators defined for this flowsheet. + * + * @return Indicator[] array of visual indicator configurations + */ Indicator[] getIndicatorArray(); + /** + * Gets a specific indicator by array index. + * + * @param var1 int the zero-based index of the indicator to retrieve + * @return Indicator the indicator at the specified index + */ Indicator getIndicatorArray(int var1); + /** + * Gets the number of indicators in this flowsheet. + * + * @return int count of indicators + */ int sizeOfIndicatorArray(); + /** + * Sets the complete array of indicators, replacing any existing indicators. + * + * @param var1 Indicator[] array of indicators to set + */ void setIndicatorArray(Indicator[] var1); + /** + * Sets a specific indicator at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Indicator the indicator to set at this position + */ void setIndicatorArray(int var1, Indicator var2); + /** + * Inserts a new indicator at the specified position in the array. + * + * @param var1 int the zero-based index where the new indicator should be inserted + * @return Indicator the newly inserted indicator ready for configuration + */ Indicator insertNewIndicator(int var1); + /** + * Adds a new indicator to the end of the indicator array. + * + * @return Indicator the newly added indicator ready for configuration + */ Indicator addNewIndicator(); + /** + * Removes an indicator at the specified array index. + * + * @param var1 int the zero-based index of the indicator to remove + */ void removeIndicator(int var1); + /** + * Gets array of all headers defined for this flowsheet. + * + * @return Header[] array of header configurations organizing flowsheet sections + */ Header[] getHeaderArray(); + /** + * Gets a specific header by array index. + * + * @param var1 int the zero-based index of the header to retrieve + * @return Header the header at the specified index + */ Header getHeaderArray(int var1); + /** + * Gets the number of headers in this flowsheet. + * + * @return int count of headers + */ int sizeOfHeaderArray(); + /** + * Sets the complete array of headers, replacing any existing headers. + * + * @param var1 Header[] array of headers to set + */ void setHeaderArray(Header[] var1); + /** + * Sets a specific header at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Header the header to set at this position + */ void setHeaderArray(int var1, Header var2); + /** + * Inserts a new header at the specified position in the array. + * + * @param var1 int the zero-based index where the new header should be inserted + * @return Header the newly inserted header ready for configuration + */ Header insertNewHeader(int var1); + /** + * Adds a new header to the end of the header array. + * + * @return Header the newly added header ready for configuration + */ Header addNewHeader(); + /** + * Removes a header at the specified array index. + * + * @param var1 int the zero-based index of the header to remove + */ void removeHeader(int var1); + /** + * Gets array of all measurement types defined for this flowsheet. + * + * @return Measurement[] array of clinical measurement configurations with validation rules + */ Measurement[] getMeasurementArray(); + /** + * Gets a specific measurement by array index. + * + * @param var1 int the zero-based index of the measurement to retrieve + * @return Measurement the measurement configuration at the specified index + */ Measurement getMeasurementArray(int var1); + /** + * Gets the number of measurements defined in this flowsheet. + * + * @return int count of measurement types + */ int sizeOfMeasurementArray(); + /** + * Sets the complete array of measurements, replacing any existing measurements. + * + * @param var1 Measurement[] array of measurement configurations to set + */ void setMeasurementArray(Measurement[] var1); + /** + * Sets a specific measurement at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Measurement the measurement to set at this position + */ void setMeasurementArray(int var1, Measurement var2); + /** + * Inserts a new measurement at the specified position in the array. + * + * @param var1 int the zero-based index where the new measurement should be inserted + * @return Measurement the newly inserted measurement ready for configuration + */ Measurement insertNewMeasurement(int var1); + /** + * Adds a new measurement to the end of the measurement array. + * + * @return Measurement the newly added measurement ready for configuration + */ Measurement addNewMeasurement(); + /** + * Removes a measurement at the specified array index. + * + * @param var1 int the zero-based index of the measurement to remove + */ void removeMeasurement(int var1); + /** + * Gets the internal name identifier for this flowsheet. + * + * @return String the flowsheet name used in system references + */ String getName(); + /** + * Gets the flowsheet name as an XmlString object. + * + * @return XmlString the name wrapped in an XML string type + */ XmlString xgetName(); + /** + * Checks if the flowsheet name is set. + * + * @return boolean true if name is set, false otherwise + */ boolean isSetName(); + /** + * Sets the internal name identifier for this flowsheet. + * + * @param var1 String the flowsheet name to set + */ void setName(String var1); + /** + * Sets the flowsheet name using an XmlString object. + * + * @param var1 XmlString the name to set wrapped in XML string type + */ void xsetName(XmlString var1); + /** + * Clears the flowsheet name. + */ void unsetName(); + /** + * Gets the decision support rules script for this flowsheet. + *

    + * Decision support rules define automated clinical logic that evaluates patient data + * and triggers recommendations, alerts, or workflow actions. + *

    + * + * @return String the decision support rules script + */ String getDsRules(); + /** + * Gets the decision support rules as an XmlString object. + * + * @return XmlString the DS rules wrapped in an XML string type + */ XmlString xgetDsRules(); + /** + * Checks if decision support rules are set for this flowsheet. + * + * @return boolean true if DS rules are set, false otherwise + */ boolean isSetDsRules(); + /** + * Sets the decision support rules script for this flowsheet. + * + * @param var1 String the decision support rules to set + */ void setDsRules(String var1); + /** + * Sets the decision support rules using an XmlString object. + * + * @param var1 XmlString the DS rules to set wrapped in XML string type + */ void xsetDsRules(XmlString var1); + /** + * Clears the decision support rules. + */ void unsetDsRules(); + /** + * Gets the diagnosis code triggers that activate this flowsheet. + *

    + * Diagnosis code triggers are ICD-9 or ICD-10 codes that, when present in a patient's + * problem list or encounter diagnoses, automatically activate this flowsheet for that patient. + * For example, an E11 (Type 2 diabetes) code would trigger the diabetes flowsheet. + *

    + * + * @return String comma-separated list of ICD codes that trigger this flowsheet + */ String getDxcodeTriggers(); + /** + * Gets the diagnosis code triggers as an XmlString object. + * + * @return XmlString the triggers wrapped in an XML string type + */ XmlString xgetDxcodeTriggers(); + /** + * Checks if diagnosis code triggers are set. + * + * @return boolean true if triggers are set, false otherwise + */ boolean isSetDxcodeTriggers(); + /** + * Sets the diagnosis code triggers that activate this flowsheet. + * + * @param var1 String comma-separated ICD codes to set as triggers + */ void setDxcodeTriggers(String var1); + /** + * Sets the diagnosis code triggers using an XmlString object. + * + * @param var1 XmlString the triggers to set wrapped in XML string type + */ void xsetDxcodeTriggers(XmlString var1); + /** + * Clears the diagnosis code triggers. + */ void unsetDxcodeTriggers(); + /** + * Gets the human-readable display name shown to users in the EMR interface. + * + * @return String the user-facing flowsheet name + */ String getDisplayName(); + /** + * Gets the display name as an XmlString object. + * + * @return XmlString the display name wrapped in an XML string type + */ XmlString xgetDisplayName(); + /** + * Checks if a display name is set. + * + * @return boolean true if display name is set, false otherwise + */ boolean isSetDisplayName(); + /** + * Sets the human-readable display name for the flowsheet. + * + * @param var1 String the display name to show to users + */ void setDisplayName(String var1); + /** + * Sets the display name using an XmlString object. + * + * @param var1 XmlString the display name to set wrapped in XML string type + */ void xsetDisplayName(XmlString var1); + /** + * Clears the display name. + */ void unsetDisplayName(); + /** + * Gets the color code used for warning-level clinical indicators. + *

    + * Warning colors typically indicate values that require attention but are not + * immediately critical (e.g., yellow for borderline high blood pressure). + *

    + * + * @return String the warning color (hex code or named color) + */ String getWarningColour(); + /** + * Gets the warning color as an XmlString object. + * + * @return XmlString the warning color wrapped in an XML string type + */ XmlString xgetWarningColour(); + /** + * Checks if a warning color is set. + * + * @return boolean true if warning color is set, false otherwise + */ boolean isSetWarningColour(); + /** + * Sets the color code for warning-level indicators. + * + * @param var1 String the warning color to set + */ void setWarningColour(String var1); + /** + * Sets the warning color using an XmlString object. + * + * @param var1 XmlString the warning color to set wrapped in XML string type + */ void xsetWarningColour(XmlString var1); + /** + * Clears the warning color. + */ void unsetWarningColour(); + /** + * Gets the color code used for recommendation-level clinical indicators. + *

    + * Recommendation colors indicate suggested actions or preventive care items + * that are due or recommended (e.g., blue for due immunizations). + *

    + * + * @return String the recommendation color (hex code or named color) + */ String getRecommendationColour(); + /** + * Gets the recommendation color as an XmlString object. + * + * @return XmlString the recommendation color wrapped in an XML string type + */ XmlString xgetRecommendationColour(); + /** + * Checks if a recommendation color is set. + * + * @return boolean true if recommendation color is set, false otherwise + */ boolean isSetRecommendationColour(); + /** + * Sets the color code for recommendation-level indicators. + * + * @param var1 String the recommendation color to set + */ void setRecommendationColour(String var1); + /** + * Sets the recommendation color using an XmlString object. + * + * @param var1 XmlString the recommendation color to set wrapped in XML string type + */ void xsetRecommendationColour(XmlString var1); + /** + * Clears the recommendation color. + */ void unsetRecommendationColour(); + /** + * Gets custom HTML content to display at the top of the flowsheet. + *

    + * Top HTML can include custom instructions, clinical guidelines, links to + * reference materials, or other context-specific information for clinicians. + *

    + * + * @return String HTML content for flowsheet header area + */ String getTopHTML(); + /** + * Gets the top HTML content as an XmlString object. + * + * @return XmlString the HTML content wrapped in an XML string type + */ XmlString xgetTopHTML(); + /** + * Checks if top HTML content is set. + * + * @return boolean true if top HTML is set, false otherwise + */ boolean isSetTopHTML(); + /** + * Sets custom HTML content to display at the top of the flowsheet. + * + * @param var1 String the HTML content to set + */ void setTopHTML(String var1); + /** + * Sets the top HTML content using an XmlString object. + * + * @param var1 XmlString the HTML content to set wrapped in XML string type + */ void xsetTopHTML(XmlString var1); + /** + * Clears the top HTML content. + */ void unsetTopHTML(); + /** + * Factory class for creating Flowsheet instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Flowsheet instance. + * + * @return Flowsheet new flowsheet object + */ public static Flowsheet newInstance() { return (Flowsheet)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.type, (XmlOptions)null); } + /** + * Creates a new empty Flowsheet instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Flowsheet new flowsheet object + */ public static Flowsheet newInstance(XmlOptions var0) { return (Flowsheet)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.type, var0); } @@ -266,42 +874,141 @@ private Factory() { } } + /** + * Flowsheet header element organizing related clinical items into sections or columns. + *

    + * Headers provide logical grouping of clinical items in the flowsheet display. Each header + * can contain multiple items representing measurements, preventive care, or other clinical + * data points that are conceptually related (e.g., "Vital Signs", "Laboratory Values", + * "Medications", "Preventive Care"). + *

    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item + * @since 2026-01-24 + */ public interface Header extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Header.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("headerd45felemtype"); + /** + * Gets array of all items contained in this header section. + * + * @return Item[] array of clinical items grouped under this header + */ Item[] getItemArray(); + /** + * Gets a specific item by array index. + * + * @param var1 int the zero-based index of the item to retrieve + * @return Item the item at the specified index + */ Item getItemArray(int var1); + /** + * Gets the number of items in this header section. + * + * @return int count of items + */ int sizeOfItemArray(); + /** + * Sets the complete array of items, replacing any existing items. + * + * @param var1 Item[] array of items to set + */ void setItemArray(Item[] var1); + /** + * Sets a specific item at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Item the item to set at this position + */ void setItemArray(int var1, Item var2); + /** + * Inserts a new item at the specified position in the array. + * + * @param var1 int the zero-based index where the new item should be inserted + * @return Item the newly inserted item ready for configuration + */ Item insertNewItem(int var1); + /** + * Adds a new item to the end of the item array. + * + * @return Item the newly added item ready for configuration + */ Item addNewItem(); + /** + * Removes an item at the specified array index. + * + * @param var1 int the zero-based index of the item to remove + */ void removeItem(int var1); + /** + * Gets the human-readable display name for this header section. + * + * @return String the header name shown in the flowsheet UI + */ String getDisplayName(); + /** + * Gets the display name as an XmlString object. + * + * @return XmlString the display name wrapped in an XML string type + */ XmlString xgetDisplayName(); + /** + * Checks if a display name is set for this header. + * + * @return boolean true if display name is set, false otherwise + */ boolean isSetDisplayName(); + /** + * Sets the human-readable display name for this header section. + * + * @param var1 String the display name to show in the UI + */ void setDisplayName(String var1); + /** + * Sets the display name using an XmlString object. + * + * @param var1 XmlString the display name to set wrapped in XML string type + */ void xsetDisplayName(XmlString var1); + /** + * Clears the display name. + */ void unsetDisplayName(); + /** + * Factory class for creating Header instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Header instance. + * + * @return Header new header object + */ public static Header newInstance() { return (Header)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.type, (XmlOptions)null); } + /** + * Creates a new empty Header instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Header new header object + */ public static Header newInstance(XmlOptions var0) { return (Header)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.type, var0); } @@ -310,118 +1017,417 @@ private Factory() { } } + /** + * Individual clinical data item within a flowsheet header section. + *

    + * An Item represents a specific clinical data point tracked on the flowsheet, such as: + *

    + *
      + *
    • A measurement type (blood pressure, weight, HbA1c, etc.)
    • + *
    • A prevention type (flu vaccine, mammogram, colonoscopy, etc.)
    • + *
    • A clinical observation or assessment
    • + *
    + *

    + * Items can have associated rules or rulesets that define clinical decision support logic, + * such as highlighting abnormal values or triggering recommendations based on the data entered. + *

    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item.Rules + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item.Ruleset + * @since 2026-01-24 + */ public interface Item extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Item.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("item0b90elemtype"); + /** + * Gets the rules configuration for clinical recommendations. + * + * @return Rules the rules object containing recommendation logic + */ Rules getRules(); + /** + * Checks if rules are defined for this item. + * + * @return boolean true if rules are set, false otherwise + */ boolean isSetRules(); + /** + * Sets the rules configuration for this item. + * + * @param var1 Rules the rules to set + */ void setRules(Rules var1); + /** + * Adds a new rules configuration to this item. + * + * @return Rules newly created rules object ready for configuration + */ Rules addNewRules(); + /** + * Clears the rules configuration. + */ void unsetRules(); + /** + * Gets the ruleset configuration for conditional item display. + * + * @return Ruleset the ruleset object containing display rules + */ Ruleset getRuleset(); + /** + * Checks if a ruleset is defined for this item. + * + * @return boolean true if ruleset is set, false otherwise + */ boolean isSetRuleset(); + /** + * Sets the ruleset configuration for this item. + * + * @param var1 Ruleset the ruleset to set + */ void setRuleset(Ruleset var1); + /** + * Adds a new ruleset configuration to this item. + * + * @return Ruleset newly created ruleset object ready for configuration + */ Ruleset addNewRuleset(); + /** + * Clears the ruleset configuration. + */ void unsetRuleset(); + /** + * Gets the measurement type code for this item. + *

    + * References a measurement type defined in the measurementType table, such as + * "BP" (blood pressure), "WT" (weight), "HBA" (HbA1c), etc. + *

    + * + * @return String the measurement type code + */ String getMeasurementType(); + /** + * Gets the measurement type as an XmlString object. + * + * @return XmlString the measurement type wrapped in an XML string type + */ XmlString xgetMeasurementType(); + /** + * Checks if a measurement type is set. + * + * @return boolean true if measurement type is set, false otherwise + */ boolean isSetMeasurementType(); + /** + * Sets the measurement type code for this item. + * + * @param var1 String the measurement type code to set + */ void setMeasurementType(String var1); + /** + * Sets the measurement type using an XmlString object. + * + * @param var1 XmlString the measurement type to set wrapped in XML string type + */ void xsetMeasurementType(XmlString var1); + /** + * Clears the measurement type. + */ void unsetMeasurementType(); + /** + * Gets the human-readable display name for this item. + * + * @return String the item name shown in the flowsheet UI + */ String getDisplayName(); + /** + * Gets the display name as an XmlString object. + * + * @return XmlString the display name wrapped in an XML string type + */ XmlString xgetDisplayName(); + /** + * Checks if a display name is set. + * + * @return boolean true if display name is set, false otherwise + */ boolean isSetDisplayName(); + /** + * Sets the human-readable display name for this item. + * + * @param var1 String the display name to show in the UI + */ void setDisplayName(String var1); + /** + * Sets the display name using an XmlString object. + * + * @param var1 XmlString the display name to set wrapped in XML string type + */ void xsetDisplayName(XmlString var1); + /** + * Clears the display name. + */ void unsetDisplayName(); + /** + * Gets the clinical guideline reference for this item. + *

    + * May contain a URL, guideline name, or reference to clinical practice guidelines + * that inform the recommended values or frequency for this measurement or prevention item. + *

    + * + * @return String the guideline reference text or URL + */ String getGuideline(); + /** + * Gets the guideline reference as an XmlString object. + * + * @return XmlString the guideline wrapped in an XML string type + */ XmlString xgetGuideline(); + /** + * Checks if a guideline reference is set. + * + * @return boolean true if guideline is set, false otherwise + */ boolean isSetGuideline(); + /** + * Sets the clinical guideline reference for this item. + * + * @param var1 String the guideline reference to set + */ void setGuideline(String var1); + /** + * Sets the guideline reference using an XmlString object. + * + * @param var1 XmlString the guideline to set wrapped in XML string type + */ void xsetGuideline(XmlString var1); + /** + * Clears the guideline reference. + */ void unsetGuideline(); + /** + * Gets whether this measurement can be displayed as a graph. + *

    + * Graphable measurements (like blood pressure, weight, HbA1c) can be plotted + * over time to show trends. Non-graphable items (like binary yes/no assessments) + * are displayed as text only. + *

    + * + * @return String "yes" if graphable, "no" otherwise + */ String getGraphable(); + /** + * Gets the graphable flag as an XmlString object. + * + * @return XmlString the graphable flag wrapped in an XML string type + */ XmlString xgetGraphable(); + /** + * Checks if the graphable flag is set. + * + * @return boolean true if graphable flag is set, false otherwise + */ boolean isSetGraphable(); + /** + * Sets whether this measurement can be displayed as a graph. + * + * @param var1 String "yes" to enable graphing, "no" to disable + */ void setGraphable(String var1); + /** + * Sets the graphable flag using an XmlString object. + * + * @param var1 XmlString the graphable flag to set wrapped in XML string type + */ void xsetGraphable(XmlString var1); + /** + * Clears the graphable flag. + */ void unsetGraphable(); + /** + * Gets the value name for this item. + *

    + * For measurements with multiple components (e.g., blood pressure with systolic/diastolic), + * this specifies which component value to use for rule evaluation or display. + *

    + * + * @return String the value component name + */ String getValueName(); + /** + * Gets the value name as an XmlString object. + * + * @return XmlString the value name wrapped in an XML string type + */ XmlString xgetValueName(); + /** + * Checks if a value name is set. + * + * @return boolean true if value name is set, false otherwise + */ boolean isSetValueName(); + /** + * Sets the value name for this item. + * + * @param var1 String the value component name to set + */ void setValueName(String var1); + /** + * Sets the value name using an XmlString object. + * + * @param var1 XmlString the value name to set wrapped in XML string type + */ void xsetValueName(XmlString var1); + /** + * Clears the value name. + */ void unsetValueName(); + /** + * Gets the decision support rules script for this item. + * + * @return String the decision support rules script + */ String getDsRules(); + /** + * Gets the decision support rules as an XmlString object. + * + * @return XmlString the DS rules wrapped in an XML string type + */ XmlString xgetDsRules(); + /** + * Checks if decision support rules are set for this item. + * + * @return boolean true if DS rules are set, false otherwise + */ boolean isSetDsRules(); + /** + * Sets the decision support rules script for this item. + * + * @param var1 String the decision support rules to set + */ void setDsRules(String var1); + /** + * Sets the decision support rules using an XmlString object. + * + * @param var1 XmlString the DS rules to set wrapped in XML string type + */ void xsetDsRules(XmlString var1); + /** + * Clears the decision support rules. + */ void unsetDsRules(); + /** + * Gets the prevention type code for this item. + *

    + * References a prevention type defined in the prevention system, such as + * "FLU" (influenza vaccine), "PAP" (Pap smear), "MAM" (mammogram), etc. + * Links the flowsheet item to the preventive care tracking system. + *

    + * + * @return String the prevention type code + */ String getPreventionType(); + /** + * Gets the prevention type as an XmlString object. + * + * @return XmlString the prevention type wrapped in an XML string type + */ XmlString xgetPreventionType(); + /** + * Checks if a prevention type is set. + * + * @return boolean true if prevention type is set, false otherwise + */ boolean isSetPreventionType(); + /** + * Sets the prevention type code for this item. + * + * @param var1 String the prevention type code to set + */ void setPreventionType(String var1); + /** + * Sets the prevention type using an XmlString object. + * + * @param var1 XmlString the prevention type to set wrapped in XML string type + */ void xsetPreventionType(XmlString var1); + /** + * Clears the prevention type. + */ void unsetPreventionType(); + /** + * Factory class for creating Item instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Item instance. + * + * @return Item new item object + */ public static Item newInstance() { return (Item)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.type, (XmlOptions)null); } + /** + * Creates a new empty Item instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Item new item object + */ public static Item newInstance(XmlOptions var0) { return (Item)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.type, var0); } @@ -430,30 +1436,100 @@ private Factory() { } } + /** + * Rules configuration defining clinical recommendations based on measurement values. + *

    + * Rules contain an array of recommendations, each with a condition that evaluates + * patient data and a strength indicator for the recommendation level (e.g., "warning", + * "recommendation", "alert"). + *

    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item.Rules.Recommendation + * @since 2026-01-24 + */ public interface Rules extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Rules.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("rules52f3elemtype"); + /** + * Gets array of all recommendations in this rules set. + * + * @return Recommendation[] array of clinical recommendations + */ Recommendation[] getRecommendationArray(); + /** + * Gets a specific recommendation by array index. + * + * @param var1 int the zero-based index of the recommendation to retrieve + * @return Recommendation the recommendation at the specified index + */ Recommendation getRecommendationArray(int var1); + /** + * Gets the number of recommendations in this rules set. + * + * @return int count of recommendations + */ int sizeOfRecommendationArray(); + /** + * Sets the complete array of recommendations, replacing any existing recommendations. + * + * @param var1 Recommendation[] array of recommendations to set + */ void setRecommendationArray(Recommendation[] var1); + /** + * Sets a specific recommendation at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Recommendation the recommendation to set at this position + */ void setRecommendationArray(int var1, Recommendation var2); + /** + * Inserts a new recommendation at the specified position in the array. + * + * @param var1 int the zero-based index where the new recommendation should be inserted + * @return Recommendation the newly inserted recommendation ready for configuration + */ Recommendation insertNewRecommendation(int var1); + /** + * Adds a new recommendation to the end of the recommendation array. + * + * @return Recommendation the newly added recommendation ready for configuration + */ Recommendation addNewRecommendation(); + /** + * Removes a recommendation at the specified array index. + * + * @param var1 int the zero-based index of the recommendation to remove + */ void removeRecommendation(int var1); + /** + * Factory class for creating Rules instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Rules instance. + * + * @return Rules new rules object + */ public static Rules newInstance() { return (Rules)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Rules.type, (XmlOptions)null); } + /** + * Creates a new empty Rules instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Rules new rules object + */ public static Rules newInstance(XmlOptions var0) { return (Rules)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Rules.type, var0); } @@ -462,71 +1538,257 @@ private Factory() { } } + /** + * Clinical recommendation triggered by specific conditions. + *

    + * A Recommendation consists of a condition that evaluates patient data and a + * strength indicator specifying the urgency or importance level of the recommendation. + * When the condition evaluates to true, the recommendation is displayed to the clinician + * with appropriate visual emphasis based on its strength. + *

    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item.Rules.Recommendation.Condition + * @since 2026-01-24 + */ public interface Recommendation extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Recommendation.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("recommendation6448elemtype"); + /** + * Gets the condition that triggers this recommendation. + * + * @return Condition the condition logic for this recommendation + */ Condition getCondition(); + /** + * Sets the condition that triggers this recommendation. + * + * @param var1 Condition the condition to set + */ void setCondition(Condition var1); + /** + * Adds a new condition to this recommendation. + * + * @return Condition newly created condition ready for configuration + */ Condition addNewCondition(); + /** + * Gets the strength level of this recommendation. + *

    + * Strength values indicate urgency or importance, such as "warning", + * "recommendation", "alert", "critical", etc. + *

    + * + * @return String the strength level of the recommendation + */ String getStrength(); + /** + * Gets the strength as an XmlString object. + * + * @return XmlString the strength wrapped in an XML string type + */ XmlString xgetStrength(); + /** + * Checks if a strength level is set. + * + * @return boolean true if strength is set, false otherwise + */ boolean isSetStrength(); + /** + * Sets the strength level of this recommendation. + * + * @param var1 String the strength level to set + */ void setStrength(String var1); + /** + * Sets the strength using an XmlString object. + * + * @param var1 XmlString the strength to set wrapped in XML string type + */ void xsetStrength(XmlString var1); + /** + * Clears the strength level. + */ void unsetStrength(); + /** + * Condition that evaluates patient data to trigger a recommendation. + *

    + * Conditions define logical tests on clinical data, such as: + *

    + *
      + *
    • Value comparisons: HbA1c > 7.0
    • + *
    • Date-based rules: last measurement > 6 months ago
    • + *
    • Existence checks: no flu vaccine recorded this year
    • + *
    • Complex logic: age > 50 AND no colonoscopy in last 10 years
    • + *
    + *

    + * The condition type determines the evaluation logic, param specifies what + * data to evaluate, and value provides the threshold or comparison value. + *

    + * + * @since 2026-01-24 + */ public interface Condition extends XmlString { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Condition.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("condition42a1elemtype"); + /** + * Gets the condition type specifying the evaluation logic. + * + * @return String the condition type (e.g., "greaterThan", "lessThan", "daysSince") + */ String getType(); + /** + * Gets the condition type as an XmlString object. + * + * @return XmlString the type wrapped in an XML string type + */ XmlString xgetType(); + /** + * Checks if a condition type is set. + * + * @return boolean true if type is set, false otherwise + */ boolean isSetType(); + /** + * Sets the condition type specifying the evaluation logic. + * + * @param var1 String the condition type to set + */ void setType(String var1); + /** + * Sets the condition type using an XmlString object. + * + * @param var1 XmlString the type to set wrapped in XML string type + */ void xsetType(XmlString var1); + /** + * Clears the condition type. + */ void unsetType(); + /** + * Gets the parameter specifying what data to evaluate. + *

    + * The parameter identifies which clinical data element to test, such as + * a measurement type code, prevention type, or other patient data field. + *

    + * + * @return String the parameter identifier + */ String getParam(); + /** + * Gets the parameter as an XmlString object. + * + * @return XmlString the parameter wrapped in an XML string type + */ XmlString xgetParam(); + /** + * Checks if a parameter is set. + * + * @return boolean true if parameter is set, false otherwise + */ boolean isSetParam(); + /** + * Sets the parameter specifying what data to evaluate. + * + * @param var1 String the parameter identifier to set + */ void setParam(String var1); + /** + * Sets the parameter using an XmlString object. + * + * @param var1 XmlString the parameter to set wrapped in XML string type + */ void xsetParam(XmlString var1); + /** + * Clears the parameter. + */ void unsetParam(); + /** + * Gets the comparison value for the condition. + *

    + * The value provides the threshold or target for comparison, such as + * a numeric threshold (7.0 for HbA1c), a date offset (180 for days), + * or a boolean flag. + *

    + * + * @return String the comparison value + */ String getValue(); + /** + * Gets the value as an XmlString object. + * + * @return XmlString the value wrapped in an XML string type + */ XmlString xgetValue(); + /** + * Checks if a comparison value is set. + * + * @return boolean true if value is set, false otherwise + */ boolean isSetValue(); + /** + * Sets the comparison value for the condition. + * + * @param var1 String the comparison value to set + */ void setValue(String var1); + /** + * Sets the value using an XmlString object. + * + * @param var1 XmlString the value to set wrapped in XML string type + */ void xsetValue(XmlString var1); + /** + * Clears the comparison value. + */ void unsetValue(); + /** + * Factory class for creating Condition instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Condition instance. + * + * @return Condition new condition object + */ public static Condition newInstance() { return (Condition)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Rules.Recommendation.Condition.type, (XmlOptions)null); } + /** + * Creates a new empty Condition instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Condition new condition object + */ public static Condition newInstance(XmlOptions var0) { return (Condition)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Rules.Recommendation.Condition.type, var0); } @@ -536,11 +1798,27 @@ private Factory() { } } + /** + * Factory class for creating Recommendation instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Recommendation instance. + * + * @return Recommendation new recommendation object + */ public static Recommendation newInstance() { return (Recommendation)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Rules.Recommendation.type, (XmlOptions)null); } + /** + * Creates a new empty Recommendation instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Recommendation new recommendation object + */ public static Recommendation newInstance(XmlOptions var0) { return (Recommendation)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Rules.Recommendation.type, var0); } @@ -551,30 +1829,100 @@ private Factory() { } } + /** + * Ruleset configuration defining conditional display logic for flowsheet items. + *

    + * Rulesets contain an array of rules that control when and how flowsheet items + * are displayed to clinicians. Rules can specify color coding, visibility conditions, + * and other display behaviors based on patient data. + *

    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item.Ruleset.Rule + * @since 2026-01-24 + */ public interface Ruleset extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Ruleset.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("ruleset0be2elemtype"); + /** + * Gets array of all rules in this ruleset. + * + * @return Rule[] array of display rules + */ Rule[] getRuleArray(); + /** + * Gets a specific rule by array index. + * + * @param var1 int the zero-based index of the rule to retrieve + * @return Rule the rule at the specified index + */ Rule getRuleArray(int var1); + /** + * Gets the number of rules in this ruleset. + * + * @return int count of rules + */ int sizeOfRuleArray(); + /** + * Sets the complete array of rules, replacing any existing rules. + * + * @param var1 Rule[] array of rules to set + */ void setRuleArray(Rule[] var1); + /** + * Sets a specific rule at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Rule the rule to set at this position + */ void setRuleArray(int var1, Rule var2); + /** + * Inserts a new rule at the specified position in the array. + * + * @param var1 int the zero-based index where the new rule should be inserted + * @return Rule the newly inserted rule ready for configuration + */ Rule insertNewRule(int var1); + /** + * Adds a new rule to the end of the rule array. + * + * @return Rule the newly added rule ready for configuration + */ Rule addNewRule(); + /** + * Removes a rule at the specified array index. + * + * @param var1 int the zero-based index of the rule to remove + */ void removeRule(int var1); + /** + * Factory class for creating Ruleset instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Ruleset instance. + * + * @return Ruleset new ruleset object + */ public static Ruleset newInstance() { return (Ruleset)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Ruleset.type, (XmlOptions)null); } + /** + * Creates a new empty Ruleset instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Ruleset new ruleset object + */ public static Ruleset newInstance(XmlOptions var0) { return (Ruleset)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Ruleset.type, var0); } @@ -583,81 +1931,284 @@ private Factory() { } } + /** + * Display rule specifying conditional color coding based on patient data. + *

    + * Rules define visual indicators that highlight important clinical information. + * Each rule contains one or more conditions and an indication color that is + * applied when all conditions evaluate to true. Common uses include: + *

    + *
      + *
    • Red for critical values requiring immediate attention
    • + *
    • Yellow for values approaching concerning thresholds
    • + *
    • Green for values within optimal ranges
    • + *
    • Blue for overdue preventive care items
    • + *
    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Header.Item.Ruleset.Rule.Condition + * @since 2026-01-24 + */ public interface Rule extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Rule.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("rule417aelemtype"); + /** + * Gets array of all conditions that must be true for this rule to apply. + * + * @return Condition[] array of condition logic (all must be true) + */ Condition[] getConditionArray(); + /** + * Gets a specific condition by array index. + * + * @param var1 int the zero-based index of the condition to retrieve + * @return Condition the condition at the specified index + */ Condition getConditionArray(int var1); + /** + * Gets the number of conditions in this rule. + * + * @return int count of conditions + */ int sizeOfConditionArray(); + /** + * Sets the complete array of conditions, replacing any existing conditions. + * + * @param var1 Condition[] array of conditions to set + */ void setConditionArray(Condition[] var1); + /** + * Sets a specific condition at the given array index. + * + * @param var1 int the zero-based index position + * @param var2 Condition the condition to set at this position + */ void setConditionArray(int var1, Condition var2); + /** + * Inserts a new condition at the specified position in the array. + * + * @param var1 int the zero-based index where the new condition should be inserted + * @return Condition the newly inserted condition ready for configuration + */ Condition insertNewCondition(int var1); + /** + * Adds a new condition to the end of the condition array. + * + * @return Condition the newly added condition ready for configuration + */ Condition addNewCondition(); + /** + * Removes a condition at the specified array index. + * + * @param var1 int the zero-based index of the condition to remove + */ void removeCondition(int var1); + /** + * Gets the color to display when this rule's conditions are met. + *

    + * Indication colors provide visual feedback about clinical status, + * typically as hex color codes (e.g., #FF0000) or named colors. + *

    + * + * @return String the indication color code or name + */ String getIndicationColor(); + /** + * Gets the indication color as an XmlString object. + * + * @return XmlString the indication color wrapped in an XML string type + */ XmlString xgetIndicationColor(); + /** + * Checks if an indication color is set. + * + * @return boolean true if indication color is set, false otherwise + */ boolean isSetIndicationColor(); + /** + * Sets the color to display when this rule's conditions are met. + * + * @param var1 String the indication color code or name to set + */ void setIndicationColor(String var1); + /** + * Sets the indication color using an XmlString object. + * + * @param var1 XmlString the indication color to set wrapped in XML string type + */ void xsetIndicationColor(XmlString var1); + /** + * Clears the indication color. + */ void unsetIndicationColor(); + /** + * Condition that evaluates patient data for display rule logic. + *

    + * Display rule conditions determine when visual indicators should be shown. + * The condition type, param, and value work together to define the evaluation + * logic, similar to recommendation conditions but focused on visual display + * rather than clinical recommendations. + *

    + * + * @since 2026-01-24 + */ public interface Condition extends XmlString { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Condition.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("condition88d3elemtype"); + /** + * Gets the condition type specifying the evaluation logic. + * + * @return String the condition type (e.g., "greaterThan", "lessThan", "equals") + */ String getType(); + /** + * Gets the condition type as an XmlString object. + * + * @return XmlString the type wrapped in an XML string type + */ XmlString xgetType(); + /** + * Checks if a condition type is set. + * + * @return boolean true if type is set, false otherwise + */ boolean isSetType(); + /** + * Sets the condition type specifying the evaluation logic. + * + * @param var1 String the condition type to set + */ void setType(String var1); + /** + * Sets the condition type using an XmlString object. + * + * @param var1 XmlString the type to set wrapped in XML string type + */ void xsetType(XmlString var1); + /** + * Clears the condition type. + */ void unsetType(); + /** + * Gets the parameter specifying what data to evaluate. + * + * @return String the parameter identifier + */ String getParam(); + /** + * Gets the parameter as an XmlString object. + * + * @return XmlString the parameter wrapped in an XML string type + */ XmlString xgetParam(); + /** + * Checks if a parameter is set. + * + * @return boolean true if parameter is set, false otherwise + */ boolean isSetParam(); + /** + * Sets the parameter specifying what data to evaluate. + * + * @param var1 String the parameter identifier to set + */ void setParam(String var1); + /** + * Sets the parameter using an XmlString object. + * + * @param var1 XmlString the parameter to set wrapped in XML string type + */ void xsetParam(XmlString var1); + /** + * Clears the parameter. + */ void unsetParam(); + /** + * Gets the comparison value for the condition. + * + * @return String the comparison value + */ String getValue(); + /** + * Gets the value as an XmlString object. + * + * @return XmlString the value wrapped in an XML string type + */ XmlString xgetValue(); + /** + * Checks if a comparison value is set. + * + * @return boolean true if value is set, false otherwise + */ boolean isSetValue(); + /** + * Sets the comparison value for the condition. + * + * @param var1 String the comparison value to set + */ void setValue(String var1); + /** + * Sets the value using an XmlString object. + * + * @param var1 XmlString the value to set wrapped in XML string type + */ void xsetValue(XmlString var1); + /** + * Clears the comparison value. + */ void unsetValue(); + /** + * Factory class for creating Condition instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Condition instance. + * + * @return Condition new condition object + */ public static Condition newInstance() { return (Condition)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Ruleset.Rule.Condition.type, (XmlOptions)null); } + /** + * Creates a new empty Condition instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Condition new condition object + */ public static Condition newInstance(XmlOptions var0) { return (Condition)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Ruleset.Rule.Condition.type, var0); } @@ -667,11 +2218,27 @@ private Factory() { } } + /** + * Factory class for creating Rule instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Rule instance. + * + * @return Rule new rule object + */ public static Rule newInstance() { return (Rule)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Ruleset.Rule.type, (XmlOptions)null); } + /** + * Creates a new empty Rule instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Rule new rule object + */ public static Rule newInstance(XmlOptions var0) { return (Rule)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Header.Item.Ruleset.Rule.type, var0); } @@ -684,38 +2251,131 @@ private Factory() { } } + /** + * Visual indicator configuration for flowsheet display. + *

    + * Indicators provide color-coded visual markers that communicate clinical status + * at a glance. Each indicator has a key (identifier) and an associated color. + * Common indicator uses include: + *

    + *
      + *
    • Status indicators: due, overdue, completed, not applicable
    • + *
    • Risk indicators: low risk, moderate risk, high risk
    • + *
    • Value range indicators: normal, borderline, abnormal
    • + *
    • Timeline indicators: recent, moderate age, outdated
    • + *
    + * + * @since 2026-01-24 + */ public interface Indicator extends XmlString { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Indicator.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("indicatorefb1elemtype"); + /** + * Gets the unique key identifier for this indicator. + * + * @return String the indicator key used in rule references + */ String getKey(); + /** + * Gets the indicator key as an XmlString object. + * + * @return XmlString the key wrapped in an XML string type + */ XmlString xgetKey(); + /** + * Checks if an indicator key is set. + * + * @return boolean true if key is set, false otherwise + */ boolean isSetKey(); + /** + * Sets the unique key identifier for this indicator. + * + * @param var1 String the indicator key to set + */ void setKey(String var1); + /** + * Sets the indicator key using an XmlString object. + * + * @param var1 XmlString the key to set wrapped in XML string type + */ void xsetKey(XmlString var1); + /** + * Clears the indicator key. + */ void unsetKey(); + /** + * Gets the color code for this indicator. + *

    + * Colors can be specified as hex codes (e.g., #FF0000) or named colors. + * The color is used to visually highlight items in the flowsheet display + * when this indicator is active. + *

    + * + * @return String the color code or name + */ String getColour(); + /** + * Gets the indicator color as an XmlString object. + * + * @return XmlString the color wrapped in an XML string type + */ XmlString xgetColour(); + /** + * Checks if an indicator color is set. + * + * @return boolean true if color is set, false otherwise + */ boolean isSetColour(); + /** + * Sets the color code for this indicator. + * + * @param var1 String the color code or name to set + */ void setColour(String var1); + /** + * Sets the indicator color using an XmlString object. + * + * @param var1 XmlString the color to set wrapped in XML string type + */ void xsetColour(XmlString var1); + /** + * Clears the indicator color. + */ void unsetColour(); + /** + * Factory class for creating Indicator instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Indicator instance. + * + * @return Indicator new indicator object + */ public static Indicator newInstance() { return (Indicator)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Indicator.type, (XmlOptions)null); } + /** + * Creates a new empty Indicator instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Indicator new indicator object + */ public static Indicator newInstance(XmlOptions var0) { return (Indicator)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Indicator.type, var0); } @@ -725,68 +2385,241 @@ private Factory() { } } + /** + * Clinical measurement type configuration with validation rules. + *

    + * Measurement definitions specify the types of clinical data that can be recorded + * in the flowsheet and the validation rules that ensure data quality. Each measurement + * has a type code, descriptive text, display name, measuring instructions, and a + * validation rule that defines acceptable value ranges and formats. + *

    + *

    + * Common measurement types include: + *

    + *
      + *
    • Vital signs: blood pressure, heart rate, temperature, respiratory rate, oxygen saturation
    • + *
    • Anthropometric: height, weight, BMI, waist circumference
    • + *
    • Laboratory: HbA1c, cholesterol, creatinine, eGFR, glucose
    • + *
    • Clinical assessments: pain score, mental health screening scores
    • + *
    + * + * @see ca.openosp.openo.flowsheets.FlowsheetDocument.Flowsheet.Measurement.ValidationRule + * @since 2026-01-24 + */ public interface Measurement extends XmlObject { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(Measurement.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("measurement255eelemtype"); + /** + * Gets the validation rule configuration for this measurement type. + * + * @return ValidationRule the validation rule defining acceptable values + */ ValidationRule getValidationRule(); + /** + * Sets the validation rule for this measurement type. + * + * @param var1 ValidationRule the validation rule to set + */ void setValidationRule(ValidationRule var1); + /** + * Adds a new validation rule to this measurement type. + * + * @return ValidationRule newly created validation rule ready for configuration + */ ValidationRule addNewValidationRule(); + /** + * Gets the measurement type code. + *

    + * The type code is a short identifier matching a measurementType in the system, + * such as "BP" for blood pressure, "WT" for weight, "HBA" for HbA1c, etc. + *

    + * + * @return String the measurement type code + */ String getType(); + /** + * Gets the measurement type as an XmlString object. + * + * @return XmlString the type wrapped in an XML string type + */ XmlString xgetType(); + /** + * Checks if a measurement type is set. + * + * @return boolean true if type is set, false otherwise + */ boolean isSetType(); + /** + * Sets the measurement type code. + * + * @param var1 String the measurement type code to set + */ void setType(String var1); + /** + * Sets the measurement type using an XmlString object. + * + * @param var1 XmlString the type to set wrapped in XML string type + */ void xsetType(XmlString var1); + /** + * Clears the measurement type. + */ void unsetType(); + /** + * Gets the descriptive text for this measurement type. + * + * @return String the detailed description of the measurement + */ String getTypeDesc(); + /** + * Gets the type description as an XmlString object. + * + * @return XmlString the description wrapped in an XML string type + */ XmlString xgetTypeDesc(); + /** + * Checks if a type description is set. + * + * @return boolean true if description is set, false otherwise + */ boolean isSetTypeDesc(); + /** + * Sets the descriptive text for this measurement type. + * + * @param var1 String the description to set + */ void setTypeDesc(String var1); + /** + * Sets the type description using an XmlString object. + * + * @param var1 XmlString the description to set wrapped in XML string type + */ void xsetTypeDesc(XmlString var1); + /** + * Clears the type description. + */ void unsetTypeDesc(); + /** + * Gets the human-readable display name for this measurement type. + * + * @return String the measurement name shown in the flowsheet UI + */ String getTypeDisplayName(); + /** + * Gets the type display name as an XmlString object. + * + * @return XmlString the display name wrapped in an XML string type + */ XmlString xgetTypeDisplayName(); + /** + * Checks if a type display name is set. + * + * @return boolean true if display name is set, false otherwise + */ boolean isSetTypeDisplayName(); + /** + * Sets the human-readable display name for this measurement type. + * + * @param var1 String the display name to set + */ void setTypeDisplayName(String var1); + /** + * Sets the type display name using an XmlString object. + * + * @param var1 XmlString the display name to set wrapped in XML string type + */ void xsetTypeDisplayName(XmlString var1); + /** + * Clears the type display name. + */ void unsetTypeDisplayName(); + /** + * Gets the measuring instructions for clinicians. + *

    + * Instructions provide guidance on proper measurement technique, such as + * "Measure after patient has been seated for 5 minutes" for blood pressure, + * or "Fasting glucose required" for certain lab tests. + *

    + * + * @return String the measurement instructions text + */ String getMeasuringInstrc(); + /** + * Gets the measuring instructions as an XmlString object. + * + * @return XmlString the instructions wrapped in an XML string type + */ XmlString xgetMeasuringInstrc(); + /** + * Checks if measuring instructions are set. + * + * @return boolean true if instructions are set, false otherwise + */ boolean isSetMeasuringInstrc(); + /** + * Sets the measuring instructions for clinicians. + * + * @param var1 String the measurement instructions to set + */ void setMeasuringInstrc(String var1); + /** + * Sets the measuring instructions using an XmlString object. + * + * @param var1 XmlString the instructions to set wrapped in XML string type + */ void xsetMeasuringInstrc(XmlString var1); + /** + * Clears the measuring instructions. + */ void unsetMeasuringInstrc(); + /** + * Factory class for creating Measurement instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty Measurement instance. + * + * @return Measurement new measurement object + */ public static Measurement newInstance() { return (Measurement)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Measurement.type, (XmlOptions)null); } + /** + * Creates a new empty Measurement instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return Measurement new measurement object + */ public static Measurement newInstance(XmlOptions var0) { return (Measurement)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Measurement.type, var0); } @@ -795,110 +2628,372 @@ private Factory() { } } + /** + * Validation rule defining acceptable value constraints for a measurement type. + *

    + * Validation rules ensure data quality by specifying: + *

    + *
      + *
    • Numeric constraints: minimum and maximum acceptable values
    • + *
    • Data type validation: numeric, date, or string data
    • + *
    • Format validation: regular expression patterns for complex formats
    • + *
    • Length constraints: minimum and maximum string lengths
    • + *
    + *

    + * Rules are enforced at data entry time, preventing invalid values from being + * recorded and providing immediate feedback to clinicians. + *

    + * + * @since 2026-01-24 + */ public interface ValidationRule extends XmlString { SchemaType type = (SchemaType)XmlBeans.typeSystemForClassLoader(ValidationRule.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sB2AF798ADE52EA1BCFFBCA28E4F3F101").resolveHandle("validationrule634felemtype"); + /** + * Gets the validation rule name. + * + * @return String the rule name identifier + */ String getName(); + /** + * Gets the rule name as an XmlString object. + * + * @return XmlString the name wrapped in an XML string type + */ XmlString xgetName(); + /** + * Checks if a rule name is set. + * + * @return boolean true if name is set, false otherwise + */ boolean isSetName(); + /** + * Sets the validation rule name. + * + * @param var1 String the rule name to set + */ void setName(String var1); + /** + * Sets the rule name using an XmlString object. + * + * @param var1 XmlString the name to set wrapped in XML string type + */ void xsetName(XmlString var1); + /** + * Clears the rule name. + */ void unsetName(); + /** + * Gets the regular expression pattern for format validation. + *

    + * Regular expressions validate complex formats such as date patterns, + * blood pressure format (120/80), or other structured data. + *

    + * + * @return String the regular expression pattern + */ String getRegularExp(); + /** + * Gets the regular expression as an XmlString object. + * + * @return XmlString the pattern wrapped in an XML string type + */ XmlString xgetRegularExp(); + /** + * Checks if a regular expression is set. + * + * @return boolean true if regex is set, false otherwise + */ boolean isSetRegularExp(); + /** + * Sets the regular expression pattern for format validation. + * + * @param var1 String the regular expression to set + */ void setRegularExp(String var1); + /** + * Sets the regular expression using an XmlString object. + * + * @param var1 XmlString the pattern to set wrapped in XML string type + */ void xsetRegularExp(XmlString var1); + /** + * Clears the regular expression. + */ void unsetRegularExp(); + /** + * Gets the maximum acceptable numeric value. + * + * @return String the maximum value as a string representation + */ String getMaxValue(); + /** + * Gets the maximum value as an XmlString object. + * + * @return XmlString the maximum value wrapped in an XML string type + */ XmlString xgetMaxValue(); + /** + * Checks if a maximum value is set. + * + * @return boolean true if max value is set, false otherwise + */ boolean isSetMaxValue(); + /** + * Sets the maximum acceptable numeric value. + * + * @param var1 String the maximum value to set + */ void setMaxValue(String var1); + /** + * Sets the maximum value using an XmlString object. + * + * @param var1 XmlString the maximum value to set wrapped in XML string type + */ void xsetMaxValue(XmlString var1); + /** + * Clears the maximum value. + */ void unsetMaxValue(); + /** + * Gets the minimum acceptable numeric value. + * + * @return String the minimum value as a string representation + */ String getMinValue(); + /** + * Gets the minimum value as an XmlString object. + * + * @return XmlString the minimum value wrapped in an XML string type + */ XmlString xgetMinValue(); + /** + * Checks if a minimum value is set. + * + * @return boolean true if min value is set, false otherwise + */ boolean isSetMinValue(); + /** + * Sets the minimum acceptable numeric value. + * + * @param var1 String the minimum value to set + */ void setMinValue(String var1); + /** + * Sets the minimum value using an XmlString object. + * + * @param var1 XmlString the minimum value to set wrapped in XML string type + */ void xsetMinValue(XmlString var1); + /** + * Clears the minimum value. + */ void unsetMinValue(); + /** + * Gets whether this measurement value should be validated as a date. + * + * @return String "yes" if date validation required, "no" otherwise + */ String getIsDate(); + /** + * Gets the date flag as an XmlString object. + * + * @return XmlString the date flag wrapped in an XML string type + */ XmlString xgetIsDate(); + /** + * Checks if the date flag is set. + * + * @return boolean true if date flag is set, false otherwise + */ boolean isSetIsDate(); + /** + * Sets whether this measurement value should be validated as a date. + * + * @param var1 String "yes" to require date validation, "no" otherwise + */ void setIsDate(String var1); + /** + * Sets the date flag using an XmlString object. + * + * @param var1 XmlString the date flag to set wrapped in XML string type + */ void xsetIsDate(XmlString var1); + /** + * Clears the date flag. + */ void unsetIsDate(); + /** + * Gets whether this measurement value should be validated as numeric. + * + * @return String "yes" if numeric validation required, "no" otherwise + */ String getIsNumeric(); + /** + * Gets the numeric flag as an XmlString object. + * + * @return XmlString the numeric flag wrapped in an XML string type + */ XmlString xgetIsNumeric(); + /** + * Checks if the numeric flag is set. + * + * @return boolean true if numeric flag is set, false otherwise + */ boolean isSetIsNumeric(); + /** + * Sets whether this measurement value should be validated as numeric. + * + * @param var1 String "yes" to require numeric validation, "no" otherwise + */ void setIsNumeric(String var1); + /** + * Sets the numeric flag using an XmlString object. + * + * @param var1 XmlString the numeric flag to set wrapped in XML string type + */ void xsetIsNumeric(XmlString var1); + /** + * Clears the numeric flag. + */ void unsetIsNumeric(); + /** + * Gets the maximum allowed string length for text values. + * + * @return String the maximum length as a string representation + */ String getMaxLength(); + /** + * Gets the maximum length as an XmlString object. + * + * @return XmlString the maximum length wrapped in an XML string type + */ XmlString xgetMaxLength(); + /** + * Checks if a maximum length is set. + * + * @return boolean true if max length is set, false otherwise + */ boolean isSetMaxLength(); + /** + * Sets the maximum allowed string length for text values. + * + * @param var1 String the maximum length to set + */ void setMaxLength(String var1); + /** + * Sets the maximum length using an XmlString object. + * + * @param var1 XmlString the maximum length to set wrapped in XML string type + */ void xsetMaxLength(XmlString var1); + /** + * Clears the maximum length. + */ void unsetMaxLength(); + /** + * Gets the minimum required string length for text values. + * + * @return String the minimum length as a string representation + */ String getMinLength(); + /** + * Gets the minimum length as an XmlString object. + * + * @return XmlString the minimum length wrapped in an XML string type + */ XmlString xgetMinLength(); + /** + * Checks if a minimum length is set. + * + * @return boolean true if min length is set, false otherwise + */ boolean isSetMinLength(); + /** + * Sets the minimum required string length for text values. + * + * @param var1 String the minimum length to set + */ void setMinLength(String var1); + /** + * Sets the minimum length using an XmlString object. + * + * @param var1 XmlString the minimum length to set wrapped in XML string type + */ void xsetMinLength(XmlString var1); + /** + * Clears the minimum length. + */ void unsetMinLength(); + /** + * Factory class for creating ValidationRule instances. + * + * @since 2026-01-24 + */ public static final class Factory { + /** + * Creates a new empty ValidationRule instance. + * + * @return ValidationRule new validation rule object + */ public static ValidationRule newInstance() { return (ValidationRule)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Measurement.ValidationRule.type, (XmlOptions)null); } + /** + * Creates a new empty ValidationRule instance with specified options. + * + * @param var0 XmlOptions options for XML parsing and validation + * @return ValidationRule new validation rule object + */ public static ValidationRule newInstance(XmlOptions var0) { return (ValidationRule)XmlBeans.getContextTypeLoader().newInstance(FlowsheetDocument.Flowsheet.Measurement.ValidationRule.type, var0); } diff --git a/src/main/java/ca/openosp/openo/flowsheets/impl/FlowsheetDocumentImpl.java b/src/main/java/ca/openosp/openo/flowsheets/impl/FlowsheetDocumentImpl.java index a62d619bd3d..5fb73a0a9d1 100644 --- a/src/main/java/ca/openosp/openo/flowsheets/impl/FlowsheetDocumentImpl.java +++ b/src/main/java/ca/openosp/openo/flowsheets/impl/FlowsheetDocumentImpl.java @@ -9,14 +9,56 @@ import org.apache.xmlbeans.impl.values.XmlComplexContentImpl; import ca.openosp.openo.flowsheets.FlowsheetDocument; +/** + * Apache XMLBeans implementation of the FlowsheetDocument interface for OpenO EMR. + * + * This class provides XML data binding for clinical flowsheet documents used in electronic medical records. + * Flowsheets are structured clinical data collection forms that enable systematic tracking of patient + * measurements, indicators, and clinical decision support rules over time. + * + *

    Key features include: + *

      + *
    • XML-based representation of flowsheet structure and content
    • + *
    • Support for clinical indicators with color-coded visual alerts
    • + *
    • Configurable measurement types with validation rules
    • + *
    • Decision support rules with conditional recommendations
    • + *
    • Thread-safe access to all flowsheet elements
    • + *
    • Type-safe Java object model for XML schema elements
    • + *
    + * + *

    This implementation is auto-generated by Apache XMLBeans from the flowsheet XML schema, + * providing a strongly-typed interface for creating, reading, updating, and deleting flowsheet + * data within the OpenO EMR system. All XML operations are synchronized for thread safety in + * multi-user healthcare environments. + * + * @see FlowsheetDocument + * @since 2026-01-24 + */ public class FlowsheetDocumentImpl extends XmlComplexContentImpl implements FlowsheetDocument { private static final long serialVersionUID = 1L; private static final QName FLOWSHEET$0 = new QName("flowsheets.oscarehr.org", "flowsheet"); + /** + * Constructs a new FlowsheetDocumentImpl with the specified XML schema type. + * + * This constructor is typically invoked by the XMLBeans framework during + * document parsing or creation operations. + * + * @param var1 SchemaType the XML schema type definition for this flowsheet document + */ public FlowsheetDocumentImpl(SchemaType var1) { super(var1); } + /** + * Retrieves the flowsheet element from this document. + * + * This method provides thread-safe access to the root flowsheet element, + * which contains all indicators, headers, measurements, and clinical rules + * defined for this flowsheet template. + * + * @return FlowsheetDocument.Flowsheet the flowsheet element, or null if not set + */ public FlowsheetDocument.Flowsheet getFlowsheet() { synchronized(this.monitor()) { this.check_orphaned(); @@ -26,10 +68,27 @@ public FlowsheetDocument.Flowsheet getFlowsheet() { } } + /** + * Sets the flowsheet element for this document. + * + * This method replaces the existing flowsheet element with the provided one, + * updating all associated indicators, headers, and measurements. + * + * @param var1 FlowsheetDocument.Flowsheet the new flowsheet element to set + */ public void setFlowsheet(FlowsheetDocument.Flowsheet var1) { this.generatedSetterHelperImpl(var1, FLOWSHEET$0, 0, (short)1); } + /** + * Creates and adds a new flowsheet element to this document. + * + * This factory method creates a new empty flowsheet element and adds it to + * the document, returning a reference for further configuration. This is the + * standard way to initialize a new flowsheet template in the EMR system. + * + * @return FlowsheetDocument.Flowsheet the newly created flowsheet element + */ public FlowsheetDocument.Flowsheet addNewFlowsheet() { synchronized(this.monitor()) { this.check_orphaned(); @@ -39,6 +98,28 @@ public FlowsheetDocument.Flowsheet addNewFlowsheet() { } } + /** + * Apache XMLBeans implementation of the Flowsheet interface. + * + * This nested class represents the root flowsheet element, containing all clinical data collection + * components including indicators, headers, measurements, and their associated validation rules. + * Flowsheets are used in OpenO EMR to systematically track patient data over time with built-in + * clinical decision support. + * + *

    A flowsheet typically includes: + *

      + *
    • Indicators - Visual status indicators with color coding for clinical alerts
    • + *
    • Headers - Column headers with measurement items and decision support rules
    • + *
    • Measurements - Clinical measurement types with validation rules (vitals, labs, etc.)
    • + *
    • Configuration - Display properties, diagnosis triggers, and HTML customization
    • + *
    + * + *

    All array-based operations (get, set, insert, remove) are thread-safe and synchronized + * for concurrent access in multi-user healthcare environments. + * + * @see FlowsheetDocument.Flowsheet + * @since 2026-01-24 + */ public static class FlowsheetImpl extends XmlComplexContentImpl implements FlowsheetDocument.Flowsheet { private static final long serialVersionUID = 1L; private static final QName INDICATOR$0 = new QName("flowsheets.oscarehr.org", "indicator"); @@ -52,10 +133,23 @@ public static class FlowsheetImpl extends XmlComplexContentImpl implements Flows private static final QName RECOMMENDATIONCOLOUR$16 = new QName("", "recommendation_colour"); private static final QName TOPHTML$18 = new QName("", "top_HTML"); + /** + * Constructs a new FlowsheetImpl with the specified XML schema type. + * + * @param var1 SchemaType the XML schema type definition for this flowsheet + */ public FlowsheetImpl(SchemaType var1) { super(var1); } + /** + * Retrieves all indicator elements from this flowsheet. + * + * Indicators provide visual status cues with color coding for clinical decision support, + * typically displayed as colored markers or icons in the flowsheet interface. + * + * @return FlowsheetDocument.Flowsheet.Indicator[] array of all indicator elements + */ public FlowsheetDocument.Flowsheet.Indicator[] getIndicatorArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -67,6 +161,13 @@ public FlowsheetDocument.Flowsheet.Indicator[] getIndicatorArray() { } } + /** + * Retrieves the indicator element at the specified index. + * + * @param var1 int the zero-based index of the indicator to retrieve + * @return FlowsheetDocument.Flowsheet.Indicator the indicator at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public FlowsheetDocument.Flowsheet.Indicator getIndicatorArray(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -80,6 +181,11 @@ public FlowsheetDocument.Flowsheet.Indicator getIndicatorArray(int var1) { } } + /** + * Returns the number of indicator elements in this flowsheet. + * + * @return int the count of indicator elements + */ public int sizeOfIndicatorArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -87,15 +193,41 @@ public int sizeOfIndicatorArray() { } } + /** + * Replaces all indicator elements in this flowsheet with the provided array. + * + * This method removes all existing indicators and sets the new array of indicators + * for clinical decision support visual cues. + * + * @param var1 FlowsheetDocument.Flowsheet.Indicator[] array of indicator elements to set + */ public void setIndicatorArray(FlowsheetDocument.Flowsheet.Indicator[] var1) { this.check_orphaned(); this.arraySetterHelper(var1, INDICATOR$0); } + /** + * Sets the indicator element at the specified index position. + * + * This method replaces the indicator at the given index with the new indicator element. + * + * @param var1 int the zero-based index position where the indicator should be set + * @param var2 FlowsheetDocument.Flowsheet.Indicator the indicator element to set + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setIndicatorArray(int var1, FlowsheetDocument.Flowsheet.Indicator var2) { this.generatedSetterHelperImpl(var2, INDICATOR$0, var1, (short)2); } + /** + * Inserts a new indicator element at the specified index position. + * + * This factory method creates and inserts a new empty indicator at the given index, + * shifting existing indicators at or after that position to the right. + * + * @param var1 int the zero-based index position where the new indicator should be inserted + * @return FlowsheetDocument.Flowsheet.Indicator the newly created and inserted indicator element + */ public FlowsheetDocument.Flowsheet.Indicator insertNewIndicator(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -105,6 +237,14 @@ public FlowsheetDocument.Flowsheet.Indicator insertNewIndicator(int var1) { } } + /** + * Creates and appends a new indicator element to the end of the indicator array. + * + * This factory method creates a new empty indicator and adds it to the end of the + * existing indicators array, providing clinical decision support visual cues. + * + * @return FlowsheetDocument.Flowsheet.Indicator the newly created indicator element + */ public FlowsheetDocument.Flowsheet.Indicator addNewIndicator() { synchronized(this.monitor()) { this.check_orphaned(); @@ -114,6 +254,14 @@ public FlowsheetDocument.Flowsheet.Indicator addNewIndicator() { } } + /** + * Removes the indicator element at the specified index position. + * + * This method deletes the indicator at the given index, shifting any subsequent + * indicators to the left to fill the gap. + * + * @param var1 int the zero-based index of the indicator to remove + */ public void removeIndicator(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -121,6 +269,15 @@ public void removeIndicator(int var1) { } } + /** + * Retrieves all header elements from this flowsheet. + * + * Headers define the column structure of the flowsheet, containing measurement items + * and associated clinical decision support rules. Each header represents a column + * in the flowsheet display. + * + * @return FlowsheetDocument.Flowsheet.Header[] array of all header elements + */ public FlowsheetDocument.Flowsheet.Header[] getHeaderArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -132,6 +289,13 @@ public FlowsheetDocument.Flowsheet.Header[] getHeaderArray() { } } + /** + * Retrieves the header element at the specified index. + * + * @param var1 int the zero-based index of the header to retrieve + * @return FlowsheetDocument.Flowsheet.Header the header at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public FlowsheetDocument.Flowsheet.Header getHeaderArray(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -145,6 +309,11 @@ public FlowsheetDocument.Flowsheet.Header getHeaderArray(int var1) { } } + /** + * Returns the number of header elements in this flowsheet. + * + * @return int the count of header elements (flowsheet columns) + */ public int sizeOfHeaderArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -152,15 +321,41 @@ public int sizeOfHeaderArray() { } } + /** + * Replaces all header elements in this flowsheet with the provided array. + * + * This method removes all existing headers and sets the new array of column headers + * with their associated measurement items and rules. + * + * @param var1 FlowsheetDocument.Flowsheet.Header[] array of header elements to set + */ public void setHeaderArray(FlowsheetDocument.Flowsheet.Header[] var1) { this.check_orphaned(); this.arraySetterHelper(var1, HEADER$2); } + /** + * Sets the header element at the specified index position. + * + * This method replaces the header at the given index with the new header element. + * + * @param var1 int the zero-based index position where the header should be set + * @param var2 FlowsheetDocument.Flowsheet.Header the header element to set + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setHeaderArray(int var1, FlowsheetDocument.Flowsheet.Header var2) { this.generatedSetterHelperImpl(var2, HEADER$2, var1, (short)2); } + /** + * Inserts a new header element at the specified index position. + * + * This factory method creates and inserts a new empty header at the given index, + * shifting existing headers at or after that position to the right. + * + * @param var1 int the zero-based index position where the new header should be inserted + * @return FlowsheetDocument.Flowsheet.Header the newly created and inserted header element + */ public FlowsheetDocument.Flowsheet.Header insertNewHeader(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -170,6 +365,14 @@ public FlowsheetDocument.Flowsheet.Header insertNewHeader(int var1) { } } + /** + * Creates and appends a new header element to the end of the header array. + * + * This factory method creates a new empty header and adds it to the end of the + * existing headers array, defining a new column in the flowsheet. + * + * @return FlowsheetDocument.Flowsheet.Header the newly created header element + */ public FlowsheetDocument.Flowsheet.Header addNewHeader() { synchronized(this.monitor()) { this.check_orphaned(); @@ -179,6 +382,14 @@ public FlowsheetDocument.Flowsheet.Header addNewHeader() { } } + /** + * Removes the header element at the specified index position. + * + * This method deletes the header at the given index, shifting any subsequent + * headers to the left to fill the gap. + * + * @param var1 int the zero-based index of the header to remove + */ public void removeHeader(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -186,6 +397,15 @@ public void removeHeader(int var1) { } } + /** + * Retrieves all measurement elements from this flowsheet. + * + * Measurements define the clinical measurement types tracked in the flowsheet, + * such as vital signs, laboratory values, and other clinical observations. + * Each measurement includes validation rules and data type specifications. + * + * @return FlowsheetDocument.Flowsheet.Measurement[] array of all measurement elements + */ public FlowsheetDocument.Flowsheet.Measurement[] getMeasurementArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -197,6 +417,13 @@ public FlowsheetDocument.Flowsheet.Measurement[] getMeasurementArray() { } } + /** + * Retrieves the measurement element at the specified index. + * + * @param var1 int the zero-based index of the measurement to retrieve + * @return FlowsheetDocument.Flowsheet.Measurement the measurement at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public FlowsheetDocument.Flowsheet.Measurement getMeasurementArray(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -210,6 +437,11 @@ public FlowsheetDocument.Flowsheet.Measurement getMeasurementArray(int var1) { } } + /** + * Returns the number of measurement elements in this flowsheet. + * + * @return int the count of measurement elements + */ public int sizeOfMeasurementArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -217,15 +449,41 @@ public int sizeOfMeasurementArray() { } } + /** + * Replaces all measurement elements in this flowsheet with the provided array. + * + * This method removes all existing measurements and sets the new array of clinical + * measurement type definitions with their validation rules. + * + * @param var1 FlowsheetDocument.Flowsheet.Measurement[] array of measurement elements to set + */ public void setMeasurementArray(FlowsheetDocument.Flowsheet.Measurement[] var1) { this.check_orphaned(); this.arraySetterHelper(var1, MEASUREMENT$4); } + /** + * Sets the measurement element at the specified index position. + * + * This method replaces the measurement at the given index with the new measurement element. + * + * @param var1 int the zero-based index position where the measurement should be set + * @param var2 FlowsheetDocument.Flowsheet.Measurement the measurement element to set + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setMeasurementArray(int var1, FlowsheetDocument.Flowsheet.Measurement var2) { this.generatedSetterHelperImpl(var2, MEASUREMENT$4, var1, (short)2); } + /** + * Inserts a new measurement element at the specified index position. + * + * This factory method creates and inserts a new empty measurement at the given index, + * shifting existing measurements at or after that position to the right. + * + * @param var1 int the zero-based index position where the new measurement should be inserted + * @return FlowsheetDocument.Flowsheet.Measurement the newly created and inserted measurement element + */ public FlowsheetDocument.Flowsheet.Measurement insertNewMeasurement(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -235,6 +493,14 @@ public FlowsheetDocument.Flowsheet.Measurement insertNewMeasurement(int var1) { } } + /** + * Creates and appends a new measurement element to the end of the measurement array. + * + * This factory method creates a new empty measurement and adds it to the end of the + * existing measurements array, defining a new clinical measurement type. + * + * @return FlowsheetDocument.Flowsheet.Measurement the newly created measurement element + */ public FlowsheetDocument.Flowsheet.Measurement addNewMeasurement() { synchronized(this.monitor()) { this.check_orphaned(); @@ -244,6 +510,14 @@ public FlowsheetDocument.Flowsheet.Measurement addNewMeasurement() { } } + /** + * Removes the measurement element at the specified index position. + * + * This method deletes the measurement at the given index, shifting any subsequent + * measurements to the left to fill the gap. + * + * @param var1 int the zero-based index of the measurement to remove + */ public void removeMeasurement(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -251,6 +525,13 @@ public void removeMeasurement(int var1) { } } + /** + * Retrieves the name attribute of this flowsheet. + * + * The name uniquely identifies this flowsheet template within the EMR system. + * + * @return String the flowsheet name, or null if not set + */ public String getName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -260,6 +541,11 @@ public String getName() { } } + /** + * Retrieves the name attribute as an XmlString object. + * + * @return XmlString the name attribute as an XML string object, or null if not set + */ public XmlString xgetName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -269,6 +555,11 @@ public XmlString xgetName() { } } + /** + * Checks whether the name attribute is set. + * + * @return boolean true if the name attribute is set, false otherwise + */ public boolean isSetName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -276,6 +567,11 @@ public boolean isSetName() { } } + /** + * Sets the name attribute for this flowsheet. + * + * @param var1 String the flowsheet name to set + */ public void setName(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -289,6 +585,11 @@ public void setName(String var1) { } } + /** + * Sets the name attribute using an XmlString object. + * + * @param var1 XmlString the name attribute to set as an XML string object + */ public void xsetName(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -302,6 +603,9 @@ public void xsetName(XmlString var1) { } } + /** + * Removes the name attribute from this flowsheet. + */ public void unsetName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -309,6 +613,14 @@ public void unsetName() { } } + /** + * Retrieves the decision support rules attribute for this flowsheet. + * + * This attribute specifies the clinical decision support rules to apply across + * the entire flowsheet for automated recommendations and alerts. + * + * @return String the decision support rules identifier, or null if not set + */ public String getDsRules() { synchronized(this.monitor()) { this.check_orphaned(); @@ -318,6 +630,11 @@ public String getDsRules() { } } + /** + * Retrieves the decision support rules attribute as an XmlString object. + * + * @return XmlString the ds_rules attribute as an XML string object, or null if not set + */ public XmlString xgetDsRules() { synchronized(this.monitor()) { this.check_orphaned(); @@ -327,6 +644,11 @@ public XmlString xgetDsRules() { } } + /** + * Checks whether the decision support rules attribute is set. + * + * @return boolean true if the ds_rules attribute is set, false otherwise + */ public boolean isSetDsRules() { synchronized(this.monitor()) { this.check_orphaned(); @@ -334,6 +656,11 @@ public boolean isSetDsRules() { } } + /** + * Sets the decision support rules attribute for this flowsheet. + * + * @param var1 String the decision support rules identifier to set + */ public void setDsRules(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -347,6 +674,11 @@ public void setDsRules(String var1) { } } + /** + * Sets the decision support rules attribute using an XmlString object. + * + * @param var1 XmlString the ds_rules attribute to set as an XML string object + */ public void xsetDsRules(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -360,6 +692,9 @@ public void xsetDsRules(XmlString var1) { } } + /** + * Removes the decision support rules attribute from this flowsheet. + */ public void unsetDsRules() { synchronized(this.monitor()) { this.check_orphaned(); @@ -367,6 +702,14 @@ public void unsetDsRules() { } } + /** + * Retrieves the diagnosis code triggers attribute for this flowsheet. + * + * This attribute specifies ICD-9/ICD-10 diagnosis codes that automatically trigger + * this flowsheet to be displayed or recommended for patient encounters. + * + * @return String the diagnosis code triggers (comma-separated), or null if not set + */ public String getDxcodeTriggers() { synchronized(this.monitor()) { this.check_orphaned(); @@ -376,6 +719,11 @@ public String getDxcodeTriggers() { } } + /** + * Retrieves the diagnosis code triggers attribute as an XmlString object. + * + * @return XmlString the dxcode_triggers attribute as an XML string object, or null if not set + */ public XmlString xgetDxcodeTriggers() { synchronized(this.monitor()) { this.check_orphaned(); @@ -385,6 +733,11 @@ public XmlString xgetDxcodeTriggers() { } } + /** + * Checks whether the diagnosis code triggers attribute is set. + * + * @return boolean true if the dxcode_triggers attribute is set, false otherwise + */ public boolean isSetDxcodeTriggers() { synchronized(this.monitor()) { this.check_orphaned(); @@ -392,6 +745,11 @@ public boolean isSetDxcodeTriggers() { } } + /** + * Sets the diagnosis code triggers attribute for this flowsheet. + * + * @param var1 String the diagnosis code triggers to set (comma-separated ICD codes) + */ public void setDxcodeTriggers(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -405,6 +763,11 @@ public void setDxcodeTriggers(String var1) { } } + /** + * Sets the diagnosis code triggers attribute using an XmlString object. + * + * @param var1 XmlString the dxcode_triggers attribute to set as an XML string object + */ public void xsetDxcodeTriggers(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -418,6 +781,9 @@ public void xsetDxcodeTriggers(XmlString var1) { } } + /** + * Removes the diagnosis code triggers attribute from this flowsheet. + */ public void unsetDxcodeTriggers() { synchronized(this.monitor()) { this.check_orphaned(); @@ -425,6 +791,13 @@ public void unsetDxcodeTriggers() { } } + /** + * Retrieves the display name attribute for this flowsheet. + * + * The display name is the human-readable title shown to clinicians in the EMR interface. + * + * @return String the flowsheet display name, or null if not set + */ public String getDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -434,6 +807,11 @@ public String getDisplayName() { } } + /** + * Retrieves the display name attribute as an XmlString object. + * + * @return XmlString the display_name attribute as an XML string object, or null if not set + */ public XmlString xgetDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -443,6 +821,11 @@ public XmlString xgetDisplayName() { } } + /** + * Checks whether the display name attribute is set. + * + * @return boolean true if the display_name attribute is set, false otherwise + */ public boolean isSetDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -450,6 +833,11 @@ public boolean isSetDisplayName() { } } + /** + * Sets the display name attribute for this flowsheet. + * + * @param var1 String the human-readable flowsheet title to set + */ public void setDisplayName(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -463,6 +851,11 @@ public void setDisplayName(String var1) { } } + /** + * Sets the display name attribute using an XmlString object. + * + * @param var1 XmlString the display_name attribute to set as an XML string object + */ public void xsetDisplayName(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -476,6 +869,9 @@ public void xsetDisplayName(XmlString var1) { } } + /** + * Removes the display name attribute from this flowsheet. + */ public void unsetDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -483,6 +879,14 @@ public void unsetDisplayName() { } } + /** + * Retrieves the warning color attribute for this flowsheet. + * + * This attribute specifies the color code (hex or name) used to display clinical warnings + * and alerts in the flowsheet interface. + * + * @return String the warning color code, or null if not set + */ public String getWarningColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -492,6 +896,11 @@ public String getWarningColour() { } } + /** + * Retrieves the warning color attribute as an XmlString object. + * + * @return XmlString the warning_colour attribute as an XML string object, or null if not set + */ public XmlString xgetWarningColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -501,6 +910,11 @@ public XmlString xgetWarningColour() { } } + /** + * Checks whether the warning color attribute is set. + * + * @return boolean true if the warning_colour attribute is set, false otherwise + */ public boolean isSetWarningColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -508,6 +922,11 @@ public boolean isSetWarningColour() { } } + /** + * Sets the warning color attribute for this flowsheet. + * + * @param var1 String the color code for clinical warnings (hex or color name) + */ public void setWarningColour(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -521,6 +940,11 @@ public void setWarningColour(String var1) { } } + /** + * Sets the warning color attribute using an XmlString object. + * + * @param var1 XmlString the warning_colour attribute to set as an XML string object + */ public void xsetWarningColour(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -534,6 +958,9 @@ public void xsetWarningColour(XmlString var1) { } } + /** + * Removes the warning color attribute from this flowsheet. + */ public void unsetWarningColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -541,6 +968,14 @@ public void unsetWarningColour() { } } + /** + * Retrieves the recommendation color attribute for this flowsheet. + * + * This attribute specifies the color code (hex or name) used to display clinical + * recommendations and decision support suggestions in the flowsheet interface. + * + * @return String the recommendation color code, or null if not set + */ public String getRecommendationColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -550,6 +985,11 @@ public String getRecommendationColour() { } } + /** + * Retrieves the recommendation color attribute as an XmlString object. + * + * @return XmlString the recommendation_colour attribute as an XML string object, or null if not set + */ public XmlString xgetRecommendationColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -559,6 +999,11 @@ public XmlString xgetRecommendationColour() { } } + /** + * Checks whether the recommendation color attribute is set. + * + * @return boolean true if the recommendation_colour attribute is set, false otherwise + */ public boolean isSetRecommendationColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -566,6 +1011,11 @@ public boolean isSetRecommendationColour() { } } + /** + * Sets the recommendation color attribute for this flowsheet. + * + * @param var1 String the color code for clinical recommendations (hex or color name) + */ public void setRecommendationColour(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -579,6 +1029,11 @@ public void setRecommendationColour(String var1) { } } + /** + * Sets the recommendation color attribute using an XmlString object. + * + * @param var1 XmlString the recommendation_colour attribute to set as an XML string object + */ public void xsetRecommendationColour(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -592,6 +1047,9 @@ public void xsetRecommendationColour(XmlString var1) { } } + /** + * Removes the recommendation color attribute from this flowsheet. + */ public void unsetRecommendationColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -599,6 +1057,14 @@ public void unsetRecommendationColour() { } } + /** + * Retrieves the top HTML attribute for this flowsheet. + * + * This attribute contains custom HTML content to be displayed at the top of the + * flowsheet interface, typically used for instructions or contextual information. + * + * @return String the top HTML content, or null if not set + */ public String getTopHTML() { synchronized(this.monitor()) { this.check_orphaned(); @@ -608,6 +1074,11 @@ public String getTopHTML() { } } + /** + * Retrieves the top HTML attribute as an XmlString object. + * + * @return XmlString the top_HTML attribute as an XML string object, or null if not set + */ public XmlString xgetTopHTML() { synchronized(this.monitor()) { this.check_orphaned(); @@ -617,6 +1088,11 @@ public XmlString xgetTopHTML() { } } + /** + * Checks whether the top HTML attribute is set. + * + * @return boolean true if the top_HTML attribute is set, false otherwise + */ public boolean isSetTopHTML() { synchronized(this.monitor()) { this.check_orphaned(); @@ -624,6 +1100,11 @@ public boolean isSetTopHTML() { } } + /** + * Sets the top HTML attribute for this flowsheet. + * + * @param var1 String the HTML content to display at the top of the flowsheet + */ public void setTopHTML(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -637,6 +1118,11 @@ public void setTopHTML(String var1) { } } + /** + * Sets the top HTML attribute using an XmlString object. + * + * @param var1 XmlString the top_HTML attribute to set as an XML string object + */ public void xsetTopHTML(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -650,6 +1136,9 @@ public void xsetTopHTML(XmlString var1) { } } + /** + * Removes the top HTML attribute from this flowsheet. + */ public void unsetTopHTML() { synchronized(this.monitor()) { this.check_orphaned(); @@ -657,15 +1146,44 @@ public void unsetTopHTML() { } } + /** + * Apache XMLBeans implementation of the Header interface. + * + * This nested class represents a flowsheet column header, containing measurement items + * and their associated clinical decision support rules. Headers define the structure + * of data collection columns in the flowsheet display. + * + *

    Each header typically includes: + *

      + *
    • Items - Measurement items with rules and rulesets for clinical guidance
    • + *
    • Display name - Column header label shown to clinicians
    • + *
    + * + * @see FlowsheetDocument.Flowsheet.Header + * @since 2026-01-24 + */ public static class HeaderImpl extends XmlComplexContentImpl implements FlowsheetDocument.Flowsheet.Header { private static final long serialVersionUID = 1L; private static final QName ITEM$0 = new QName("flowsheets.oscarehr.org", "item"); private static final QName DISPLAYNAME$2 = new QName("", "display_name"); + /** + * Constructs a new HeaderImpl with the specified XML schema type. + * + * @param var1 SchemaType the XML schema type definition for this header + */ public HeaderImpl(SchemaType var1) { super(var1); } + /** + * Retrieves all item elements from this header. + * + * Items are measurement elements within a flowsheet column, each containing + * clinical decision support rules and measurement configurations. + * + * @return FlowsheetDocument.Flowsheet.Header.Item[] array of all item elements in this header + */ public FlowsheetDocument.Flowsheet.Header.Item[] getItemArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -677,6 +1195,13 @@ public FlowsheetDocument.Flowsheet.Header.Item[] getItemArray() { } } + /** + * Retrieves the item element at the specified index. + * + * @param var1 int the zero-based index of the item to retrieve + * @return FlowsheetDocument.Flowsheet.Header.Item the item at the specified index + * @throws IndexOutOfBoundsException if the index is out of range + */ public FlowsheetDocument.Flowsheet.Header.Item getItemArray(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -690,6 +1215,11 @@ public FlowsheetDocument.Flowsheet.Header.Item getItemArray(int var1) { } } + /** + * Returns the number of item elements in this header. + * + * @return int the count of item elements + */ public int sizeOfItemArray() { synchronized(this.monitor()) { this.check_orphaned(); @@ -697,15 +1227,33 @@ public int sizeOfItemArray() { } } + /** + * Replaces all item elements in this header with the provided array. + * + * @param var1 FlowsheetDocument.Flowsheet.Header.Item[] array of item elements to set + */ public void setItemArray(FlowsheetDocument.Flowsheet.Header.Item[] var1) { this.check_orphaned(); this.arraySetterHelper(var1, ITEM$0); } + /** + * Sets the item element at the specified index position. + * + * @param var1 int the zero-based index position where the item should be set + * @param var2 FlowsheetDocument.Flowsheet.Header.Item the item element to set + * @throws IndexOutOfBoundsException if the index is out of range + */ public void setItemArray(int var1, FlowsheetDocument.Flowsheet.Header.Item var2) { this.generatedSetterHelperImpl(var2, ITEM$0, var1, (short)2); } + /** + * Inserts a new item element at the specified index position. + * + * @param var1 int the zero-based index position where the new item should be inserted + * @return FlowsheetDocument.Flowsheet.Header.Item the newly created and inserted item element + */ public FlowsheetDocument.Flowsheet.Header.Item insertNewItem(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -715,6 +1263,11 @@ public FlowsheetDocument.Flowsheet.Header.Item insertNewItem(int var1) { } } + /** + * Creates and appends a new item element to the end of the item array. + * + * @return FlowsheetDocument.Flowsheet.Header.Item the newly created item element + */ public FlowsheetDocument.Flowsheet.Header.Item addNewItem() { synchronized(this.monitor()) { this.check_orphaned(); @@ -724,6 +1277,11 @@ public FlowsheetDocument.Flowsheet.Header.Item addNewItem() { } } + /** + * Removes the item element at the specified index position. + * + * @param var1 int the zero-based index of the item to remove + */ public void removeItem(int var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -731,6 +1289,13 @@ public void removeItem(int var1) { } } + /** + * Retrieves the display name attribute for this header. + * + * The display name is the column header label shown in the flowsheet interface. + * + * @return String the header display name, or null if not set + */ public String getDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -740,6 +1305,11 @@ public String getDisplayName() { } } + /** + * Retrieves the display name attribute as an XmlString object. + * + * @return XmlString the display_name attribute as an XML string object, or null if not set + */ public XmlString xgetDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -749,6 +1319,11 @@ public XmlString xgetDisplayName() { } } + /** + * Checks whether the display name attribute is set. + * + * @return boolean true if the display_name attribute is set, false otherwise + */ public boolean isSetDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -756,6 +1331,11 @@ public boolean isSetDisplayName() { } } + /** + * Sets the display name attribute for this header. + * + * @param var1 String the column header label to set + */ public void setDisplayName(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -769,6 +1349,11 @@ public void setDisplayName(String var1) { } } + /** + * Sets the display name attribute using an XmlString object. + * + * @param var1 XmlString the display_name attribute to set as an XML string object + */ public void xsetDisplayName(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -782,6 +1367,9 @@ public void xsetDisplayName(XmlString var1) { } } + /** + * Removes the display name attribute from this header. + */ public void unsetDisplayName() { synchronized(this.monitor()) { this.check_orphaned(); @@ -789,6 +1377,24 @@ public void unsetDisplayName() { } } + /** + * Apache XMLBeans implementation of the Item interface. + * + * This nested class represents a measurement item within a flowsheet header column. + * Items define individual measurement configurations with clinical decision support + * rules and rulesets for automated recommendations. + * + *

    Each item typically includes: + *

      + *
    • Measurement type - Reference to the clinical measurement definition
    • + *
    • Rules - Clinical decision support rules with conditional recommendations
    • + *
    • Rulesets - Grouped rule collections for complex clinical logic
    • + *
    • Display properties - Labels, graphing options, and visual settings
    • + *
    + * + * @see FlowsheetDocument.Flowsheet.Header.Item + * @since 2026-01-24 + */ public static class ItemImpl extends XmlComplexContentImpl implements FlowsheetDocument.Flowsheet.Header.Item { private static final long serialVersionUID = 1L; private static final QName RULES$0 = new QName("flowsheets.oscarehr.org", "rules"); @@ -1285,8 +1891,23 @@ public void unsetPreventionType() { public static class RulesImpl extends XmlComplexContentImpl implements FlowsheetDocument.Flowsheet.Header.Item.Rules { private static final long serialVersionUID = 1L; + /** + * Apache XMLBeans implementation of the Rules interface. + * + * This nested class represents a container for clinical decision support rules + * with conditional recommendations. Rules evaluate clinical data and provide + * automated guidance to clinicians based on current measurements and patient status. + * + * @see FlowsheetDocument.Flowsheet.Header.Item.Rules + * @since 2026-01-24 + */ private static final QName RECOMMENDATION$0 = new QName("flowsheets.oscarehr.org", "recommendation"); + /** + * Constructs a new RulesImpl with the specified XML schema type. + * + * @param var1 SchemaType the XML schema type definition for this rules container + */ public RulesImpl(SchemaType var1) { super(var1); } @@ -2034,19 +2655,54 @@ public void unsetValue() { } } + /** + * Apache XMLBeans implementation of the Indicator interface. + * + * This nested class represents a visual status indicator with color coding for + * clinical decision support. Indicators provide at-a-glance visual cues about + * patient status or required actions in the flowsheet display. + * + *

    Indicators typically include: + *

      + *
    • Key - Unique identifier for the indicator condition
    • + *
    • Color - Visual color code for the indicator display (hex or name)
    • + *
    • Value - Text content displayed with the indicator
    • + *
    + * + * @see FlowsheetDocument.Flowsheet.Indicator + * @since 2026-01-24 + */ public static class IndicatorImpl extends JavaStringHolderEx implements FlowsheetDocument.Flowsheet.Indicator { private static final long serialVersionUID = 1L; private static final QName KEY$0 = new QName("", "key"); private static final QName COLOUR$2 = new QName("", "colour"); + /** + * Constructs a new IndicatorImpl with the specified XML schema type. + * + * @param var1 SchemaType the XML schema type definition for this indicator + */ public IndicatorImpl(SchemaType var1) { super(var1, true); } + /** + * Constructs a new IndicatorImpl with the specified XML schema type and validation flag. + * + * @param var1 SchemaType the XML schema type definition for this indicator + * @param var2 boolean whether to perform validation + */ protected IndicatorImpl(SchemaType var1, boolean var2) { super(var1, var2); } + /** + * Retrieves the key attribute for this indicator. + * + * The key uniquely identifies the indicator condition or status it represents. + * + * @return String the indicator key, or null if not set + */ public String getKey() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2056,6 +2712,11 @@ public String getKey() { } } + /** + * Retrieves the key attribute as an XmlString object. + * + * @return XmlString the key attribute as an XML string object, or null if not set + */ public XmlString xgetKey() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2065,6 +2726,11 @@ public XmlString xgetKey() { } } + /** + * Checks whether the key attribute is set. + * + * @return boolean true if the key attribute is set, false otherwise + */ public boolean isSetKey() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2072,6 +2738,11 @@ public boolean isSetKey() { } } + /** + * Sets the key attribute for this indicator. + * + * @param var1 String the indicator key to set + */ public void setKey(String var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -2085,6 +2756,11 @@ public void setKey(String var1) { } } + /** + * Sets the key attribute using an XmlString object. + * + * @param var1 XmlString the key attribute to set as an XML string object + */ public void xsetKey(XmlString var1) { synchronized(this.monitor()) { this.check_orphaned(); @@ -2098,6 +2774,9 @@ public void xsetKey(XmlString var1) { } } + /** + * Removes the key attribute from this indicator. + */ public void unsetKey() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2105,6 +2784,13 @@ public void unsetKey() { } } + /** + * Retrieves the color attribute for this indicator. + * + * The color specifies the visual appearance of the indicator in the flowsheet display. + * + * @return String the color code (hex or color name), or null if not set + */ public String getColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2114,6 +2800,11 @@ public String getColour() { } } + /** + * Retrieves the color attribute as an XmlString object. + * + * @return XmlString the colour attribute as an XML string object, or null if not set + */ public XmlString xgetColour() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2164,6 +2855,25 @@ public void unsetColour() { } } + /** + * Apache XMLBeans implementation of the Measurement interface. + * + * This nested class represents a clinical measurement type definition with + * validation rules and data type specifications. Measurements define the types + * of clinical data that can be recorded in the flowsheet such as vital signs, + * laboratory values, and other clinical observations. + * + *

    Measurements typically include: + *

      + *
    • Type identifier - Unique measurement type code
    • + *
    • Display name - Human-readable measurement label
    • + *
    • Validation rules - Data type and range validation specifications
    • + *
    • Measuring instructions - Clinical guidance for data collection
    • + *
    + * + * @see FlowsheetDocument.Flowsheet.Measurement + * @since 2026-01-24 + */ public static class MeasurementImpl extends XmlComplexContentImpl implements FlowsheetDocument.Flowsheet.Measurement { private static final long serialVersionUID = 1L; private static final QName VALIDATIONRULE$0 = new QName("flowsheets.oscarehr.org", "validationRule"); @@ -2172,10 +2882,22 @@ public static class MeasurementImpl extends XmlComplexContentImpl implements Flo private static final QName TYPEDISPLAYNAME$6 = new QName("", "typeDisplayName"); private static final QName MEASURINGINSTRC$8 = new QName("", "measuringInstrc"); + /** + * Constructs a new MeasurementImpl with the specified XML schema type. + * + * @param var1 SchemaType the XML schema type definition for this measurement + */ public MeasurementImpl(SchemaType var1) { super(var1); } + /** + * Retrieves the validation rule element for this measurement. + * + * Validation rules define data type, range, and format constraints for clinical measurements. + * + * @return FlowsheetDocument.Flowsheet.Measurement.ValidationRule the validation rule element, or null if not set + */ public FlowsheetDocument.Flowsheet.Measurement.ValidationRule getValidationRule() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2185,10 +2907,20 @@ public FlowsheetDocument.Flowsheet.Measurement.ValidationRule getValidationRule( } } + /** + * Sets the validation rule element for this measurement. + * + * @param var1 FlowsheetDocument.Flowsheet.Measurement.ValidationRule the validation rule to set + */ public void setValidationRule(FlowsheetDocument.Flowsheet.Measurement.ValidationRule var1) { this.generatedSetterHelperImpl(var1, VALIDATIONRULE$0, 0, (short)1); } + /** + * Creates and adds a new validation rule element to this measurement. + * + * @return FlowsheetDocument.Flowsheet.Measurement.ValidationRule the newly created validation rule element + */ public FlowsheetDocument.Flowsheet.Measurement.ValidationRule addNewValidationRule() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2198,6 +2930,13 @@ public FlowsheetDocument.Flowsheet.Measurement.ValidationRule addNewValidationRu } } + /** + * Retrieves the type attribute for this measurement. + * + * The type uniquely identifies this measurement type within the EMR system. + * + * @return String the measurement type identifier, or null if not set + */ public String getType() { synchronized(this.monitor()) { this.check_orphaned(); @@ -2207,6 +2946,11 @@ public String getType() { } } + /** + * Retrieves the type attribute as an XmlString object. + * + * @return XmlString the type attribute as an XML string object, or null if not set + */ public XmlString xgetType() { synchronized(this.monitor()) { this.check_orphaned(); diff --git a/src/main/java/ca/openosp/openo/form/data/FrmVTData.java b/src/main/java/ca/openosp/openo/form/data/FrmVTData.java deleted file mode 100644 index a7bc47e23f4..00000000000 --- a/src/main/java/ca/openosp/openo/form/data/FrmVTData.java +++ /dev/null @@ -1,2462 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ - - -/* - * Created on Oct 14, 2004 - */ -package ca.openosp.openo.form.data; - -/** - * @author yilee18 - */ -public class FrmVTData { - String version; - String site_cod; - String patient_cod; - String visit_cod; - - String signed_when; - String signed_who; - String signed_how; - - String b_MI; - String b_MI$signed_when; - String b_MI$signed_who; - String b_MI$signed_how; - - String b_ACS; - String b_ACS$signed_when; - String b_ACS$signed_who; - String b_ACS$signed_how; - - String b_Angina; - String b_Angina$signed_when; - String b_Angina$signed_who; - String b_Angina$signed_how; - - String b_Revascularization; - String b_Revascularization$signed_when; - String b_Revascularization$signed_who; - String b_Revascularization$signed_how; - - String b_Stroke; - String b_Stroke$signed_when; - String b_Stroke$signed_who; - String b_Stroke$signed_how; - - String b_PVD; - String b_PVD$signed_when; - String b_PVD$signed_who; - String b_PVD$signed_how; - - String b_Diabetes; - String b_Diabetes$signed_when; - String b_Diabetes$signed_who; - String b_Diabetes$signed_how; - - String b_Hypertension; - String b_Hypertension$signed_when; - String b_Hypertension$signed_who; - String b_Hypertension$signed_how; - - String b_Hypercholesterolemia; - String b_Hypercholesterolemia$signed_when; - String b_Hypercholesterolemia$signed_who; - String b_Hypercholesterolemia$signed_how; - - String int_SmokingAverage_CigsPerDay; - String int_SmokingAverage_CigsPerDay$signed_when; - String int_SmokingAverage_CigsPerDay$signed_who; - String int_SmokingAverage_CigsPerDay$signed_how; - - String dat_SmokingAverage; - String dat_SmokingAverage$signed_when; - String dat_SmokingAverage$signed_who; - String dat_SmokingAverage$signed_how; - - String int_SmokingCumulative_PackYears; - String int_SmokingCumulative_PackYears$signed_when; - String int_SmokingCumulative_PackYears$signed_who; - String int_SmokingCumulative_PackYears$signed_how; - - String dat_SmokingCeased; - String dat_SmokingCeased$signed_when; - String dat_SmokingCeased$signed_who; - String dat_SmokingCeased$signed_how; - - String int_ExerciseAverage_MinutesPerWeek; - String int_ExerciseAverage_MinutesPerWeek$signed_when; - String int_ExerciseAverage_MinutesPerWeek$signed_who; - String int_ExerciseAverage_MinutesPerWeek$signed_how; - - String int_FruitsAndVegetablesAverage_ServingsPerDay; - String int_FruitsAndVegetablesAverage_ServingsPerDay$signed_when; - String int_FruitsAndVegetablesAverage_ServingsPerDay$signed_who; - String int_FruitsAndVegetablesAverage_ServingsPerDay$signed_how; - - String sel_Depression_category; - String sel_Depression_category$signed_when; - String sel_Depression_category$signed_who; - String sel_Depression_category$signed_how; - - String sel_Stress_category; - String sel_Stress_category$signed_when; - String sel_Stress_category$signed_who; - String sel_Stress_category$signed_how; - - String sel_LocusOfControl_category; - String sel_LocusOfControl_category$signed_when; - String sel_LocusOfControl_category$signed_who; - String sel_LocusOfControl_category$signed_how; - - String sel_MedicationAdherence_genprob; - String sel_MedicationAdherence_genprob$signed_when; - String sel_MedicationAdherence_genprob$signed_who; - String sel_MedicationAdherence_genprob$signed_how; - - String sel_MedicationAdherence_beliefs; - String sel_MedicationAdherence_beliefs$signed_when; - String sel_MedicationAdherence_beliefs$signed_who; - String sel_MedicationAdherence_beliefs$signed_how; - - String sel_MedicationAdherence_recall; - String sel_MedicationAdherence_recall$signed_when; - String sel_MedicationAdherence_recall$signed_who; - String sel_MedicationAdherence_recall$signed_how; - - String sel_MedicationAdherence_access; - String sel_MedicationAdherence_access$signed_when; - String sel_MedicationAdherence_access$signed_who; - String sel_MedicationAdherence_access$signed_how; - - String int_Height_cm; - String int_Height_cm$signed_when; - String int_Height_cm$signed_who; - String int_Height_cm$signed_how; - - String dbl_Weight_kg; - String dbl_Weight_kg$signed_when; - String dbl_Weight_kg$signed_who; - String dbl_Weight_kg$signed_how; - - String int_WaistCircumference_cm; - String int_WaistCircumference_cm$signed_when; - String int_WaistCircumference_cm$signed_who; - String int_WaistCircumference_cm$signed_how; - - String int_HipCircumference_cm; - String int_HipCircumference_cm$signed_when; - String int_HipCircumference_cm$signed_who; - String int_HipCircumference_cm$signed_how; - - String int_SBP_mmHg; - String int_SBP_mmHg$signed_when; - String int_SBP_mmHg$signed_who; - String int_SBP_mmHg$signed_how; - - String int_DBP_mmHg; - String int_DBP_mmHg$signed_when; - String int_DBP_mmHg$signed_who; - String int_DBP_mmHg$signed_how; - - String dat_BP; - String dat_BP$signed_when; - String dat_BP$signed_who; - String dat_BP$signed_how; - - String int_Pulse_bpm; - String int_Pulse_bpm$signed_when; - String int_Pulse_bpm$signed_who; - String int_Pulse_bpm$signed_how; - - String sel_FootExam_Neuropathy; - String sel_FootExam_Neuropathy$signed_when; - String sel_FootExam_Neuropathy$signed_who; - String sel_FootExam_Neuropathy$signed_how; - - String sel_FootExam_Ischemia; - String sel_FootExam_Ischemia$signed_when; - String sel_FootExam_Ischemia$signed_who; - String sel_FootExam_Ischemia$signed_how; - - String sel_FootExam_Ulcer; - String sel_FootExam_Ulcer$signed_when; - String sel_FootExam_Ulcer$signed_who; - String sel_FootExam_Ulcer$signed_how; - - String sel_FootExam_Infection; - String sel_FootExam_Infection$signed_when; - String sel_FootExam_Infection$signed_who; - String sel_FootExam_Infection$signed_how; - - String sel_FootExam_OtherAbnormality; - String sel_FootExam_OtherAbnormality$signed_when; - String sel_FootExam_OtherAbnormality$signed_who; - String sel_FootExam_OtherAbnormality$signed_how; - - String dat_FootExam; - String dat_FootExam$signed_when; - String dat_FootExam$signed_who; - String dat_FootExam$signed_how; - - String sel_EyeExam_DiabeticRetinopathy; - String sel_EyeExam_DiabeticRetinopathy$signed_when; - String sel_EyeExam_DiabeticRetinopathy$signed_who; - String sel_EyeExam_DiabeticRetinopathy$signed_how; - - String sel_EyeExam_HypertensiveRetinopathy; - String sel_EyeExam_HypertensiveRetinopathy$signed_when; - String sel_EyeExam_HypertensiveRetinopathy$signed_who; - String sel_EyeExam_HypertensiveRetinopathy$signed_how; - - String sel_EyeExam_OtherAbnormality; - String sel_EyeExam_OtherAbnormality$signed_when; - String sel_EyeExam_OtherAbnormality$signed_who; - String sel_EyeExam_OtherAbnormality$signed_how; - - String dat_EyeExam; - String dat_EyeExam$signed_when; - String dat_EyeExam$signed_who; - String dat_EyeExam$signed_how; - - String dbl_HbA1C; - String dbl_HbA1C$signed_when; - String dbl_HbA1C$signed_who; - String dbl_HbA1C$signed_how; - - String dat_HbA1C; - String dat_HbA1C$signed_when; - String dat_HbA1C$signed_who; - String dat_HbA1C$signed_how; - - String dbl_Glucose_mM; - String dbl_Glucose_mM$signed_when; - String dbl_Glucose_mM$signed_who; - String dbl_Glucose_mM$signed_how; - - String dat_Glucose; - String dat_Glucose$signed_when; - String dat_Glucose$signed_who; - String dat_Glucose$signed_how; - - String dbl_LDL_mM; - String dbl_LDL_mM$signed_when; - String dbl_LDL_mM$signed_who; - String dbl_LDL_mM$signed_how; - - String dat_LDL; - String dat_LDL$signed_when; - String dat_LDL$signed_who; - String dat_LDL$signed_how; - - String dbl_HDL_mM; - String dbl_HDL_mM$signed_when; - String dbl_HDL_mM$signed_who; - String dbl_HDL_mM$signed_how; - - String dat_HDL; - String dat_HDL$signed_when; - String dat_HDL$signed_who; - String dat_HDL$signed_how; - - String dbl_TotalCholesterol_mM; - String dbl_TotalCholesterol_mM$signed_when; - String dbl_TotalCholesterol_mM$signed_who; - String dbl_TotalCholesterol_mM$signed_how; - - String dat_TotalCholesterol; - String dat_TotalCholesterol$signed_when; - String dat_TotalCholesterol$signed_who; - String dat_TotalCholesterol$signed_how; - - String dbl_Triglycerides_mM; - String dbl_Triglycerides_mM$signed_when; - String dbl_Triglycerides_mM$signed_who; - String dbl_Triglycerides_mM$signed_how; - - String dat_Triglycerides; - String dat_Triglycerides$signed_when; - String dat_Triglycerides$signed_who; - String dat_Triglycerides$signed_how; - - String dbl_UrineAlbuminCreatinineRatio_mgPermmol; - String dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when; - String dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who; - String dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how; - - String dat_UrineAlbuminCreatinineRatio; - String dat_UrineAlbuminCreatinineRatio$signed_when; - String dat_UrineAlbuminCreatinineRatio$signed_who; - String dat_UrineAlbuminCreatinineRatio$signed_how; - - String dbl_UrineAlbumin_mgPerDay; - String dbl_UrineAlbumin_mgPerDay$signed_when; - String dbl_UrineAlbumin_mgPerDay$signed_who; - String dbl_UrineAlbumin_mgPerDay$signed_how; - - String dat_UrineAlbumin; - String dat_UrineAlbumin$signed_when; - String dat_UrineAlbumin$signed_who; - String dat_UrineAlbumin$signed_how; - - String b_Counseled_Diet; - String b_Counseled_Diet$signed_when; - String b_Counseled_Diet$signed_who; - String b_Counseled_Diet$signed_how; - - String b_Counseled_Exercise; - String b_Counseled_Exercise$signed_when; - String b_Counseled_Exercise$signed_who; - String b_Counseled_Exercise$signed_how; - - String b_Counseled_SmokingCessation; - String b_Counseled_SmokingCessation$signed_when; - String b_Counseled_SmokingCessation$signed_who; - String b_Counseled_SmokingCessation$signed_how; - - String b_Counseled_Diabetes; - String b_Counseled_Diabetes$signed_when; - String b_Counseled_Diabetes$signed_who; - String b_Counseled_Diabetes$signed_how; - - String b_Counseled_Psychosocial; - String b_Counseled_Psychosocial$signed_when; - String b_Counseled_Psychosocial$signed_who; - String b_Counseled_Psychosocial$signed_how; - - String b_Counseled_Other; - String b_Counseled_Other$signed_when; - String b_Counseled_Other$signed_who; - String b_Counseled_Other$signed_how; - - String b_Referred_FootExam; - String b_Referred_FootExam$signed_when; - String b_Referred_FootExam$signed_who; - String b_Referred_FootExam$signed_how; - - String b_Referred_EyeExam; - String b_Referred_EyeExam$signed_when; - String b_Referred_EyeExam$signed_who; - String b_Referred_EyeExam$signed_how; - - public String getB_ACS() { - return b_ACS; - } - - public void setB_ACS(String b_acs) { - b_ACS = b_acs; - } - - public String getB_ACS$signed_how() { - return b_ACS$signed_how; - } - - public void setB_ACS$signed_how(String b_acs$signed_how) { - b_ACS$signed_how = b_acs$signed_how; - } - - public String getB_ACS$signed_when() { - return b_ACS$signed_when; - } - - public void setB_ACS$signed_when(String b_acs$signed_when) { - b_ACS$signed_when = b_acs$signed_when; - } - - public String getB_ACS$signed_who() { - return b_ACS$signed_who; - } - - public void setB_ACS$signed_who(String b_acs$signed_who) { - b_ACS$signed_who = b_acs$signed_who; - } - - public String getB_Angina() { - return b_Angina; - } - - public void setB_Angina(String angina) { - b_Angina = angina; - } - - public String getB_Angina$signed_how() { - return b_Angina$signed_how; - } - - public void setB_Angina$signed_how(String angina$signed_how) { - b_Angina$signed_how = angina$signed_how; - } - - public String getB_Angina$signed_when() { - return b_Angina$signed_when; - } - - public void setB_Angina$signed_when(String angina$signed_when) { - b_Angina$signed_when = angina$signed_when; - } - - public String getB_Angina$signed_who() { - return b_Angina$signed_who; - } - - public void setB_Angina$signed_who(String angina$signed_who) { - b_Angina$signed_who = angina$signed_who; - } - - public String getB_Diabetes() { - return b_Diabetes; - } - - public void setB_Diabetes(String diabetes) { - b_Diabetes = diabetes; - } - - public String getB_Diabetes$signed_how() { - return b_Diabetes$signed_how; - } - - public void setB_Diabetes$signed_how(String diabetes$signed_how) { - b_Diabetes$signed_how = diabetes$signed_how; - } - - public String getB_Diabetes$signed_when() { - return b_Diabetes$signed_when; - } - - public void setB_Diabetes$signed_when(String diabetes$signed_when) { - b_Diabetes$signed_when = diabetes$signed_when; - } - - public String getB_Diabetes$signed_who() { - return b_Diabetes$signed_who; - } - - public void setB_Diabetes$signed_who(String diabetes$signed_who) { - b_Diabetes$signed_who = diabetes$signed_who; - } - - public String getB_Hypercholesterolemia() { - return b_Hypercholesterolemia; - } - - public void setB_Hypercholesterolemia(String hypercholesterolemia) { - b_Hypercholesterolemia = hypercholesterolemia; - } - - public String getB_Hypercholesterolemia$signed_how() { - return b_Hypercholesterolemia$signed_how; - } - - public void setB_Hypercholesterolemia$signed_how(String hypercholesterolemia$signed_how) { - b_Hypercholesterolemia$signed_how = hypercholesterolemia$signed_how; - } - - public String getB_Hypercholesterolemia$signed_when() { - return b_Hypercholesterolemia$signed_when; - } - - public void setB_Hypercholesterolemia$signed_when(String hypercholesterolemia$signed_when) { - b_Hypercholesterolemia$signed_when = hypercholesterolemia$signed_when; - } - - public String getB_Hypercholesterolemia$signed_who() { - return b_Hypercholesterolemia$signed_who; - } - - public void setB_Hypercholesterolemia$signed_who(String hypercholesterolemia$signed_who) { - b_Hypercholesterolemia$signed_who = hypercholesterolemia$signed_who; - } - - public String getB_Hypertension() { - return b_Hypertension; - } - - public void setB_Hypertension(String hypertension) { - b_Hypertension = hypertension; - } - - public String getB_Hypertension$signed_how() { - return b_Hypertension$signed_how; - } - - public void setB_Hypertension$signed_how(String hypertension$signed_how) { - b_Hypertension$signed_how = hypertension$signed_how; - } - - public String getB_Hypertension$signed_when() { - return b_Hypertension$signed_when; - } - - public void setB_Hypertension$signed_when(String hypertension$signed_when) { - b_Hypertension$signed_when = hypertension$signed_when; - } - - public String getB_Hypertension$signed_who() { - return b_Hypertension$signed_who; - } - - public void setB_Hypertension$signed_who(String hypertension$signed_who) { - b_Hypertension$signed_who = hypertension$signed_who; - } - - public String getB_MI() { - return b_MI; - } - - public void setB_MI(String b_mi) { - b_MI = b_mi; - } - - public String getB_MI$signed_how() { - return b_MI$signed_how; - } - - public void setB_MI$signed_how(String b_mi$signed_how) { - b_MI$signed_how = b_mi$signed_how; - } - - public String getB_MI$signed_when() { - return b_MI$signed_when; - } - - public void setB_MI$signed_when(String b_mi$signed_when) { - b_MI$signed_when = b_mi$signed_when; - } - - public String getB_MI$signed_who() { - return b_MI$signed_who; - } - - public void setB_MI$signed_who(String b_mi$signed_who) { - b_MI$signed_who = b_mi$signed_who; - } - - public String getB_PVD() { - return b_PVD; - } - - public void setB_PVD(String b_pvd) { - b_PVD = b_pvd; - } - - public String getB_PVD$signed_how() { - return b_PVD$signed_how; - } - - public void setB_PVD$signed_how(String b_pvd$signed_how) { - b_PVD$signed_how = b_pvd$signed_how; - } - - public String getB_PVD$signed_when() { - return b_PVD$signed_when; - } - - public void setB_PVD$signed_when(String b_pvd$signed_when) { - b_PVD$signed_when = b_pvd$signed_when; - } - - public String getB_PVD$signed_who() { - return b_PVD$signed_who; - } - - public void setB_PVD$signed_who(String b_pvd$signed_who) { - b_PVD$signed_who = b_pvd$signed_who; - } - - public String getB_Revascularization() { - return b_Revascularization; - } - - public void setB_Revascularization(String revascularization) { - b_Revascularization = revascularization; - } - - public String getB_Revascularization$signed_how() { - return b_Revascularization$signed_how; - } - - public void setB_Revascularization$signed_how(String revascularization$signed_how) { - b_Revascularization$signed_how = revascularization$signed_how; - } - - public String getB_Revascularization$signed_when() { - return b_Revascularization$signed_when; - } - - public void setB_Revascularization$signed_when(String revascularization$signed_when) { - b_Revascularization$signed_when = revascularization$signed_when; - } - - public String getB_Revascularization$signed_who() { - return b_Revascularization$signed_who; - } - - public void setB_Revascularization$signed_who(String revascularization$signed_who) { - b_Revascularization$signed_who = revascularization$signed_who; - } - - public String getB_Stroke() { - return b_Stroke; - } - - public void setB_Stroke(String stroke) { - b_Stroke = stroke; - } - - public String getB_Stroke$signed_how() { - return b_Stroke$signed_how; - } - - public void setB_Stroke$signed_how(String stroke$signed_how) { - b_Stroke$signed_how = stroke$signed_how; - } - - public String getB_Stroke$signed_when() { - return b_Stroke$signed_when; - } - - public void setB_Stroke$signed_when(String stroke$signed_when) { - b_Stroke$signed_when = stroke$signed_when; - } - - public String getB_Stroke$signed_who() { - return b_Stroke$signed_who; - } - - public void setB_Stroke$signed_who(String stroke$signed_who) { - b_Stroke$signed_who = stroke$signed_who; - } - - public String getDat_BP() { - return dat_BP; - } - - public void setDat_BP(String dat_BP) { - this.dat_BP = dat_BP; - } - - public String getDat_BP$signed_how() { - return dat_BP$signed_how; - } - - public void setDat_BP$signed_how(String dat_BP$signed_how) { - this.dat_BP$signed_how = dat_BP$signed_how; - } - - public String getDat_BP$signed_when() { - return dat_BP$signed_when; - } - - public void setDat_BP$signed_when(String dat_BP$signed_when) { - this.dat_BP$signed_when = dat_BP$signed_when; - } - - public String getDat_BP$signed_who() { - return dat_BP$signed_who; - } - - public void setDat_BP$signed_who(String dat_BP$signed_who) { - this.dat_BP$signed_who = dat_BP$signed_who; - } - - public String getDat_EyeExam() { - return dat_EyeExam; - } - - public void setDat_EyeExam(String dat_EyeExam) { - this.dat_EyeExam = dat_EyeExam; - } - - public String getDat_EyeExam$signed_how() { - return dat_EyeExam$signed_how; - } - - public void setDat_EyeExam$signed_how(String dat_EyeExam$signed_how) { - this.dat_EyeExam$signed_how = dat_EyeExam$signed_how; - } - - public String getDat_EyeExam$signed_when() { - return dat_EyeExam$signed_when; - } - - public void setDat_EyeExam$signed_when(String dat_EyeExam$signed_when) { - this.dat_EyeExam$signed_when = dat_EyeExam$signed_when; - } - - public String getDat_EyeExam$signed_who() { - return dat_EyeExam$signed_who; - } - - public void setDat_EyeExam$signed_who(String dat_EyeExam$signed_who) { - this.dat_EyeExam$signed_who = dat_EyeExam$signed_who; - } - - public String getDat_FootExam() { - return dat_FootExam; - } - - public void setDat_FootExam(String dat_FootExam) { - this.dat_FootExam = dat_FootExam; - } - - public String getDat_FootExam$signed_how() { - return dat_FootExam$signed_how; - } - - public void setDat_FootExam$signed_how(String dat_FootExam$signed_how) { - this.dat_FootExam$signed_how = dat_FootExam$signed_how; - } - - public String getDat_FootExam$signed_when() { - return dat_FootExam$signed_when; - } - - public void setDat_FootExam$signed_when(String dat_FootExam$signed_when) { - this.dat_FootExam$signed_when = dat_FootExam$signed_when; - } - - public String getDat_FootExam$signed_who() { - return dat_FootExam$signed_who; - } - - public void setDat_FootExam$signed_who(String dat_FootExam$signed_who) { - this.dat_FootExam$signed_who = dat_FootExam$signed_who; - } - - public String getDat_SmokingAverage() { - return dat_SmokingAverage; - } - - public void setDat_SmokingAverage(String dat_SmokingAverage) { - this.dat_SmokingAverage = dat_SmokingAverage; - } - - public String getDat_SmokingAverage$signed_how() { - return dat_SmokingAverage$signed_how; - } - - public void setDat_SmokingAverage$signed_how(String dat_SmokingAverage$signed_how) { - this.dat_SmokingAverage$signed_how = dat_SmokingAverage$signed_how; - } - - public String getDat_SmokingAverage$signed_when() { - return dat_SmokingAverage$signed_when; - } - - public void setDat_SmokingAverage$signed_when(String dat_SmokingAverage$signed_when) { - this.dat_SmokingAverage$signed_when = dat_SmokingAverage$signed_when; - } - - public String getDat_SmokingAverage$signed_who() { - return dat_SmokingAverage$signed_who; - } - - public void setDat_SmokingAverage$signed_who(String dat_SmokingAverage$signed_who) { - this.dat_SmokingAverage$signed_who = dat_SmokingAverage$signed_who; - } - - public String getDat_SmokingCeased() { - return dat_SmokingCeased; - } - - public void setDat_SmokingCeased(String dat_SmokingCeased) { - this.dat_SmokingCeased = dat_SmokingCeased; - } - - public String getDat_SmokingCeased$signed_how() { - return dat_SmokingCeased$signed_how; - } - - public void setDat_SmokingCeased$signed_how(String dat_SmokingCeased$signed_how) { - this.dat_SmokingCeased$signed_how = dat_SmokingCeased$signed_how; - } - - public String getDat_SmokingCeased$signed_when() { - return dat_SmokingCeased$signed_when; - } - - public void setDat_SmokingCeased$signed_when(String dat_SmokingCeased$signed_when) { - this.dat_SmokingCeased$signed_when = dat_SmokingCeased$signed_when; - } - - public String getDat_SmokingCeased$signed_who() { - return dat_SmokingCeased$signed_who; - } - - public void setDat_SmokingCeased$signed_who(String dat_SmokingCeased$signed_who) { - this.dat_SmokingCeased$signed_who = dat_SmokingCeased$signed_who; - } - - public String getDbl_Weight_kg() { - return dbl_Weight_kg; - } - - public void setDbl_Weight_kg(String dbl_Weight_kg) { - this.dbl_Weight_kg = dbl_Weight_kg; - } - - public String getDbl_Weight_kg$signed_how() { - return dbl_Weight_kg$signed_how; - } - - public void setDbl_Weight_kg$signed_how(String dbl_Weight_kg$signed_how) { - this.dbl_Weight_kg$signed_how = dbl_Weight_kg$signed_how; - } - - public String getDbl_Weight_kg$signed_when() { - return dbl_Weight_kg$signed_when; - } - - public void setDbl_Weight_kg$signed_when(String dbl_Weight_kg$signed_when) { - this.dbl_Weight_kg$signed_when = dbl_Weight_kg$signed_when; - } - - public String getDbl_Weight_kg$signed_who() { - return dbl_Weight_kg$signed_who; - } - - public void setDbl_Weight_kg$signed_who(String dbl_Weight_kg$signed_who) { - this.dbl_Weight_kg$signed_who = dbl_Weight_kg$signed_who; - } - - public String getInt_DBP_mmHg() { - return int_DBP_mmHg; - } - - public void setInt_DBP_mmHg(String int_DBP_mmHg) { - this.int_DBP_mmHg = int_DBP_mmHg; - } - - public String getInt_DBP_mmHg$signed_how() { - return int_DBP_mmHg$signed_how; - } - - public void setInt_DBP_mmHg$signed_how(String int_DBP_mmHg$signed_how) { - this.int_DBP_mmHg$signed_how = int_DBP_mmHg$signed_how; - } - - public String getInt_DBP_mmHg$signed_when() { - return int_DBP_mmHg$signed_when; - } - - public void setInt_DBP_mmHg$signed_when(String int_DBP_mmHg$signed_when) { - this.int_DBP_mmHg$signed_when = int_DBP_mmHg$signed_when; - } - - public String getInt_DBP_mmHg$signed_who() { - return int_DBP_mmHg$signed_who; - } - - public void setInt_DBP_mmHg$signed_who(String int_DBP_mmHg$signed_who) { - this.int_DBP_mmHg$signed_who = int_DBP_mmHg$signed_who; - } - - public String getInt_ExerciseAverage_MinutesPerWeek() { - return int_ExerciseAverage_MinutesPerWeek; - } - - public void setInt_ExerciseAverage_MinutesPerWeek(String int_ExerciseAverage_MinutesPerWeek) { - this.int_ExerciseAverage_MinutesPerWeek = int_ExerciseAverage_MinutesPerWeek; - } - - public String getInt_ExerciseAverage_MinutesPerWeek$signed_how() { - return int_ExerciseAverage_MinutesPerWeek$signed_how; - } - - public void setInt_ExerciseAverage_MinutesPerWeek$signed_how(String int_ExerciseAverage_MinutesPerWeek$signed_how) { - this.int_ExerciseAverage_MinutesPerWeek$signed_how = int_ExerciseAverage_MinutesPerWeek$signed_how; - } - - public String getInt_ExerciseAverage_MinutesPerWeek$signed_when() { - return int_ExerciseAverage_MinutesPerWeek$signed_when; - } - - public void setInt_ExerciseAverage_MinutesPerWeek$signed_when( - String int_ExerciseAverage_MinutesPerWeek$signed_when) { - this.int_ExerciseAverage_MinutesPerWeek$signed_when = int_ExerciseAverage_MinutesPerWeek$signed_when; - } - - public String getInt_ExerciseAverage_MinutesPerWeek$signed_who() { - return int_ExerciseAverage_MinutesPerWeek$signed_who; - } - - public void setInt_ExerciseAverage_MinutesPerWeek$signed_who(String int_ExerciseAverage_MinutesPerWeek$signed_who) { - this.int_ExerciseAverage_MinutesPerWeek$signed_who = int_ExerciseAverage_MinutesPerWeek$signed_who; - } - - public String getInt_FruitsAndVegetablesAverage_ServingsPerDay() { - return int_FruitsAndVegetablesAverage_ServingsPerDay; - } - - public void setInt_FruitsAndVegetablesAverage_ServingsPerDay(String int_FruitsAndVegetablesAverage_ServingsPerDay) { - this.int_FruitsAndVegetablesAverage_ServingsPerDay = int_FruitsAndVegetablesAverage_ServingsPerDay; - } - - public String getInt_FruitsAndVegetablesAverage_ServingsPerDay$signed_how() { - return int_FruitsAndVegetablesAverage_ServingsPerDay$signed_how; - } - - public void setInt_FruitsAndVegetablesAverage_ServingsPerDay$signed_how( - String int_FruitsAndVegetablesAverage_ServingsPerDay$signed_how) { - this.int_FruitsAndVegetablesAverage_ServingsPerDay$signed_how = int_FruitsAndVegetablesAverage_ServingsPerDay$signed_how; - } - - public String getInt_FruitsAndVegetablesAverage_ServingsPerDay$signed_when() { - return int_FruitsAndVegetablesAverage_ServingsPerDay$signed_when; - } - - public void setInt_FruitsAndVegetablesAverage_ServingsPerDay$signed_when( - String int_FruitsAndVegetablesAverage_ServingsPerDay$signed_when) { - this.int_FruitsAndVegetablesAverage_ServingsPerDay$signed_when = int_FruitsAndVegetablesAverage_ServingsPerDay$signed_when; - } - - public String getInt_FruitsAndVegetablesAverage_ServingsPerDay$signed_who() { - return int_FruitsAndVegetablesAverage_ServingsPerDay$signed_who; - } - - public void setInt_FruitsAndVegetablesAverage_ServingsPerDay$signed_who( - String int_FruitsAndVegetablesAverage_ServingsPerDay$signed_who) { - this.int_FruitsAndVegetablesAverage_ServingsPerDay$signed_who = int_FruitsAndVegetablesAverage_ServingsPerDay$signed_who; - } - - public String getInt_Height_cm() { - return int_Height_cm; - } - - public void setInt_Height_cm(String int_Height_cm) { - this.int_Height_cm = int_Height_cm; - } - - public String getInt_Height_cm$signed_how() { - return int_Height_cm$signed_how; - } - - public void setInt_Height_cm$signed_how(String int_Height_cm$signed_how) { - this.int_Height_cm$signed_how = int_Height_cm$signed_how; - } - - public String getInt_Height_cm$signed_when() { - return int_Height_cm$signed_when; - } - - public void setInt_Height_cm$signed_when(String int_Height_cm$signed_when) { - this.int_Height_cm$signed_when = int_Height_cm$signed_when; - } - - public String getInt_Height_cm$signed_who() { - return int_Height_cm$signed_who; - } - - public void setInt_Height_cm$signed_who(String int_Height_cm$signed_who) { - this.int_Height_cm$signed_who = int_Height_cm$signed_who; - } - - public String getInt_HipCircumference_cm() { - return int_HipCircumference_cm; - } - - public void setInt_HipCircumference_cm(String int_HipCircumference_cm) { - this.int_HipCircumference_cm = int_HipCircumference_cm; - } - - public String getInt_HipCircumference_cm$signed_how() { - return int_HipCircumference_cm$signed_how; - } - - public void setInt_HipCircumference_cm$signed_how(String int_HipCircumference_cm$signed_how) { - this.int_HipCircumference_cm$signed_how = int_HipCircumference_cm$signed_how; - } - - public String getInt_HipCircumference_cm$signed_when() { - return int_HipCircumference_cm$signed_when; - } - - public void setInt_HipCircumference_cm$signed_when(String int_HipCircumference_cm$signed_when) { - this.int_HipCircumference_cm$signed_when = int_HipCircumference_cm$signed_when; - } - - public String getInt_HipCircumference_cm$signed_who() { - return int_HipCircumference_cm$signed_who; - } - - public void setInt_HipCircumference_cm$signed_who(String int_HipCircumference_cm$signed_who) { - this.int_HipCircumference_cm$signed_who = int_HipCircumference_cm$signed_who; - } - - public String getInt_Pulse_bpm() { - return int_Pulse_bpm; - } - - public void setInt_Pulse_bpm(String int_Pulse_bpm) { - this.int_Pulse_bpm = int_Pulse_bpm; - } - - public String getInt_Pulse_bpm$signed_how() { - return int_Pulse_bpm$signed_how; - } - - public void setInt_Pulse_bpm$signed_how(String int_Pulse_bpm$signed_how) { - this.int_Pulse_bpm$signed_how = int_Pulse_bpm$signed_how; - } - - public String getInt_Pulse_bpm$signed_when() { - return int_Pulse_bpm$signed_when; - } - - public void setInt_Pulse_bpm$signed_when(String int_Pulse_bpm$signed_when) { - this.int_Pulse_bpm$signed_when = int_Pulse_bpm$signed_when; - } - - public String getInt_Pulse_bpm$signed_who() { - return int_Pulse_bpm$signed_who; - } - - public void setInt_Pulse_bpm$signed_who(String int_Pulse_bpm$signed_who) { - this.int_Pulse_bpm$signed_who = int_Pulse_bpm$signed_who; - } - - public String getInt_SBP_mmHg() { - return int_SBP_mmHg; - } - - public void setInt_SBP_mmHg(String int_SBP_mmHg) { - this.int_SBP_mmHg = int_SBP_mmHg; - } - - public String getInt_SBP_mmHg$signed_how() { - return int_SBP_mmHg$signed_how; - } - - public void setInt_SBP_mmHg$signed_how(String int_SBP_mmHg$signed_how) { - this.int_SBP_mmHg$signed_how = int_SBP_mmHg$signed_how; - } - - public String getInt_SBP_mmHg$signed_when() { - return int_SBP_mmHg$signed_when; - } - - public void setInt_SBP_mmHg$signed_when(String int_SBP_mmHg$signed_when) { - this.int_SBP_mmHg$signed_when = int_SBP_mmHg$signed_when; - } - - public String getInt_SBP_mmHg$signed_who() { - return int_SBP_mmHg$signed_who; - } - - public void setInt_SBP_mmHg$signed_who(String int_SBP_mmHg$signed_who) { - this.int_SBP_mmHg$signed_who = int_SBP_mmHg$signed_who; - } - - public String getInt_SmokingAverage_CigsPerDay() { - return int_SmokingAverage_CigsPerDay; - } - - public void setInt_SmokingAverage_CigsPerDay(String int_SmokingAverage_CigsPerDay) { - this.int_SmokingAverage_CigsPerDay = int_SmokingAverage_CigsPerDay; - } - - public String getInt_SmokingAverage_CigsPerDay$signed_how() { - return int_SmokingAverage_CigsPerDay$signed_how; - } - - public void setInt_SmokingAverage_CigsPerDay$signed_how(String int_SmokingAverage_CigsPerDay$signed_how) { - this.int_SmokingAverage_CigsPerDay$signed_how = int_SmokingAverage_CigsPerDay$signed_how; - } - - public String getInt_SmokingAverage_CigsPerDay$signed_when() { - return int_SmokingAverage_CigsPerDay$signed_when; - } - - public void setInt_SmokingAverage_CigsPerDay$signed_when(String int_SmokingAverage_CigsPerDay$signed_when) { - this.int_SmokingAverage_CigsPerDay$signed_when = int_SmokingAverage_CigsPerDay$signed_when; - } - - public String getInt_SmokingAverage_CigsPerDay$signed_who() { - return int_SmokingAverage_CigsPerDay$signed_who; - } - - public void setInt_SmokingAverage_CigsPerDay$signed_who(String int_SmokingAverage_CigsPerDay$signed_who) { - this.int_SmokingAverage_CigsPerDay$signed_who = int_SmokingAverage_CigsPerDay$signed_who; - } - - public String getInt_SmokingCumulative_PackYears() { - return int_SmokingCumulative_PackYears; - } - - public void setInt_SmokingCumulative_PackYears(String int_SmokingCumulative_PackYears) { - this.int_SmokingCumulative_PackYears = int_SmokingCumulative_PackYears; - } - - public String getInt_SmokingCumulative_PackYears$signed_how() { - return int_SmokingCumulative_PackYears$signed_how; - } - - public void setInt_SmokingCumulative_PackYears$signed_how(String int_SmokingCumulative_PackYears$signed_how) { - this.int_SmokingCumulative_PackYears$signed_how = int_SmokingCumulative_PackYears$signed_how; - } - - public String getInt_SmokingCumulative_PackYears$signed_when() { - return int_SmokingCumulative_PackYears$signed_when; - } - - public void setInt_SmokingCumulative_PackYears$signed_when(String int_SmokingCumulative_PackYears$signed_when) { - this.int_SmokingCumulative_PackYears$signed_when = int_SmokingCumulative_PackYears$signed_when; - } - - public String getInt_SmokingCumulative_PackYears$signed_who() { - return int_SmokingCumulative_PackYears$signed_who; - } - - public void setInt_SmokingCumulative_PackYears$signed_who(String int_SmokingCumulative_PackYears$signed_who) { - this.int_SmokingCumulative_PackYears$signed_who = int_SmokingCumulative_PackYears$signed_who; - } - - public String getInt_WaistCircumference_cm() { - return int_WaistCircumference_cm; - } - - public void setInt_WaistCircumference_cm(String int_WaistCircumference_cm) { - this.int_WaistCircumference_cm = int_WaistCircumference_cm; - } - - public String getInt_WaistCircumference_cm$signed_how() { - return int_WaistCircumference_cm$signed_how; - } - - public void setInt_WaistCircumference_cm$signed_how(String int_WaistCircumference_cm$signed_how) { - this.int_WaistCircumference_cm$signed_how = int_WaistCircumference_cm$signed_how; - } - - public String getInt_WaistCircumference_cm$signed_when() { - return int_WaistCircumference_cm$signed_when; - } - - public void setInt_WaistCircumference_cm$signed_when(String int_WaistCircumference_cm$signed_when) { - this.int_WaistCircumference_cm$signed_when = int_WaistCircumference_cm$signed_when; - } - - public String getInt_WaistCircumference_cm$signed_who() { - return int_WaistCircumference_cm$signed_who; - } - - public void setInt_WaistCircumference_cm$signed_who(String int_WaistCircumference_cm$signed_who) { - this.int_WaistCircumference_cm$signed_who = int_WaistCircumference_cm$signed_who; - } - - public String getPatient_cod() { - return patient_cod; - } - - public void setPatient_cod(String patient_cod) { - this.patient_cod = patient_cod; - } - - public String getSel_Depression_category() { - return sel_Depression_category; - } - - public void setSel_Depression_category(String sel_Depression_category) { - this.sel_Depression_category = sel_Depression_category; - } - - public String getSel_Depression_category$signed_how() { - return sel_Depression_category$signed_how; - } - - public void setSel_Depression_category$signed_how(String sel_Depression_category$signed_how) { - this.sel_Depression_category$signed_how = sel_Depression_category$signed_how; - } - - public String getSel_Depression_category$signed_when() { - return sel_Depression_category$signed_when; - } - - public void setSel_Depression_category$signed_when(String sel_Depression_category$signed_when) { - this.sel_Depression_category$signed_when = sel_Depression_category$signed_when; - } - - public String getSel_Depression_category$signed_who() { - return sel_Depression_category$signed_who; - } - - public void setSel_Depression_category$signed_who(String sel_Depression_category$signed_who) { - this.sel_Depression_category$signed_who = sel_Depression_category$signed_who; - } - - public String getSel_EyeExam_DiabeticRetinopathy() { - return sel_EyeExam_DiabeticRetinopathy; - } - - public void setSel_EyeExam_DiabeticRetinopathy(String sel_EyeExam_DiabeticRetinopathy) { - this.sel_EyeExam_DiabeticRetinopathy = sel_EyeExam_DiabeticRetinopathy; - } - - public String getSel_EyeExam_DiabeticRetinopathy$signed_how() { - return sel_EyeExam_DiabeticRetinopathy$signed_how; - } - - public void setSel_EyeExam_DiabeticRetinopathy$signed_how(String sel_EyeExam_DiabeticRetinopathy$signed_how) { - this.sel_EyeExam_DiabeticRetinopathy$signed_how = sel_EyeExam_DiabeticRetinopathy$signed_how; - } - - public String getSel_EyeExam_DiabeticRetinopathy$signed_when() { - return sel_EyeExam_DiabeticRetinopathy$signed_when; - } - - public void setSel_EyeExam_DiabeticRetinopathy$signed_when(String sel_EyeExam_DiabeticRetinopathy$signed_when) { - this.sel_EyeExam_DiabeticRetinopathy$signed_when = sel_EyeExam_DiabeticRetinopathy$signed_when; - } - - public String getSel_EyeExam_DiabeticRetinopathy$signed_who() { - return sel_EyeExam_DiabeticRetinopathy$signed_who; - } - - public void setSel_EyeExam_DiabeticRetinopathy$signed_who(String sel_EyeExam_DiabeticRetinopathy$signed_who) { - this.sel_EyeExam_DiabeticRetinopathy$signed_who = sel_EyeExam_DiabeticRetinopathy$signed_who; - } - - public String getSel_EyeExam_HypertensiveRetinopathy() { - return sel_EyeExam_HypertensiveRetinopathy; - } - - public void setSel_EyeExam_HypertensiveRetinopathy(String sel_EyeExam_HypertensiveRetinopathy) { - this.sel_EyeExam_HypertensiveRetinopathy = sel_EyeExam_HypertensiveRetinopathy; - } - - public String getSel_EyeExam_HypertensiveRetinopathy$signed_how() { - return sel_EyeExam_HypertensiveRetinopathy$signed_how; - } - - public void setSel_EyeExam_HypertensiveRetinopathy$signed_how( - String sel_EyeExam_HypertensiveRetinopathy$signed_how) { - this.sel_EyeExam_HypertensiveRetinopathy$signed_how = sel_EyeExam_HypertensiveRetinopathy$signed_how; - } - - public String getSel_EyeExam_HypertensiveRetinopathy$signed_when() { - return sel_EyeExam_HypertensiveRetinopathy$signed_when; - } - - public void setSel_EyeExam_HypertensiveRetinopathy$signed_when( - String sel_EyeExam_HypertensiveRetinopathy$signed_when) { - this.sel_EyeExam_HypertensiveRetinopathy$signed_when = sel_EyeExam_HypertensiveRetinopathy$signed_when; - } - - public String getSel_EyeExam_HypertensiveRetinopathy$signed_who() { - return sel_EyeExam_HypertensiveRetinopathy$signed_who; - } - - public void setSel_EyeExam_HypertensiveRetinopathy$signed_who( - String sel_EyeExam_HypertensiveRetinopathy$signed_who) { - this.sel_EyeExam_HypertensiveRetinopathy$signed_who = sel_EyeExam_HypertensiveRetinopathy$signed_who; - } - - public String getSel_EyeExam_OtherAbnormality() { - return sel_EyeExam_OtherAbnormality; - } - - public void setSel_EyeExam_OtherAbnormality(String sel_EyeExam_OtherAbnormality) { - this.sel_EyeExam_OtherAbnormality = sel_EyeExam_OtherAbnormality; - } - - public String getSel_EyeExam_OtherAbnormality$signed_how() { - return sel_EyeExam_OtherAbnormality$signed_how; - } - - public void setSel_EyeExam_OtherAbnormality$signed_how(String sel_EyeExam_OtherAbnormality$signed_how) { - this.sel_EyeExam_OtherAbnormality$signed_how = sel_EyeExam_OtherAbnormality$signed_how; - } - - public String getSel_EyeExam_OtherAbnormality$signed_when() { - return sel_EyeExam_OtherAbnormality$signed_when; - } - - public void setSel_EyeExam_OtherAbnormality$signed_when(String sel_EyeExam_OtherAbnormality$signed_when) { - this.sel_EyeExam_OtherAbnormality$signed_when = sel_EyeExam_OtherAbnormality$signed_when; - } - - public String getSel_EyeExam_OtherAbnormality$signed_who() { - return sel_EyeExam_OtherAbnormality$signed_who; - } - - public void setSel_EyeExam_OtherAbnormality$signed_who(String sel_EyeExam_OtherAbnormality$signed_who) { - this.sel_EyeExam_OtherAbnormality$signed_who = sel_EyeExam_OtherAbnormality$signed_who; - } - - public String getSel_FootExam_Infection() { - return sel_FootExam_Infection; - } - - public void setSel_FootExam_Infection(String sel_FootExam_Infection) { - this.sel_FootExam_Infection = sel_FootExam_Infection; - } - - public String getSel_FootExam_Infection$signed_how() { - return sel_FootExam_Infection$signed_how; - } - - public void setSel_FootExam_Infection$signed_how(String sel_FootExam_Infection$signed_how) { - this.sel_FootExam_Infection$signed_how = sel_FootExam_Infection$signed_how; - } - - public String getSel_FootExam_Infection$signed_when() { - return sel_FootExam_Infection$signed_when; - } - - public void setSel_FootExam_Infection$signed_when(String sel_FootExam_Infection$signed_when) { - this.sel_FootExam_Infection$signed_when = sel_FootExam_Infection$signed_when; - } - - public String getSel_FootExam_Infection$signed_who() { - return sel_FootExam_Infection$signed_who; - } - - public void setSel_FootExam_Infection$signed_who(String sel_FootExam_Infection$signed_who) { - this.sel_FootExam_Infection$signed_who = sel_FootExam_Infection$signed_who; - } - - public String getSel_FootExam_Ischemia() { - return sel_FootExam_Ischemia; - } - - public void setSel_FootExam_Ischemia(String sel_FootExam_Ischemia) { - this.sel_FootExam_Ischemia = sel_FootExam_Ischemia; - } - - public String getSel_FootExam_Ischemia$signed_how() { - return sel_FootExam_Ischemia$signed_how; - } - - public void setSel_FootExam_Ischemia$signed_how(String sel_FootExam_Ischemia$signed_how) { - this.sel_FootExam_Ischemia$signed_how = sel_FootExam_Ischemia$signed_how; - } - - public String getSel_FootExam_Ischemia$signed_when() { - return sel_FootExam_Ischemia$signed_when; - } - - public void setSel_FootExam_Ischemia$signed_when(String sel_FootExam_Ischemia$signed_when) { - this.sel_FootExam_Ischemia$signed_when = sel_FootExam_Ischemia$signed_when; - } - - public String getSel_FootExam_Ischemia$signed_who() { - return sel_FootExam_Ischemia$signed_who; - } - - public void setSel_FootExam_Ischemia$signed_who(String sel_FootExam_Ischemia$signed_who) { - this.sel_FootExam_Ischemia$signed_who = sel_FootExam_Ischemia$signed_who; - } - - public String getSel_FootExam_Neuropathy() { - return sel_FootExam_Neuropathy; - } - - public void setSel_FootExam_Neuropathy(String sel_FootExam_Neuropathy) { - this.sel_FootExam_Neuropathy = sel_FootExam_Neuropathy; - } - - public String getSel_FootExam_Neuropathy$signed_how() { - return sel_FootExam_Neuropathy$signed_how; - } - - public void setSel_FootExam_Neuropathy$signed_how(String sel_FootExam_Neuropathy$signed_how) { - this.sel_FootExam_Neuropathy$signed_how = sel_FootExam_Neuropathy$signed_how; - } - - public String getSel_FootExam_Neuropathy$signed_when() { - return sel_FootExam_Neuropathy$signed_when; - } - - public void setSel_FootExam_Neuropathy$signed_when(String sel_FootExam_Neuropathy$signed_when) { - this.sel_FootExam_Neuropathy$signed_when = sel_FootExam_Neuropathy$signed_when; - } - - public String getSel_FootExam_Neuropathy$signed_who() { - return sel_FootExam_Neuropathy$signed_who; - } - - public void setSel_FootExam_Neuropathy$signed_who(String sel_FootExam_Neuropathy$signed_who) { - this.sel_FootExam_Neuropathy$signed_who = sel_FootExam_Neuropathy$signed_who; - } - - public String getSel_FootExam_OtherAbnormality() { - return sel_FootExam_OtherAbnormality; - } - - public void setSel_FootExam_OtherAbnormality(String sel_FootExam_OtherAbnormality) { - this.sel_FootExam_OtherAbnormality = sel_FootExam_OtherAbnormality; - } - - public String getSel_FootExam_OtherAbnormality$signed_how() { - return sel_FootExam_OtherAbnormality$signed_how; - } - - public void setSel_FootExam_OtherAbnormality$signed_how(String sel_FootExam_OtherAbnormality$signed_how) { - this.sel_FootExam_OtherAbnormality$signed_how = sel_FootExam_OtherAbnormality$signed_how; - } - - public String getSel_FootExam_OtherAbnormality$signed_when() { - return sel_FootExam_OtherAbnormality$signed_when; - } - - public void setSel_FootExam_OtherAbnormality$signed_when(String sel_FootExam_OtherAbnormality$signed_when) { - this.sel_FootExam_OtherAbnormality$signed_when = sel_FootExam_OtherAbnormality$signed_when; - } - - public String getSel_FootExam_OtherAbnormality$signed_who() { - return sel_FootExam_OtherAbnormality$signed_who; - } - - public void setSel_FootExam_OtherAbnormality$signed_who(String sel_FootExam_OtherAbnormality$signed_who) { - this.sel_FootExam_OtherAbnormality$signed_who = sel_FootExam_OtherAbnormality$signed_who; - } - - public String getSel_FootExam_Ulcer() { - return sel_FootExam_Ulcer; - } - - public void setSel_FootExam_Ulcer(String sel_FootExam_Ulcer) { - this.sel_FootExam_Ulcer = sel_FootExam_Ulcer; - } - - public String getSel_FootExam_Ulcer$signed_how() { - return sel_FootExam_Ulcer$signed_how; - } - - public void setSel_FootExam_Ulcer$signed_how(String sel_FootExam_Ulcer$signed_how) { - this.sel_FootExam_Ulcer$signed_how = sel_FootExam_Ulcer$signed_how; - } - - public String getSel_FootExam_Ulcer$signed_when() { - return sel_FootExam_Ulcer$signed_when; - } - - public void setSel_FootExam_Ulcer$signed_when(String sel_FootExam_Ulcer$signed_when) { - this.sel_FootExam_Ulcer$signed_when = sel_FootExam_Ulcer$signed_when; - } - - public String getSel_FootExam_Ulcer$signed_who() { - return sel_FootExam_Ulcer$signed_who; - } - - public void setSel_FootExam_Ulcer$signed_who(String sel_FootExam_Ulcer$signed_who) { - this.sel_FootExam_Ulcer$signed_who = sel_FootExam_Ulcer$signed_who; - } - - public String getSel_LocusOfControl_category() { - return sel_LocusOfControl_category; - } - - public void setSel_LocusOfControl_category(String sel_LocusOfControl_category) { - this.sel_LocusOfControl_category = sel_LocusOfControl_category; - } - - public String getSel_LocusOfControl_category$signed_how() { - return sel_LocusOfControl_category$signed_how; - } - - public void setSel_LocusOfControl_category$signed_how(String sel_LocusOfControl_category$signed_how) { - this.sel_LocusOfControl_category$signed_how = sel_LocusOfControl_category$signed_how; - } - - public String getSel_LocusOfControl_category$signed_when() { - return sel_LocusOfControl_category$signed_when; - } - - public void setSel_LocusOfControl_category$signed_when(String sel_LocusOfControl_category$signed_when) { - this.sel_LocusOfControl_category$signed_when = sel_LocusOfControl_category$signed_when; - } - - public String getSel_LocusOfControl_category$signed_who() { - return sel_LocusOfControl_category$signed_who; - } - - public void setSel_LocusOfControl_category$signed_who(String sel_LocusOfControl_category$signed_who) { - this.sel_LocusOfControl_category$signed_who = sel_LocusOfControl_category$signed_who; - } - - public String getSel_MedicationAdherence_access() { - return sel_MedicationAdherence_access; - } - - public void setSel_MedicationAdherence_access(String sel_MedicationAdherence_access) { - this.sel_MedicationAdherence_access = sel_MedicationAdherence_access; - } - - public String getSel_MedicationAdherence_access$signed_how() { - return sel_MedicationAdherence_access$signed_how; - } - - public void setSel_MedicationAdherence_access$signed_how(String sel_MedicationAdherence_access$signed_how) { - this.sel_MedicationAdherence_access$signed_how = sel_MedicationAdherence_access$signed_how; - } - - public String getSel_MedicationAdherence_access$signed_when() { - return sel_MedicationAdherence_access$signed_when; - } - - public void setSel_MedicationAdherence_access$signed_when(String sel_MedicationAdherence_access$signed_when) { - this.sel_MedicationAdherence_access$signed_when = sel_MedicationAdherence_access$signed_when; - } - - public String getSel_MedicationAdherence_access$signed_who() { - return sel_MedicationAdherence_access$signed_who; - } - - public void setSel_MedicationAdherence_access$signed_who(String sel_MedicationAdherence_access$signed_who) { - this.sel_MedicationAdherence_access$signed_who = sel_MedicationAdherence_access$signed_who; - } - - public String getSel_MedicationAdherence_beliefs() { - return sel_MedicationAdherence_beliefs; - } - - public void setSel_MedicationAdherence_beliefs(String sel_MedicationAdherence_beliefs) { - this.sel_MedicationAdherence_beliefs = sel_MedicationAdherence_beliefs; - } - - public String getSel_MedicationAdherence_beliefs$signed_how() { - return sel_MedicationAdherence_beliefs$signed_how; - } - - public void setSel_MedicationAdherence_beliefs$signed_how(String sel_MedicationAdherence_beliefs$signed_how) { - this.sel_MedicationAdherence_beliefs$signed_how = sel_MedicationAdherence_beliefs$signed_how; - } - - public String getSel_MedicationAdherence_beliefs$signed_when() { - return sel_MedicationAdherence_beliefs$signed_when; - } - - public void setSel_MedicationAdherence_beliefs$signed_when(String sel_MedicationAdherence_beliefs$signed_when) { - this.sel_MedicationAdherence_beliefs$signed_when = sel_MedicationAdherence_beliefs$signed_when; - } - - public String getSel_MedicationAdherence_beliefs$signed_who() { - return sel_MedicationAdherence_beliefs$signed_who; - } - - public void setSel_MedicationAdherence_beliefs$signed_who(String sel_MedicationAdherence_beliefs$signed_who) { - this.sel_MedicationAdherence_beliefs$signed_who = sel_MedicationAdherence_beliefs$signed_who; - } - - public String getSel_MedicationAdherence_genprob() { - return sel_MedicationAdherence_genprob; - } - - public void setSel_MedicationAdherence_genprob(String sel_MedicationAdherence_genprob) { - this.sel_MedicationAdherence_genprob = sel_MedicationAdherence_genprob; - } - - public String getSel_MedicationAdherence_genprob$signed_how() { - return sel_MedicationAdherence_genprob$signed_how; - } - - public void setSel_MedicationAdherence_genprob$signed_how(String sel_MedicationAdherence_genprob$signed_how) { - this.sel_MedicationAdherence_genprob$signed_how = sel_MedicationAdherence_genprob$signed_how; - } - - public String getSel_MedicationAdherence_genprob$signed_when() { - return sel_MedicationAdherence_genprob$signed_when; - } - - public void setSel_MedicationAdherence_genprob$signed_when(String sel_MedicationAdherence_genprob$signed_when) { - this.sel_MedicationAdherence_genprob$signed_when = sel_MedicationAdherence_genprob$signed_when; - } - - public String getSel_MedicationAdherence_genprob$signed_who() { - return sel_MedicationAdherence_genprob$signed_who; - } - - public void setSel_MedicationAdherence_genprob$signed_who(String sel_MedicationAdherence_genprob$signed_who) { - this.sel_MedicationAdherence_genprob$signed_who = sel_MedicationAdherence_genprob$signed_who; - } - - public String getSel_MedicationAdherence_recall() { - return sel_MedicationAdherence_recall; - } - - public void setSel_MedicationAdherence_recall(String sel_MedicationAdherence_recall) { - this.sel_MedicationAdherence_recall = sel_MedicationAdherence_recall; - } - - public String getSel_MedicationAdherence_recall$signed_how() { - return sel_MedicationAdherence_recall$signed_how; - } - - public void setSel_MedicationAdherence_recall$signed_how(String sel_MedicationAdherence_recall$signed_how) { - this.sel_MedicationAdherence_recall$signed_how = sel_MedicationAdherence_recall$signed_how; - } - - public String getSel_MedicationAdherence_recall$signed_when() { - return sel_MedicationAdherence_recall$signed_when; - } - - public void setSel_MedicationAdherence_recall$signed_when(String sel_MedicationAdherence_recall$signed_when) { - this.sel_MedicationAdherence_recall$signed_when = sel_MedicationAdherence_recall$signed_when; - } - - public String getSel_MedicationAdherence_recall$signed_who() { - return sel_MedicationAdherence_recall$signed_who; - } - - public void setSel_MedicationAdherence_recall$signed_who(String sel_MedicationAdherence_recall$signed_who) { - this.sel_MedicationAdherence_recall$signed_who = sel_MedicationAdherence_recall$signed_who; - } - - public String getSel_Stress_category() { - return sel_Stress_category; - } - - public void setSel_Stress_category(String sel_Stress_category) { - this.sel_Stress_category = sel_Stress_category; - } - - public String getSel_Stress_category$signed_how() { - return sel_Stress_category$signed_how; - } - - public void setSel_Stress_category$signed_how(String sel_Stress_category$signed_how) { - this.sel_Stress_category$signed_how = sel_Stress_category$signed_how; - } - - public String getSel_Stress_category$signed_when() { - return sel_Stress_category$signed_when; - } - - public void setSel_Stress_category$signed_when(String sel_Stress_category$signed_when) { - this.sel_Stress_category$signed_when = sel_Stress_category$signed_when; - } - - public String getSel_Stress_category$signed_who() { - return sel_Stress_category$signed_who; - } - - public void setSel_Stress_category$signed_who(String sel_Stress_category$signed_who) { - this.sel_Stress_category$signed_who = sel_Stress_category$signed_who; - } - - public String getSigned_how() { - return signed_how; - } - - public void setSigned_how(String signed_how) { - this.signed_how = signed_how; - } - - public String getSigned_when() { - return signed_when; - } - - public void setSigned_when(String signed_when) { - this.signed_when = signed_when; - } - - public String getSigned_who() { - return signed_who; - } - - public void setSigned_who(String signed_who) { - this.signed_who = signed_who; - } - - public String getSite_cod() { - return site_cod; - } - - public void setSite_cod(String site_cod) { - this.site_cod = site_cod; - } - - public String getB_Counseled_Diabetes() { - return b_Counseled_Diabetes; - } - - public void setB_Counseled_Diabetes(String counseled_Diabetes) { - b_Counseled_Diabetes = counseled_Diabetes; - } - - public String getB_Counseled_Diabetes$signed_how() { - return b_Counseled_Diabetes$signed_how; - } - - public void setB_Counseled_Diabetes$signed_how(String counseled_Diabetes$signed_how) { - b_Counseled_Diabetes$signed_how = counseled_Diabetes$signed_how; - } - - public String getB_Counseled_Diabetes$signed_when() { - return b_Counseled_Diabetes$signed_when; - } - - public void setB_Counseled_Diabetes$signed_when(String counseled_Diabetes$signed_when) { - b_Counseled_Diabetes$signed_when = counseled_Diabetes$signed_when; - } - - public String getB_Counseled_Diabetes$signed_who() { - return b_Counseled_Diabetes$signed_who; - } - - public void setB_Counseled_Diabetes$signed_who(String counseled_Diabetes$signed_who) { - b_Counseled_Diabetes$signed_who = counseled_Diabetes$signed_who; - } - - public String getB_Counseled_Diet() { - return b_Counseled_Diet; - } - - public void setB_Counseled_Diet(String counseled_Diet) { - b_Counseled_Diet = counseled_Diet; - } - - public String getB_Counseled_Diet$signed_how() { - return b_Counseled_Diet$signed_how; - } - - public void setB_Counseled_Diet$signed_how(String counseled_Diet$signed_how) { - b_Counseled_Diet$signed_how = counseled_Diet$signed_how; - } - - public String getB_Counseled_Diet$signed_when() { - return b_Counseled_Diet$signed_when; - } - - public void setB_Counseled_Diet$signed_when(String counseled_Diet$signed_when) { - b_Counseled_Diet$signed_when = counseled_Diet$signed_when; - } - - public String getB_Counseled_Diet$signed_who() { - return b_Counseled_Diet$signed_who; - } - - public void setB_Counseled_Diet$signed_who(String counseled_Diet$signed_who) { - b_Counseled_Diet$signed_who = counseled_Diet$signed_who; - } - - public String getB_Counseled_Exercise() { - return b_Counseled_Exercise; - } - - public void setB_Counseled_Exercise(String counseled_Exercise) { - b_Counseled_Exercise = counseled_Exercise; - } - - public String getB_Counseled_Exercise$signed_how() { - return b_Counseled_Exercise$signed_how; - } - - public void setB_Counseled_Exercise$signed_how(String counseled_Exercise$signed_how) { - b_Counseled_Exercise$signed_how = counseled_Exercise$signed_how; - } - - public String getB_Counseled_Exercise$signed_when() { - return b_Counseled_Exercise$signed_when; - } - - public void setB_Counseled_Exercise$signed_when(String counseled_Exercise$signed_when) { - b_Counseled_Exercise$signed_when = counseled_Exercise$signed_when; - } - - public String getB_Counseled_Exercise$signed_who() { - return b_Counseled_Exercise$signed_who; - } - - public void setB_Counseled_Exercise$signed_who(String counseled_Exercise$signed_who) { - b_Counseled_Exercise$signed_who = counseled_Exercise$signed_who; - } - - public String getB_Counseled_Other() { - return b_Counseled_Other; - } - - public void setB_Counseled_Other(String counseled_Other) { - b_Counseled_Other = counseled_Other; - } - - public String getB_Counseled_Other$signed_how() { - return b_Counseled_Other$signed_how; - } - - public void setB_Counseled_Other$signed_how(String counseled_Other$signed_how) { - b_Counseled_Other$signed_how = counseled_Other$signed_how; - } - - public String getB_Counseled_Other$signed_when() { - return b_Counseled_Other$signed_when; - } - - public void setB_Counseled_Other$signed_when(String counseled_Other$signed_when) { - b_Counseled_Other$signed_when = counseled_Other$signed_when; - } - - public String getB_Counseled_Other$signed_who() { - return b_Counseled_Other$signed_who; - } - - public void setB_Counseled_Other$signed_who(String counseled_Other$signed_who) { - b_Counseled_Other$signed_who = counseled_Other$signed_who; - } - - public String getB_Counseled_Psychosocial() { - return b_Counseled_Psychosocial; - } - - public void setB_Counseled_Psychosocial(String counseled_Psychosocial) { - b_Counseled_Psychosocial = counseled_Psychosocial; - } - - public String getB_Counseled_Psychosocial$signed_how() { - return b_Counseled_Psychosocial$signed_how; - } - - public void setB_Counseled_Psychosocial$signed_how(String counseled_Psychosocial$signed_how) { - b_Counseled_Psychosocial$signed_how = counseled_Psychosocial$signed_how; - } - - public String getB_Counseled_Psychosocial$signed_when() { - return b_Counseled_Psychosocial$signed_when; - } - - public void setB_Counseled_Psychosocial$signed_when(String counseled_Psychosocial$signed_when) { - b_Counseled_Psychosocial$signed_when = counseled_Psychosocial$signed_when; - } - - public String getB_Counseled_Psychosocial$signed_who() { - return b_Counseled_Psychosocial$signed_who; - } - - public void setB_Counseled_Psychosocial$signed_who(String counseled_Psychosocial$signed_who) { - b_Counseled_Psychosocial$signed_who = counseled_Psychosocial$signed_who; - } - - public String getB_Counseled_SmokingCessation() { - return b_Counseled_SmokingCessation; - } - - public void setB_Counseled_SmokingCessation(String counseled_SmokingCessation) { - b_Counseled_SmokingCessation = counseled_SmokingCessation; - } - - public String getB_Counseled_SmokingCessation$signed_how() { - return b_Counseled_SmokingCessation$signed_how; - } - - public void setB_Counseled_SmokingCessation$signed_how(String counseled_SmokingCessation$signed_how) { - b_Counseled_SmokingCessation$signed_how = counseled_SmokingCessation$signed_how; - } - - public String getB_Counseled_SmokingCessation$signed_when() { - return b_Counseled_SmokingCessation$signed_when; - } - - public void setB_Counseled_SmokingCessation$signed_when(String counseled_SmokingCessation$signed_when) { - b_Counseled_SmokingCessation$signed_when = counseled_SmokingCessation$signed_when; - } - - public String getB_Counseled_SmokingCessation$signed_who() { - return b_Counseled_SmokingCessation$signed_who; - } - - public void setB_Counseled_SmokingCessation$signed_who(String counseled_SmokingCessation$signed_who) { - b_Counseled_SmokingCessation$signed_who = counseled_SmokingCessation$signed_who; - } - - public String getB_Referred_EyeExam() { - return b_Referred_EyeExam; - } - - public void setB_Referred_EyeExam(String referred_EyeExam) { - b_Referred_EyeExam = referred_EyeExam; - } - - public String getB_Referred_EyeExam$signed_how() { - return b_Referred_EyeExam$signed_how; - } - - public void setB_Referred_EyeExam$signed_how(String referred_EyeExam$signed_how) { - b_Referred_EyeExam$signed_how = referred_EyeExam$signed_how; - } - - public String getB_Referred_EyeExam$signed_when() { - return b_Referred_EyeExam$signed_when; - } - - public void setB_Referred_EyeExam$signed_when(String referred_EyeExam$signed_when) { - b_Referred_EyeExam$signed_when = referred_EyeExam$signed_when; - } - - public String getB_Referred_EyeExam$signed_who() { - return b_Referred_EyeExam$signed_who; - } - - public void setB_Referred_EyeExam$signed_who(String referred_EyeExam$signed_who) { - b_Referred_EyeExam$signed_who = referred_EyeExam$signed_who; - } - - public String getB_Referred_FootExam() { - return b_Referred_FootExam; - } - - public void setB_Referred_FootExam(String referred_FootExam) { - b_Referred_FootExam = referred_FootExam; - } - - public String getB_Referred_FootExam$signed_how() { - return b_Referred_FootExam$signed_how; - } - - public void setB_Referred_FootExam$signed_how(String referred_FootExam$signed_how) { - b_Referred_FootExam$signed_how = referred_FootExam$signed_how; - } - - public String getB_Referred_FootExam$signed_when() { - return b_Referred_FootExam$signed_when; - } - - public void setB_Referred_FootExam$signed_when(String referred_FootExam$signed_when) { - b_Referred_FootExam$signed_when = referred_FootExam$signed_when; - } - - public String getB_Referred_FootExam$signed_who() { - return b_Referred_FootExam$signed_who; - } - - public void setB_Referred_FootExam$signed_who(String referred_FootExam$signed_who) { - b_Referred_FootExam$signed_who = referred_FootExam$signed_who; - } - - public String getDat_Glucose() { - return dat_Glucose; - } - - public void setDat_Glucose(String dat_Glucose) { - this.dat_Glucose = dat_Glucose; - } - - public String getDat_Glucose$signed_how() { - return dat_Glucose$signed_how; - } - - public void setDat_Glucose$signed_how(String dat_Glucose$signed_how) { - this.dat_Glucose$signed_how = dat_Glucose$signed_how; - } - - public String getDat_Glucose$signed_when() { - return dat_Glucose$signed_when; - } - - public void setDat_Glucose$signed_when(String dat_Glucose$signed_when) { - this.dat_Glucose$signed_when = dat_Glucose$signed_when; - } - - public String getDat_Glucose$signed_who() { - return dat_Glucose$signed_who; - } - - public void setDat_Glucose$signed_who(String dat_Glucose$signed_who) { - this.dat_Glucose$signed_who = dat_Glucose$signed_who; - } - - public String getDat_HbA1C() { - return dat_HbA1C; - } - - public void setDat_HbA1C(String dat_HbA1C) { - this.dat_HbA1C = dat_HbA1C; - } - - public String getDat_HbA1C$signed_how() { - return dat_HbA1C$signed_how; - } - - public void setDat_HbA1C$signed_how(String dat_HbA1C$signed_how) { - this.dat_HbA1C$signed_how = dat_HbA1C$signed_how; - } - - public String getdat_HbA1C$signed_when() { - return dat_HbA1C$signed_when; - } - - public void setdat_HbA1C$signed_when(String dat_HbA1C$signed_when) { - this.dat_HbA1C$signed_when = dat_HbA1C$signed_when; - } - - public String getdat_HbA1C$signed_who() { - return dat_HbA1C$signed_who; - } - - public void setdat_HbA1C$signed_who(String dat_HbA1C$signed_who) { - this.dat_HbA1C$signed_who = dat_HbA1C$signed_who; - } - - public String getDat_HDL() { - return dat_HDL; - } - - public void setDat_HDL(String dat_HDL) { - this.dat_HDL = dat_HDL; - } - - public String getDat_HDL$signed_how() { - return dat_HDL$signed_how; - } - - public void setDat_HDL$signed_how(String dat_HDL$signed_how) { - this.dat_HDL$signed_how = dat_HDL$signed_how; - } - - public String getDat_HDL$signed_when() { - return dat_HDL$signed_when; - } - - public void setDat_HDL$signed_when(String dat_HDL$signed_when) { - this.dat_HDL$signed_when = dat_HDL$signed_when; - } - - public String getDat_HDL$signed_who() { - return dat_HDL$signed_who; - } - - public void setDat_HDL$signed_who(String dat_HDL$signed_who) { - this.dat_HDL$signed_who = dat_HDL$signed_who; - } - - public String getDat_LDL() { - return dat_LDL; - } - - public void setDat_LDL(String dat_LDL) { - this.dat_LDL = dat_LDL; - } - - public String getDat_LDL$signed_how() { - return dat_LDL$signed_how; - } - - public void setDat_LDL$signed_how(String dat_LDL$signed_how) { - this.dat_LDL$signed_how = dat_LDL$signed_how; - } - - public String getDat_LDL$signed_when() { - return dat_LDL$signed_when; - } - - public void setDat_LDL$signed_when(String dat_LDL$signed_when) { - this.dat_LDL$signed_when = dat_LDL$signed_when; - } - - public String getDat_LDL$signed_who() { - return dat_LDL$signed_who; - } - - public void setDat_LDL$signed_who(String dat_LDL$signed_who) { - this.dat_LDL$signed_who = dat_LDL$signed_who; - } - - public String getDat_TotalCholesterol() { - return dat_TotalCholesterol; - } - - public void setDat_TotalCholesterol(String dat_TotalCholesterol) { - this.dat_TotalCholesterol = dat_TotalCholesterol; - } - - public String getDat_TotalCholesterol$signed_how() { - return dat_TotalCholesterol$signed_how; - } - - public void setDat_TotalCholesterol$signed_how(String dat_TotalCholesterol$signed_how) { - this.dat_TotalCholesterol$signed_how = dat_TotalCholesterol$signed_how; - } - - public String getDat_TotalCholesterol$signed_when() { - return dat_TotalCholesterol$signed_when; - } - - public void setDat_TotalCholesterol$signed_when(String dat_TotalCholesterol$signed_when) { - this.dat_TotalCholesterol$signed_when = dat_TotalCholesterol$signed_when; - } - - public String getDat_TotalCholesterol$signed_who() { - return dat_TotalCholesterol$signed_who; - } - - public void setDat_TotalCholesterol$signed_who(String dat_TotalCholesterol$signed_who) { - this.dat_TotalCholesterol$signed_who = dat_TotalCholesterol$signed_who; - } - - public String getDat_Triglycerides() { - return dat_Triglycerides; - } - - public void setDat_Triglycerides(String dat_Triglycerides) { - this.dat_Triglycerides = dat_Triglycerides; - } - - public String getDat_Triglycerides$signed_how() { - return dat_Triglycerides$signed_how; - } - - public void setDat_Triglycerides$signed_how(String dat_Triglycerides$signed_how) { - this.dat_Triglycerides$signed_how = dat_Triglycerides$signed_how; - } - - public String getDat_Triglycerides$signed_when() { - return dat_Triglycerides$signed_when; - } - - public void setDat_Triglycerides$signed_when(String dat_Triglycerides$signed_when) { - this.dat_Triglycerides$signed_when = dat_Triglycerides$signed_when; - } - - public String getDat_Triglycerides$signed_who() { - return dat_Triglycerides$signed_who; - } - - public void setDat_Triglycerides$signed_who(String dat_Triglycerides$signed_who) { - this.dat_Triglycerides$signed_who = dat_Triglycerides$signed_who; - } - - public String getDat_UrineAlbumin() { - return dat_UrineAlbumin; - } - - public void setDat_UrineAlbumin(String dat_UrineAlbumin) { - this.dat_UrineAlbumin = dat_UrineAlbumin; - } - - public String getDat_UrineAlbumin$signed_how() { - return dat_UrineAlbumin$signed_how; - } - - public void setDat_UrineAlbumin$signed_how(String dat_UrineAlbumin$signed_how) { - this.dat_UrineAlbumin$signed_how = dat_UrineAlbumin$signed_how; - } - - public String getDat_UrineAlbumin$signed_when() { - return dat_UrineAlbumin$signed_when; - } - - public void setDat_UrineAlbumin$signed_when(String dat_UrineAlbumin$signed_when) { - this.dat_UrineAlbumin$signed_when = dat_UrineAlbumin$signed_when; - } - - public String getDat_UrineAlbumin$signed_who() { - return dat_UrineAlbumin$signed_who; - } - - public void setDat_UrineAlbumin$signed_who(String dat_UrineAlbumin$signed_who) { - this.dat_UrineAlbumin$signed_who = dat_UrineAlbumin$signed_who; - } - - public String getDat_UrineAlbuminCreatinineRatio() { - return dat_UrineAlbuminCreatinineRatio; - } - - public void setDat_UrineAlbuminCreatinineRatio(String dat_UrineAlbuminCreatinineRatio) { - this.dat_UrineAlbuminCreatinineRatio = dat_UrineAlbuminCreatinineRatio; - } - - public String getDat_UrineAlbuminCreatinineRatio$signed_how() { - return dat_UrineAlbuminCreatinineRatio$signed_how; - } - - public void setDat_UrineAlbuminCreatinineRatio$signed_how(String dat_UrineAlbuminCreatinineRatio$signed_how) { - this.dat_UrineAlbuminCreatinineRatio$signed_how = dat_UrineAlbuminCreatinineRatio$signed_how; - } - - public String getDat_UrineAlbuminCreatinineRatio$signed_when() { - return dat_UrineAlbuminCreatinineRatio$signed_when; - } - - public void setDat_UrineAlbuminCreatinineRatio$signed_when(String dat_UrineAlbuminCreatinineRatio$signed_when) { - this.dat_UrineAlbuminCreatinineRatio$signed_when = dat_UrineAlbuminCreatinineRatio$signed_when; - } - - public String getDat_UrineAlbuminCreatinineRatio$signed_who() { - return dat_UrineAlbuminCreatinineRatio$signed_who; - } - - public void setDat_UrineAlbuminCreatinineRatio$signed_who(String dat_UrineAlbuminCreatinineRatio$signed_who) { - this.dat_UrineAlbuminCreatinineRatio$signed_who = dat_UrineAlbuminCreatinineRatio$signed_who; - } - - public String getDbl_Glucose_mM() { - return dbl_Glucose_mM; - } - - public void setDbl_Glucose_mM(String dbl_Glucose_mM) { - this.dbl_Glucose_mM = dbl_Glucose_mM; - } - - public String getDbl_Glucose_mM$signed_how() { - return dbl_Glucose_mM$signed_how; - } - - public void setDbl_Glucose_mM$signed_how(String dbl_Glucose_mM$signed_how) { - this.dbl_Glucose_mM$signed_how = dbl_Glucose_mM$signed_how; - } - - public String getDbl_Glucose_mM$signed_when() { - return dbl_Glucose_mM$signed_when; - } - - public void setDbl_Glucose_mM$signed_when(String dbl_Glucose_mM$signed_when) { - this.dbl_Glucose_mM$signed_when = dbl_Glucose_mM$signed_when; - } - - public String getDbl_Glucose_mM$signed_who() { - return dbl_Glucose_mM$signed_who; - } - - public void setDbl_Glucose_mM$signed_who(String dbl_Glucose_mM$signed_who) { - this.dbl_Glucose_mM$signed_who = dbl_Glucose_mM$signed_who; - } - - public String getDbl_HbA1C() { - return dbl_HbA1C; - } - - public void setDbl_HbA1C(String dbl_HbA1C) { - this.dbl_HbA1C = dbl_HbA1C; - } - - public String getDbl_HbA1C$signed_how() { - return dbl_HbA1C$signed_how; - } - - public void setDbl_HbA1C$signed_how(String dbl_HbA1C$signed_how) { - this.dbl_HbA1C$signed_how = dbl_HbA1C$signed_how; - } - - public String getDbl_HbA1C$signed_when() { - return dbl_HbA1C$signed_when; - } - - public void setDbl_HbA1C$signed_when(String dbl_HbA1C$signed_when) { - this.dbl_HbA1C$signed_when = dbl_HbA1C$signed_when; - } - - public String getDbl_HbA1C$signed_who() { - return dbl_HbA1C$signed_who; - } - - public void setDbl_HbA1C$signed_who(String dbl_HbA1C$signed_who) { - this.dbl_HbA1C$signed_who = dbl_HbA1C$signed_who; - } - - public String getDbl_HDL_mM() { - return dbl_HDL_mM; - } - - public void setDbl_HDL_mM(String dbl_HDL_mM) { - this.dbl_HDL_mM = dbl_HDL_mM; - } - - public String getDbl_HDL_mM$signed_how() { - return dbl_HDL_mM$signed_how; - } - - public void setDbl_HDL_mM$signed_how(String dbl_HDL_mM$signed_how) { - this.dbl_HDL_mM$signed_how = dbl_HDL_mM$signed_how; - } - - public String getDbl_HDL_mM$signed_when() { - return dbl_HDL_mM$signed_when; - } - - public void setDbl_HDL_mM$signed_when(String dbl_HDL_mM$signed_when) { - this.dbl_HDL_mM$signed_when = dbl_HDL_mM$signed_when; - } - - public String getDbl_HDL_mM$signed_who() { - return dbl_HDL_mM$signed_who; - } - - public void setDbl_HDL_mM$signed_who(String dbl_HDL_mM$signed_who) { - this.dbl_HDL_mM$signed_who = dbl_HDL_mM$signed_who; - } - - public String getDbl_LDL_mM() { - return dbl_LDL_mM; - } - - public void setDbl_LDL_mM(String dbl_LDL_mM) { - this.dbl_LDL_mM = dbl_LDL_mM; - } - - public String getDbl_LDL_mM$signed_how() { - return dbl_LDL_mM$signed_how; - } - - public void setDbl_LDL_mM$signed_how(String dbl_LDL_mM$signed_how) { - this.dbl_LDL_mM$signed_how = dbl_LDL_mM$signed_how; - } - - public String getDbl_LDL_mM$signed_when() { - return dbl_LDL_mM$signed_when; - } - - public void setDbl_LDL_mM$signed_when(String dbl_LDL_mM$signed_when) { - this.dbl_LDL_mM$signed_when = dbl_LDL_mM$signed_when; - } - - public String getDbl_LDL_mM$signed_who() { - return dbl_LDL_mM$signed_who; - } - - public void setDbl_LDL_mM$signed_who(String dbl_LDL_mM$signed_who) { - this.dbl_LDL_mM$signed_who = dbl_LDL_mM$signed_who; - } - - public String getDbl_TotalCholesterol_mM() { - return dbl_TotalCholesterol_mM; - } - - public void setDbl_TotalCholesterol_mM(String dbl_TotalCholesterol_mM) { - this.dbl_TotalCholesterol_mM = dbl_TotalCholesterol_mM; - } - - public String getDbl_TotalCholesterol_mM$signed_how() { - return dbl_TotalCholesterol_mM$signed_how; - } - - public void setDbl_TotalCholesterol_mM$signed_how(String dbl_TotalCholesterol_mM$signed_how) { - this.dbl_TotalCholesterol_mM$signed_how = dbl_TotalCholesterol_mM$signed_how; - } - - public String getDbl_TotalCholesterol_mM$signed_when() { - return dbl_TotalCholesterol_mM$signed_when; - } - - public void setDbl_TotalCholesterol_mM$signed_when(String dbl_TotalCholesterol_mM$signed_when) { - this.dbl_TotalCholesterol_mM$signed_when = dbl_TotalCholesterol_mM$signed_when; - } - - public String getDbl_TotalCholesterol_mM$signed_who() { - return dbl_TotalCholesterol_mM$signed_who; - } - - public void setDbl_TotalCholesterol_mM$signed_who(String dbl_TotalCholesterol_mM$signed_who) { - this.dbl_TotalCholesterol_mM$signed_who = dbl_TotalCholesterol_mM$signed_who; - } - - public String getDbl_Triglycerides_mM() { - return dbl_Triglycerides_mM; - } - - public void setDbl_Triglycerides_mM(String dbl_Triglycerides_mM) { - this.dbl_Triglycerides_mM = dbl_Triglycerides_mM; - } - - public String getDbl_Triglycerides_mM$signed_how() { - return dbl_Triglycerides_mM$signed_how; - } - - public void setDbl_Triglycerides_mM$signed_how(String dbl_Triglycerides_mM$signed_how) { - this.dbl_Triglycerides_mM$signed_how = dbl_Triglycerides_mM$signed_how; - } - - public String getDbl_Triglycerides_mM$signed_when() { - return dbl_Triglycerides_mM$signed_when; - } - - public void setDbl_Triglycerides_mM$signed_when(String dbl_Triglycerides_mM$signed_when) { - this.dbl_Triglycerides_mM$signed_when = dbl_Triglycerides_mM$signed_when; - } - - public String getDbl_Triglycerides_mM$signed_who() { - return dbl_Triglycerides_mM$signed_who; - } - - public void setDbl_Triglycerides_mM$signed_who(String dbl_Triglycerides_mM$signed_who) { - this.dbl_Triglycerides_mM$signed_who = dbl_Triglycerides_mM$signed_who; - } - - public String getDbl_UrineAlbumin_mgPerDay() { - return dbl_UrineAlbumin_mgPerDay; - } - - public void setDbl_UrineAlbumin_mgPerDay(String dbl_UrineAlbumin_mgPerDay) { - this.dbl_UrineAlbumin_mgPerDay = dbl_UrineAlbumin_mgPerDay; - } - - public String getDbl_UrineAlbumin_mgPerDay$signed_how() { - return dbl_UrineAlbumin_mgPerDay$signed_how; - } - - public void setDbl_UrineAlbumin_mgPerDay$signed_how(String dbl_UrineAlbumin_mgPerDay$signed_how) { - this.dbl_UrineAlbumin_mgPerDay$signed_how = dbl_UrineAlbumin_mgPerDay$signed_how; - } - - public String getDbl_UrineAlbumin_mgPerDay$signed_when() { - return dbl_UrineAlbumin_mgPerDay$signed_when; - } - - public void setDbl_UrineAlbumin_mgPerDay$signed_when(String dbl_UrineAlbumin_mgPerDay$signed_when) { - this.dbl_UrineAlbumin_mgPerDay$signed_when = dbl_UrineAlbumin_mgPerDay$signed_when; - } - - public String getDbl_UrineAlbumin_mgPerDay$signed_who() { - return dbl_UrineAlbumin_mgPerDay$signed_who; - } - - public void setDbl_UrineAlbumin_mgPerDay$signed_who(String dbl_UrineAlbumin_mgPerDay$signed_who) { - this.dbl_UrineAlbumin_mgPerDay$signed_who = dbl_UrineAlbumin_mgPerDay$signed_who; - } - - public String getDbl_UrineAlbuminCreatinineRatio_mgPermmol() { - return dbl_UrineAlbuminCreatinineRatio_mgPermmol; - } - - public void setDbl_UrineAlbuminCreatinineRatio_mgPermmol(String dbl_UrineAlbuminCreatinineRatio_mgPermmol) { - this.dbl_UrineAlbuminCreatinineRatio_mgPermmol = dbl_UrineAlbuminCreatinineRatio_mgPermmol; - } - - public String getDbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how() { - return dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how; - } - - public void setDbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how( - String dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how) { - this.dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how = dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_how; - } - - public String getDbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when() { - return dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when; - } - - public void setDbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when( - String dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when) { - this.dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when = dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_when; - } - - public String getDbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who() { - return dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who; - } - - public void setDbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who( - String dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who) { - this.dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who = dbl_UrineAlbuminCreatinineRatio_mgPermmol$signed_who; - } -} diff --git a/src/main/java/ca/openosp/openo/form/pageUtil/FrmForm2Action.java b/src/main/java/ca/openosp/openo/form/pageUtil/FrmForm2Action.java index 49c16ca54cc..a5ab2d4fc4a 100644 --- a/src/main/java/ca/openosp/openo/form/pageUtil/FrmForm2Action.java +++ b/src/main/java/ca/openosp/openo/form/pageUtil/FrmForm2Action.java @@ -29,6 +29,7 @@ import java.io.InputStream; import java.sql.SQLException; import java.util.*; +import java.util.regex.Pattern; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -38,8 +39,6 @@ import ca.openosp.openo.commn.model.Demographic; import org.apache.commons.validator.GenericValidator; import org.apache.logging.log4j.Logger; -import org.apache.xmlrpc.XmlRpcClient; -import org.apache.xmlrpc.XmlRpcException; import ca.openosp.openo.commn.dao.EncounterFormDao; import ca.openosp.openo.commn.dao.MeasurementDao; import ca.openosp.openo.commn.dao.MeasurementDaoImpl.SearchCriteria; @@ -50,10 +49,8 @@ import ca.openosp.openo.utility.MiscUtils; import ca.openosp.openo.utility.SpringUtils; -import ca.openosp.OscarProperties; import ca.openosp.openo.form.FrmRecordHelp; import ca.openosp.openo.form.data.FrmData; -import ca.openosp.openo.form.util.FrmToXMLUtil; import ca.openosp.openo.demographic.data.DemographicData; import ca.openosp.openo.encounter.oscarMeasurements.bean.EctMeasurementTypesBean; import ca.openosp.openo.encounter.oscarMeasurements.bean.EctValidationsBean; @@ -78,9 +75,11 @@ public class FrmForm2Action extends ActionSupport { private static Logger logger = MiscUtils.getLogger(); private SecurityInfoManager securityInfoManager = SpringUtils.getBean(SecurityInfoManager.class); + // Pattern to validate form names - only alphanumeric characters and underscores allowed + private static final Pattern VALID_FORM_NAME_PATTERN = Pattern.compile("^[a-zA-Z0-9_]+$"); + /** - * To create a new form which can write to measurement and osdsf, you need to - * ... + * To create a new form which can write to measurement, you need to ... * Create a xml file with all the measurement types named .xml (check * form/VTForm.xml as an example) * Create a new jsp file named .jsp (check form/formVT.jsp) @@ -112,6 +111,13 @@ public String execute() String formName = (String) this.getValue("formName"); logger.debug("formNme Top " + formName); + // Validate formName to prevent SQL injection and path traversal attacks + if (formName == null || !isValidFormName(formName)) { + logger.warn("Invalid form name attempted: {}", formName != null ? formName.replaceAll("[\\r\\n\\t]", "_") : "null"); + response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Invalid form name"); + return NONE; + } + String dateEntered = UtilDateUtilities.DateToString(new Date(), _dateFormat); // String visitCod = UtilDateUtilities.DateToString(new Date(),"yyyyMMdd"); String today = UtilDateUtilities.DateToString(new Date(), "yyyy-MM-dd"); @@ -268,12 +274,6 @@ public String execute() } logger.debug("current mem 9 " + currentMem()); - // Send to Mils thru xml-rpc - Properties nameProps = convertName(formName); - String xmlData = FrmToXMLUtil.convertToXml(loggedInInfo, measurementTypes, nameProps, props); - String decisionSupportURL = connect2OSDSF(xmlData); - request.setAttribute("decisionSupportURL", decisionSupportURL); - logger.debug("current mem 9 " + currentMem()); } else { // return to the orignal form return "/form/SetupForm.do?formName=" + formName + "&formId=0"; @@ -390,53 +390,6 @@ private boolean write2MeasurementTable(String demographicNo, String providerNo, return newDataAdded; } - private String connect2OSDSF(String xmlResult) { - Vector data2OSDSF = new Vector(); - data2OSDSF.add("xml"); - data2OSDSF.add(xmlResult); - String osdsfRPCURL = OscarProperties.getInstance().getProperty("osdsfRPCURL", null); - if (osdsfRPCURL == null) { - return null; - } - // data2OSDSF.add("dummy"); - // send to osdsf thru XMLRPC - try { - XmlRpcClient xmlrpc = new XmlRpcClient(osdsfRPCURL); - String result = (String) xmlrpc.execute("vt.getAndSaveRlt", data2OSDSF); - logger.debug("Reverse result: " + result); - return result; - } catch (XmlRpcException e) { - logger.error("Error", e); - return null; - } catch (IOException e) { - logger.error("Error", e); - return null; - } - /* - * catch(MalformedURLException e){ - * logger.error("Error", e); - * } - */ - } - - private Properties convertName(String formName) { - Properties osdsf = new Properties(); - InputStream is = getClass().getResourceAsStream("/../../form/" + formName + "2Osdsf.properties"); - try { - osdsf.load(is); - } catch (Exception e) { - logger.debug("Error, file " + formName + ".properties not found."); - } - - try { - is.close(); - } catch (IOException e) { - logger.debug("IO error."); - logger.error("Error", e); - } - return osdsf; - } - private String parseCheckBoxValue(String inputValue, String validationName) { if (validationName.equalsIgnoreCase("Yes/No")) { @@ -472,4 +425,25 @@ public Object getValue(String key) { return values.get(key); } + /** + * Validates that a form name contains only safe characters to prevent path traversal attacks. + * Only allows alphanumeric characters and underscores. + * + * @param formName The form name to validate + * @return true if the form name is valid, false otherwise + */ + private boolean isValidFormName(String formName) { + if (formName == null || formName.isEmpty()) { + return false; + } + + // Check for path traversal attempts + if (formName.contains("..") || formName.contains("/") || formName.contains("\\")) { + return false; + } + + // Only allow alphanumeric characters and underscores + return VALID_FORM_NAME_PATTERN.matcher(formName).matches(); + } + } diff --git a/src/main/java/ca/openosp/openo/form/pageUtil/FrmSetupForm2Action.java b/src/main/java/ca/openosp/openo/form/pageUtil/FrmSetupForm2Action.java index 41af0c16249..501f431c9f3 100644 --- a/src/main/java/ca/openosp/openo/form/pageUtil/FrmSetupForm2Action.java +++ b/src/main/java/ca/openosp/openo/form/pageUtil/FrmSetupForm2Action.java @@ -27,7 +27,6 @@ import java.io.IOException; import java.io.InputStream; -import java.lang.reflect.Method; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -41,22 +40,17 @@ import javax.servlet.http.HttpSession; import ca.openosp.Misc; -import org.apache.commons.text.StringEscapeUtils; -import org.apache.xmlrpc.XmlRpcClient; -import org.apache.xmlrpc.XmlRpcException; +import ca.openosp.openo.commn.dao.BillingDao; import ca.openosp.openo.commn.dao.MeasurementDao; import ca.openosp.openo.commn.model.Allergy; +import ca.openosp.openo.commn.model.Billing; import ca.openosp.openo.commn.model.Measurement; import ca.openosp.openo.managers.SecurityInfoManager; import ca.openosp.openo.utility.DbConnectionFilter; import ca.openosp.openo.utility.LoggedInInfo; import ca.openosp.openo.utility.MiscUtils; import ca.openosp.openo.utility.SpringUtils; - -import ca.openosp.OscarProperties; -import ca.openosp.openo.form.data.FrmVTData; -import ca.openosp.openo.form.util.FrmToXMLUtil; -import ca.openosp.openo.form.util.FrmXml2VTData; +import ca.openosp.openo.util.ConversionUtils; import ca.openosp.openo.db.DBHandler; import ca.openosp.openo.encounter.data.EctEChartBean; import ca.openosp.openo.encounter.oscarMeasurements.bean.EctMeasurementTypesBean; @@ -93,7 +87,7 @@ public String execute() throws Exception { } /** - * To create a new form which can write to measurement and osdsf, you need to ... + * To create a new form which can write to measurement, you need to ... * Create a xml file with all the measurement types named .xml (check form/VTForm.xml as an example) * Create a new jsp file named .jsp (check form/formVT.jsp) * Create a new table named form which include the name of all the input elements in the .jsp @@ -125,7 +119,7 @@ public String execute() throws Exception { // Validate formName to prevent path traversal attacks if (formName == null || !isValidFormName(formName)) { - MiscUtils.getLogger().warn("Invalid form name attempted: " + formName); + MiscUtils.getLogger().warn("Invalid form name attempted: {}", formName != null ? formName.replaceAll("[\\r\\n\\t]", "_") : "null"); response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Invalid form name"); return NONE; } @@ -161,27 +155,6 @@ public String execute() throws Exception { Vector measurementTypes = EctFindMeasurementTypeUtil.checkMeasurmentTypes(is, formName); EctMeasurementTypesBean mt; - //Get URL from Miles - Properties props = new Properties(); - Properties nameProps = new Properties(); - props.setProperty("demographic_no", demo); - props.setProperty("provider_no", providerNo); - //String xmlData = FrmToXMLUtil.convertToXml(measurementTypes, nameProps, props); - String decisionSupportURL = getPatientRlt(demo); - MiscUtils.getLogger().debug("decisionSupportURL" + decisionSupportURL); - request.setAttribute("decisionSupportURL", StringEscapeUtils.escapeHtml4(decisionSupportURL)); - - //Get the most updated data from Miles" - String xmlStr = getMostRecentRecord(demo); - nameProps = convertName(formName); - FrmXml2VTData xml2VTData = new FrmXml2VTData(); - Class vtDataC = null; - FrmVTData vtData = null; - if (xmlStr != null) { - vtData = xml2VTData.getObjectFromXmlStr(xmlStr); - vtDataC = FrmVTData.class; - } - ResultSet rs; for (int i = 0; i < measurementTypes.size(); i++) { @@ -202,57 +175,11 @@ public String execute() throws Exception { request.setAttribute(mt.getType() + "Date", currentRec.getProperty(mt.getType() + "Date", "")); request.setAttribute(mt.getType() + "Comments", currentRec.getProperty(mt.getType() + "Comments", "")); } else { - //prefill data from Miles if its dataentered date is > than the one in measurements - if (mt.getCanPrefill()) { - String value = ""; - String date = today; - - String valueMethodCall = (String) nameProps.get(mt.getType() + "Value"); - String dateMethodCall = (String) nameProps.get(mt.getType() + "Date"); - - if (vtData != null && vtDataC != null && valueMethodCall != null) { - Method vtGetMethods = vtDataC.getMethod("get" + valueMethodCall, new Class[]{}); - value = (String) vtGetMethods.invoke(vtData, new Object[]{}); - - if (value != null) { - vtGetMethods = vtDataC.getMethod("get" + valueMethodCall + "$signed_when", new Class[]{}); - String dMiles = (String) vtGetMethods.invoke(vtData, new Object[]{}); - date = dMiles; - - if (dateMethodCall != null) { - vtGetMethods = vtDataC.getMethod("get" + dateMethodCall, new Class[]{}); - date = (String) vtGetMethods.invoke(vtData, new Object[]{}); - date = date.equalsIgnoreCase("") ? "0001-01-01" : date; - - String dObsMeas = mt.getLastDateObserved() == null ? "0001-01-01" : mt.getLastDateObserved(); - MiscUtils.getLogger().debug(mt.getType() + " Miles: " + date + " Measurements: " + dObsMeas); - Date milesDate = UtilDateUtilities.StringToDate(date, _dateFormat); - Date obsMeasDate = UtilDateUtilities.StringToDate(dObsMeas, _dateFormat); - - if (mt.getLastData() != null) { - if (obsMeasDate.compareTo(milesDate) >= 0) { - String dMeas = mt.getLastDateEntered() == null ? "0001-01-01" : mt.getLastDateEntered(); - - Date dateMiles = UtilDateUtilities.StringToDate(dMiles, _dateFormat); - Date dateMeas = UtilDateUtilities.StringToDate(dMeas, _dateFormat); - - if (dateMeas.compareTo(dateMiles) > 0) { - value = mt.getLastData(); - date = dObsMeas; - } - } - } - } - } - } - this.setValue(mt.getType() + "Value", value); - this.setValue(mt.getType() + "Date", date); - request.setAttribute(mt.getType() + "Comments", ""); - } else { - this.setValue(mt.getType() + "Date", today); - request.setAttribute(mt.getType() + "Date", today); - request.setAttribute(mt.getType() + "Comments", ""); - } + // Set default values for new form entries + this.setValue(mt.getType() + "Value", ""); + this.setValue(mt.getType() + "Date", today); + request.setAttribute(mt.getType() + "Date", today); + request.setAttribute(mt.getType() + "Comments", ""); } } @@ -305,8 +232,28 @@ private List getDrugAllegyList(LoggedInInfo loggedInInfo, String demographicNo) return allergyLst; } + /** + * Retrieves the most recent flu shot billing date for a patient. + * Searches for billings with codes G590A (influenza vaccine) or G591A. + * + * @param demoNo the demographic number as a String + * @return the billing date formatted as a String if found, null otherwise + */ private String getFluShotBillingDate(String demoNo) { - return FrmToXMLUtil.getFluShotBillingDate(demoNo); + try { + BillingDao dao = SpringUtils.getBean(BillingDao.class); + List billings = dao.findBillings(ConversionUtils.fromIntString(demoNo), + Arrays.asList(new String[]{"G590A", "G591A"})); + if (billings.isEmpty()) { + return null; + } + Object[] container = billings.get(0); + Billing billing = (Billing) container[0]; + return ConversionUtils.toDateString(billing.getBillingDate()); + } catch (Exception e) { + MiscUtils.getLogger().error("Error retrieving flu shot billing date for demographic " + demoNo, e); + return null; + } } private Properties getFormRecord(String formName, String formId, String demographicNo) { @@ -346,87 +293,6 @@ private Properties getFormRecord(String formName, String formId, String demograp return props; } - private String getPatientRlt(String demographicNo) { - Vector data2OSDSF = new Vector(); - data2OSDSF.add("patientCod"); - data2OSDSF.add(demographicNo); - String osdsfRPCURL = OscarProperties.getInstance().getProperty("osdsfRPCURL", null); - MiscUtils.getLogger().debug("osdsfRPCURL getPatientRlt(): " + osdsfRPCURL); - if (osdsfRPCURL == null) { - return null; - } - //send to osdsf thru XMLRPC - try { - XmlRpcClient xmlrpc = new XmlRpcClient(osdsfRPCURL); - String result = (String) xmlrpc.execute("vt.getAndSaveRlt", data2OSDSF); - MiscUtils.getLogger().debug("Reverse result: " + result); - return result; - } catch (XmlRpcException e) { - MiscUtils.getLogger().error("Error", e); - return null; - } catch (IOException e) { - MiscUtils.getLogger().error("Error", e); - return null; - } catch (Exception e) { - MiscUtils.getLogger().error("Error", e); - return null; - } - } - - private String getMostRecentRecord(String demographicNo) { - Vector ret = new Vector(); - ret.addElement("patientCod"); - ret.addElement(demographicNo); - - String osdsfRPCURL = OscarProperties.getInstance().getProperty("osdsfRPCURL", null); - MiscUtils.getLogger().debug("osdsfRPCURL getMostRecentRecord(): " + osdsfRPCURL); - if (osdsfRPCURL == null) { - return null; - } - //send to osdsf thru XMLRPC - try { - XmlRpcClient xmlrpc = new XmlRpcClient(osdsfRPCURL); - String result = (String) xmlrpc.execute("vt.getMostRecentRecord", ret); - MiscUtils.getLogger().debug("Reverse result: " + result); - return result; - } catch (XmlRpcException e) { - MiscUtils.getLogger().error("Error", e); - return null; - } catch (IOException e) { - MiscUtils.getLogger().error("Error", e); - return null; - } - } - - private Properties convertName(String formName) { - Properties osdsf = new Properties(); - - // Validate formName before using it in file path - if (!isValidFormName(formName)) { - MiscUtils.getLogger().warn("Invalid form name in convertName: " + formName); - return osdsf; - } - - InputStream is = getClass().getResourceAsStream("/../../form/" + formName + "FromOsdsf.properties"); - try { - if (is != null) { - osdsf.load(is); - } - } catch (Exception e) { - MiscUtils.getLogger().debug("Error, file " + formName + ".properties not found."); - } finally { - if (is != null) { - try { - is.close(); - } catch (IOException e) { - MiscUtils.getLogger().debug("IO error."); - MiscUtils.getLogger().error("Error", e); - } - } - } - return osdsf; - } - private void addLastData(EctMeasurementTypesBean mt, String demo) { MeasurementDao dao = SpringUtils.getBean(MeasurementDao.class); List measurements = dao.findByIdTypeAndInstruction(Integer.parseInt(demo), mt.getType(), mt.getMeasuringInstrc()); diff --git a/src/main/java/ca/openosp/openo/form/pharmaForms/formBPMH/business/BpmhForm2Handler.java b/src/main/java/ca/openosp/openo/form/pharmaForms/formBPMH/business/BpmhForm2Handler.java index 0dd4f92beb8..bbb2ffb1f4d 100644 --- a/src/main/java/ca/openosp/openo/form/pharmaForms/formBPMH/business/BpmhForm2Handler.java +++ b/src/main/java/ca/openosp/openo/form/pharmaForms/formBPMH/business/BpmhForm2Handler.java @@ -27,7 +27,7 @@ import ca.openosp.openo.commn.dao.*; import ca.openosp.openo.commn.model.*; import ca.openosp.openo.utility.MiscUtils; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.Logger; import ca.openosp.openo.PMmodule.dao.ProviderDao; @@ -39,7 +39,6 @@ import ca.openosp.openo.form.pharmaForms.formBPMH.util.SortDrugList; import ca.openosp.openo.prescript.data.RxDrugData; -import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -485,10 +484,8 @@ public void setFormBeanDrugList(List bpmhDrugBeans) { } try { - BeanUtils.copyProperties(bpmhDrug, drug); - } catch (IllegalAccessException e) { - logger.fatal("Failed to copy bean properties", e); - } catch (InvocationTargetException e) { + BeanUtils.copyProperties(drug, bpmhDrug); + } catch (Exception e) { logger.fatal("Failed to copy bean properties", e); } diff --git a/src/main/java/ca/openosp/openo/form/util/FrmToXMLUtil.java b/src/main/java/ca/openosp/openo/form/util/FrmToXMLUtil.java deleted file mode 100755 index 18ddeb695dc..00000000000 --- a/src/main/java/ca/openosp/openo/form/util/FrmToXMLUtil.java +++ /dev/null @@ -1,381 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ -package ca.openosp.openo.form.util; - -import java.lang.reflect.Method; -import java.text.DateFormat; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; -import java.util.List; -import java.util.Properties; -import java.util.Vector; - -import noNamespace.SitePatientVisitRecordsDocument; - -import org.apache.commons.validator.GenericValidator; -import org.apache.xmlbeans.XmlCalendar; -import org.apache.xmlbeans.XmlOptions; -import ca.openosp.openo.commn.dao.BillingDao; -import ca.openosp.openo.commn.model.Billing; -import ca.openosp.openo.utility.LoggedInInfo; -import ca.openosp.openo.utility.MiscUtils; -import ca.openosp.openo.utility.SpringUtils; - -import ca.openosp.openo.encounter.oscarMeasurements.bean.EctMeasurementTypesBean; -import ca.openosp.openo.providers.data.ProviderData; -import ca.openosp.openo.prescript.data.RxPatientData; -import ca.openosp.openo.prescript.data.RxPrescriptionData; -import ca.openosp.openo.util.ConversionUtils; -import ca.openosp.openo.util.UtilDateUtilities; - -/* - * This software was written for the - * Compete 3 Project - * Hamilton - * Ontario, Canada - */ - -/** - * @author Jay Gallagher - */ -public class FrmToXMLUtil { - - /** - * Creates a new instance of ToCDR - */ - public FrmToXMLUtil() { - } - - public static String convertToXml(LoggedInInfo loggedInInfo, Vector measurementTypes, Properties nameProps, Properties dataProps) { - - // TODO code application logic here - String _dateFormat = "yyyy-MM-dd hh:mm:ss"; - String dateEntered = UtilDateUtilities.DateToString(new Date(), _dateFormat); - ProviderData prData = new ProviderData(dataProps.getProperty("provider_no")); - String vType = "Other"; //Other - if (prData.getProvider_type().equalsIgnoreCase("doctor")) - vType = "FamilyMDVisit"; //FamilyMDVisit - else if (prData.getProvider_type().equalsIgnoreCase("nurse")) - vType = "NurseVisit"; //NurseVisit - - XmlOptions xmlOptions = new XmlOptions(); - xmlOptions.setSavePrettyPrint(); - xmlOptions.setSavePrettyPrintIndent(3); - String xmlStr = ""; - - SitePatientVisitRecordsDocument visitDocument = SitePatientVisitRecordsDocument.Factory.newInstance(); - SitePatientVisitRecordsDocument.SitePatientVisitRecords visitRecord = visitDocument.addNewSitePatientVisitRecords(); - SitePatientVisitRecordsDocument.SitePatientVisitRecords.SitePatientVisit visit = visitRecord.addNewSitePatientVisit(); - - visitRecord.setVersion(visitRecord.getVersion()); - - try { - String who = dataProps.getProperty("provider_no"); - String how = "EMR"; - String when = dateEntered; - - SitePatientVisitRecordsDocument.SitePatientVisitRecords.SitePatientVisit.SelVisitType visitType = visit.addNewSelVisitType(); - visitType.setValue(vType); - visitType.setSignedWhen(when); - visitType.setSignedHow(how); - visitType.setSignedWho(who); - - visit.setPatientCod(dataProps.getProperty("demographic_no")); - visit.setVisitCod(dataProps.getProperty("visitCod")); - - Class cls = visit.getClass(); - // Add dob - Method addNewMethod = cls.getMethod("addNewDatBirthDate", new Class[]{}); - Object obj = addNewMethod.invoke(visit, new Object[]{}); - String value = dataProps.getProperty("dob"); - value = translate(value, "DatBirthDate"); - setWhoWhatWhereWhen(obj, how, who, when, value); - //Add Surname - addNewMethod = cls.getMethod("addNewTxtSurname", new Class[]{}); - obj = addNewMethod.invoke(visit, new Object[]{}); - value = dataProps.getProperty("surname"); - value = translate(value, "TxtSurname"); - setWhoWhatWhereWhen(obj, how, who, when, value); - //Add givien Name - addNewMethod = cls.getMethod("addNewTxtGivenNames", new Class[]{}); - obj = addNewMethod.invoke(visit, new Object[]{}); - value = dataProps.getProperty("givenName"); - value = translate(value, "TxtGivenNames"); - setWhoWhatWhereWhen(obj, how, who, when, value); - //Add Gender - addNewMethod = cls.getMethod("addNewSelGender", new Class[]{}); - obj = addNewMethod.invoke(visit, new Object[]{}); - value = dataProps.getProperty("gender"); - value = translate(value, "SelGender"); - setWhoWhatWhereWhen(obj, how, who, when, value); - - ///FLU SHOT - if (getFluShotBillingDate(dataProps.getProperty("demographic_no")) != null) { - addNewMethod = cls.getMethod("addNewBFluShotDoneThisSeason", new Class[]{}); - obj = addNewMethod.invoke(visit, new Object[]{}); - setWhoWhatWhereWhen(obj, how, who, when, "true"); - } - - - EctMeasurementTypesBean mt; - for (int i = 0; i < measurementTypes.size(); i++) { - mt = (EctMeasurementTypesBean) measurementTypes.elementAt(i); - String itemName = mt.getType(); - String methodCall = (String) nameProps.get(itemName + "Value"); - MiscUtils.getLogger().debug("method " + methodCall); - - if (mt.getType().equalsIgnoreCase("BP") && !GenericValidator.isBlankOrNull(dataProps.getProperty("SBPValue"))) { - methodCall = (String) nameProps.get("SBPValue"); - if (methodCall != null) { - cls = visit.getClass(); - - addNewMethod = cls.getMethod("addNew" + methodCall, new Class[]{}); - - obj = addNewMethod.invoke(visit, new Object[]{}); - - value = dataProps.getProperty("SBPValue"); - - setWhoWhatWhereWhen(obj, how, who, when, value); - } - methodCall = (String) nameProps.get("DBPValue"); - if (methodCall != null) { - cls = visit.getClass(); - - addNewMethod = cls.getMethod("addNew" + methodCall, new Class[]{}); - - obj = addNewMethod.invoke(visit, new Object[]{}); - - value = dataProps.getProperty("DBPValue"); - - setWhoWhatWhereWhen(obj, how, who, when, value); - } - methodCall = (String) nameProps.get("BPDate"); - - if (methodCall != null) { - - cls = visit.getClass(); - - addNewMethod = cls.getMethod("addNew" + methodCall, new Class[]{}); - - obj = addNewMethod.invoke(visit, new Object[]{}); - - value = dataProps.getProperty(itemName + "Date"); - - setWhoWhatWhereWhen(obj, how, who, when, value); - } - - } else if (methodCall != null && !GenericValidator.isBlankOrNull(dataProps.getProperty(itemName + "Value"))) { - - cls = visit.getClass(); - - addNewMethod = cls.getMethod("addNew" + methodCall, new Class[]{}); - - obj = addNewMethod.invoke(visit, new Object[]{}); - - value = dataProps.getProperty(itemName + "Value"); - value = translate(value, methodCall); - MiscUtils.getLogger().debug(itemName + " who " + who + " how " + how + " when " + when + " value " + value); - setWhoWhatWhereWhen(obj, how, who, when, value); - - //String date = dataProps.getProperty(itemName+"Date"); - //setWhoWhatWhereWhen(obj,how,who,when,date); - - methodCall = (String) nameProps.get(itemName + "Date"); - - if (methodCall != null) { - - cls = visit.getClass(); - - addNewMethod = cls.getMethod("addNew" + methodCall, new Class[]{}); - - obj = addNewMethod.invoke(visit, new Object[]{}); - - value = dataProps.getProperty(itemName + "Date"); - - setWhoWhatWhereWhen(obj, how, who, when, value); - } - } - - } - - - //get drug list - RxPatientData.Patient p = RxPatientData.getPatient(loggedInInfo, Integer.parseInt(dataProps.getProperty("demographic_no") == null ? "0" : dataProps.getProperty("demographic_no"))); - RxPrescriptionData.Prescription[] prescribedDrugs = p.getPrescribedDrugsUnique(); - for (int i = 0; i < prescribedDrugs.length; i++) { - SitePatientVisitRecordsDocument.SitePatientVisitRecords.SitePatientVisit.SitePatientVisitDrug drug = visit.addNewSitePatientVisitDrug(); - String atccode = prescribedDrugs[i].getAtcCode().trim(); - if (atccode == null || atccode.equalsIgnoreCase("null") || atccode.equals("")) { - drug.setDrugCod("NAM_" + prescribedDrugs[i].getDrugName()); - } else { - drug.setDrugCod("ATC_" + prescribedDrugs[i].getAtcCode().trim()); - } - SitePatientVisitRecordsDocument.SitePatientVisitRecords.SitePatientVisit.SitePatientVisitDrug.TxtDrugName drugName = drug.addNewTxtDrugName(); - drugName.setSignedHow(how); - drugName.setSignedWho(who); - drugName.setSignedWhen(when); - drugName.setValue(prescribedDrugs[i].getDrugName()); - } - - - } catch (NoSuchMethodException e) { - MiscUtils.getLogger().error("Error", e); - } catch (IllegalAccessException e) { - MiscUtils.getLogger().error("Error", e); - } catch (Exception e) { - MiscUtils.getLogger().error("Error", e); - } - - xmlStr = xmlStr + visitDocument.xmlText(xmlOptions); - - MiscUtils.getLogger().debug("*********************************************************************************"); - MiscUtils.getLogger().debug("************************** XML GENERATED BY OSCAR *******************************"); - MiscUtils.getLogger().debug("*********************************************************************************"); - MiscUtils.getLogger().debug(xmlStr); - return xmlStr; - } - - - public static void setWhoWhatWhereWhen(Object obj, String how, String who, String when, String value) throws Exception { - Class cls = obj.getClass(); - Method setSignedHowMethod = cls.getMethod("setSignedHow", new Class[]{String.class}); - setSignedHowMethod.invoke(obj, new Object[]{how}); - - Method setSignedWhoMethod = cls.getMethod("setSignedWho", new Class[]{String.class}); - setSignedWhoMethod.invoke(obj, new Object[]{who}); - - Method setSignedWhenMethod = cls.getMethod("setSignedWhen", new Class[]{String.class}); - setSignedWhenMethod.invoke(obj, new Object[]{when}); - - setValueType(obj, cls, value); - - } - - public static int setValueType(Object obj, Class cls, String value) throws Exception { - int i = 0; - try { - Method setValueMethod = cls.getMethod("setValue", new Class[]{String.class}); - setValueMethod.invoke(obj, new Object[]{value}); - i = 1; - } catch (NoSuchMethodException noSuchMethod1) { - } - - try { - Method setValueMethod = cls.getMethod("setValue", new Class[]{int.class}); - if (value.equalsIgnoreCase("")) - value = "0"; - Integer integer = null; - try { - integer = Integer.valueOf(value); - } catch (NumberFormatException nfe) { - integer = Integer.valueOf("" + Math.round(Double.parseDouble(value))); - } - - setValueMethod.invoke(obj, new Object[]{integer}); - i = 2; - } catch (NoSuchMethodException noSuchMethod1) { - } - - try { - Method setValueMethod = cls.getMethod("setValue", new Class[]{double.class}); - if (value.equalsIgnoreCase("")) - value = "0"; - Double dbl = Double.valueOf(value); - setValueMethod.invoke(obj, new Object[]{dbl}); - i = 3; - } catch (NoSuchMethodException noSuchMethod1) { - } - - try { - Method setValueMethod = cls.getMethod("setValue", new Class[]{boolean.class}); - i = 4; - Boolean bool = Boolean.valueOf(value); - setValueMethod.invoke(obj, new Object[]{bool}); - } catch (NoSuchMethodException noSuchMethod2) { - } - - try { - Method setValueMethod = cls.getMethod("setValue", new Class[]{Calendar.class}); - i = 5; - if (value != null) { - //DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - //Date date = (Date)formatter.parse(value); - Calendar c = new XmlCalendar(value); - //c.setTime(date); - setValueMethod.invoke(obj, new Object[]{c}); - } - - //TODO need way to change String Date into a Calendar instance - } catch (NoSuchMethodException noSuchMethod3) { - } - - try { - Method setValueMethod = cls.getMethod("setValue", new Class[]{Date.class}); - i = 5; - if (value != null) { - DateFormat df = DateFormat.getDateInstance(); - Date date = df.parse(value); - setValueMethod.invoke(obj, new Object[]{date}); - } - - } catch (NoSuchMethodException noSuchMethod3) { - } - return i; - } - - private static String translate(String input, String xmlName) { - if (xmlName.startsWith("B")) { - if (input.equalsIgnoreCase("yes")) { - return "true"; - } else if (input.equalsIgnoreCase("no")) - return "false"; - } else if (xmlName.startsWith("Sel")) { - if (input.equalsIgnoreCase("yes")) { - return "Present"; - } else if (input.equalsIgnoreCase("no")) { - return "Absent"; - } else if (input.equalsIgnoreCase("F")) { - return "Female"; - } else if (input.equalsIgnoreCase("M")) { - return "Male"; - } - } - return input; - - } - - public static String getFluShotBillingDate(String demoNo) { - BillingDao dao = SpringUtils.getBean(BillingDao.class); - List billings = dao.findBillings(ConversionUtils.fromIntString(demoNo), Arrays.asList(new String[]{"G590A", "G591A"})); - if (billings.isEmpty()) - return null; - - Object[] container = billings.get(0); - Billing billing = (Billing) container[0]; - return ConversionUtils.toDateString(billing.getBillingDate()); - } - -} diff --git a/src/main/java/ca/openosp/openo/form/util/FrmXml2VTData.java b/src/main/java/ca/openosp/openo/form/util/FrmXml2VTData.java deleted file mode 100644 index 2434b043753..00000000000 --- a/src/main/java/ca/openosp/openo/form/util/FrmXml2VTData.java +++ /dev/null @@ -1,202 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ - - -/* - * Created on Nov 18, 2004 - */ -package ca.openosp.openo.form.util; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.Properties; - -import ca.openosp.openo.utility.MiscUtils; -import noNamespace.SitePatientVisitRecordsDocument; -import noNamespace.SitePatientVisitRecordsDocument.SitePatientVisitRecords; - -import org.apache.commons.text.WordUtils; -import org.apache.logging.log4j.Logger; - -import ca.openosp.openo.form.data.FrmVTData; - -/** - * @author yilee18 - */ -public class FrmXml2VTData { - private static final Logger _logger = MiscUtils.getLogger(); - - static String[] elementAttrName = new String[]{"value", "signed_when", "signed_who", "signed_how"}; - - // HashTable: - // "VTData":VTData; "VisitDrug":Vector-VisitDrug; "PatientContactInfo":PatientContactInfo - public FrmVTData getObjectFromXmlStr(String strXml) throws Exception { - - - FrmVTData vtData = new FrmVTData(); - - // Parse XML string. - SitePatientVisitRecordsDocument xmlDoc = SitePatientVisitRecordsDocument.Factory.parse(strXml); - - // Get object reference of root element SitePatientVisitRecords. - SitePatientVisitRecords visit = xmlDoc.getSitePatientVisitRecords(); - SitePatientVisitRecords.SitePatientVisit[] visitRec = visit.getSitePatientVisitArray(); - // Get version value - String version = visit.getVersion(); - - // Get output Objects - Class vtDataC = FrmVTData.class; - Field[] vtFields = vtDataC.getDeclaredFields(); - Method[] vtMethods = vtDataC.getMethods(); - - // Init - get properties object of Object attribute name - Properties propVtFieldName = initPropFieldName(vtFields); - - // Assume only one visit record in the xml file, use the first element of the array - // Set visitRecord attribute - /*vtData.setVersion(version); - vtData.setPatient_cod(visitRec[0].getPatientCod()); - vtData.setVisit_cod(visitRec[0].getVisitCod()); - vtData.setSite_cod(visitRec[0].getSiteCod()); - */ - // Map xml object methods to output object methods - Class xmlInfo = visitRec[0].getClass(); - Method[] xmlMethods = xmlInfo.getDeclaredMethods(); - - setObjectsProperty(xmlMethods, visitRec[0], vtData, vtDataC, propVtFieldName); - - return vtData; - } - - static private void setObjectsProperty(Method[] xmlMethods, Object rec, Object ret, Class objC, - Properties propPFieldName) { - for (int i = 0; i < xmlMethods.length; i++) { - String xmlMethodsName = xmlMethods[i].getName(); - // Only interested in method name startsWith get/is - // is qualified xml method, for element type, i.e. (value, signed_when, ...) - if (!isQualXmlMethod(xmlMethods[i], "(get|is).*")) - continue; - - // Get xml value - for (int k = 0; k < elementAttrName.length; k++) { - String tempXmlValue = getXmlMethodValue(xmlMethods[i], rec, ("get" + getStdMethodName(elementAttrName[k]))); - - if (tempXmlValue == null) - continue; - - // Set obj prop - String xmlTempMethod = (k == 0) ? xmlMethodsName : (xmlMethodsName + (getStdMethodName("$" - + elementAttrName[k]))); - if (_logger.isDebugEnabled()) { - //_logger.debug("setObjectsProperty() - : xmlTempMethod = " + xmlTempMethod); - //_logger.debug("setObjectsProperty() - : tempXmlValue = " + tempXmlValue); - } - - setObjectProperty(ret, objC, propPFieldName, xmlTempMethod, tempXmlValue); - } - } - } - - static private Properties initPropFieldName(Field[] fields) { - Properties ret = new Properties(); - for (int i = 0; i < fields.length; i++) { - String fieldName = fields[i].getName(); - String xmlFieldName = getStdMethodName(fieldName); - ret.setProperty(xmlFieldName, WordUtils.capitalize(fieldName)); - } - return ret; - } - - static private Object setObjectProperty(Object ret, Class objC, Properties propPFieldName, String xmlMethodsName, - String xmlValue) { - if (xmlMethodsName.length() > 3 && propPFieldName.containsKey(xmlMethodsName.substring(3))) { - try { - Class[] argClass = new Class[]{String.class}; - Object[] arguments = new Object[]{xmlValue}; - // Find the obj set method and set prop - Method tempPMethod = objC.getMethod("set" - + propPFieldName.getProperty(xmlMethodsName.substring(3), ""), argClass); - tempPMethod.invoke(ret, arguments); - - } catch (Exception e) { - // do nothing - } - } - return ret; - } - - static private String getXmlMethodValue(Method xmlMethod, Object rec, String methodName) { - String tempXmlValue = null; - try { - Class tempC = xmlMethod.getReturnType(); - Method tempXmlMethod = tempC.getMethod(methodName); - Object tempXmlObj = xmlMethod.invoke(rec); - - String tempXmlType = tempXmlMethod.getReturnType().getName(); - // Handle with types: txt_ ; b_ ; int_ ; dbl_ ; dat_ - if ("java.lang.String".equals(tempXmlType)) { - tempXmlValue = (String) tempXmlMethod.invoke(tempXmlObj); - } else if ("boolean".equals(tempXmlType)) { - tempXmlValue = "" + ((Boolean) tempXmlMethod.invoke(tempXmlObj)).booleanValue(); - } else if ("int".equals(tempXmlType)) { - tempXmlValue = "" + ((Integer) tempXmlMethod.invoke(tempXmlObj)).intValue(); - } else if ("double".equals(tempXmlType)) { - tempXmlValue = "" + ((Double) tempXmlMethod.invoke(tempXmlObj)).doubleValue(); - } else { - - tempXmlValue = "" + tempXmlMethod.invoke(tempXmlObj); - } - } catch (Exception e) { - // do nothing - } - return tempXmlValue; - } - - // if method return a xml itme class, return true - static private boolean isQualXmlMethod(Method xmlMethod, String reg) { - boolean ret = false; - if (xmlMethod.getName().matches(reg)) { - Class tempC = xmlMethod.getReturnType(); - // Only interested in Classes (not drug part) rather than primitive data type - if ("java.lang.String".equals(tempC.getName()) || "boolean".equals(tempC.getName()) - || "getSitePatientVisitDrugArray".equals(xmlMethod.getName())) - ret = false; - else - ret = true; - } - return ret; - } - - static public String getStdMethodName(String str) { - String ret = ""; - if (str != null) { - String[] temp = str.split("_"); - for (int i = 0; i < temp.length; i++) { - ret += WordUtils.capitalize(temp[i]); - } - } - return ret; - } -} diff --git a/src/main/java/ca/openosp/openo/inboxhub/display/ManageInboxhub2Action.java b/src/main/java/ca/openosp/openo/inboxhub/display/ManageInboxhub2Action.java index ecdae52b64a..382d938f797 100644 --- a/src/main/java/ca/openosp/openo/inboxhub/display/ManageInboxhub2Action.java +++ b/src/main/java/ca/openosp/openo/inboxhub/display/ManageInboxhub2Action.java @@ -36,6 +36,36 @@ import ca.openosp.openo.lab.ca.on.LabResultData; import ca.openosp.openo.mds.data.CategoryData; +/** + * Struts2 action for managing the Inbox Hub interface in the OpenO EMR system. + *

    + * The Inbox Hub provides healthcare providers with a centralized interface to view and manage + * incoming medical results including laboratory reports, clinical documents, and Hospital Report + * Manager (HRM) data. This action handles three primary display modes: form view (summary counts), + * list view (paginated results), and detailed view (expanded results display). + *

    + *

    + * This action follows the 2Action naming convention, indicating it is part of the Struts 1.x to + * Struts 2.x migration pattern. It uses method-based routing where the "method" request parameter + * determines which display mode to invoke. + *

    + *

    + * Security: All methods enforce read-level access to the "_lab" security object + * using {@link SecurityInfoManager}. Unauthorized access returns the "unauthorized" result. + *

    + *

    + * Healthcare Context: The inbox hub is critical for clinical workflow, allowing + * providers to review lab results, diagnostic reports, and hospital communications. Results can + * be filtered by provider, patient demographics, and result type (lab/doc/HRM). The action supports + * both claimed results (assigned to specific providers) and unclaimed results (available to all). + *

    + * + * @see ca.openosp.openo.inboxhub.inboxdata.LabDataController + * @see ca.openosp.openo.inboxhub.query.InboxhubQuery + * @see ca.openosp.openo.lab.ca.on.LabResultData + * @see ca.openosp.openo.managers.SecurityInfoManager + * @since 2026-01-24 + */ public class ManageInboxhub2Action extends ActionSupport { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); @@ -46,7 +76,23 @@ public class ManageInboxhub2Action extends ActionSupport { private static final Logger logger = MiscUtils.getLogger(); /** - * Struts action execute function that is called by default + * Main Struts2 action execution method with method-based routing. + *

    + * Routes requests to the appropriate display method based on the "method" request parameter. + * Supported methods include: + *

    + *
      + *
    • displayInboxForm - Shows summary view with result counts
    • + *
    • displayInboxList - Shows paginated list of results
    • + *
    • displayInboxView - Shows detailed view of results
    • + *
    + *

    + * If no method parameter is provided or the method is unrecognized, defaults to + * {@link #displayInboxForm()}. + *

    + * + * @return String Struts2 result name ("success", "displayList", "displayView", or "unauthorized") + * @throws Exception if an error occurs during method execution */ public String execute() throws Exception { String method = request.getParameter("method"); @@ -61,8 +107,28 @@ public String execute() throws Exception { } /** - * Displays the inbox form, this is the first call when you open the inbox hub jsp - * @return Struts result name + * Displays the inbox form summary view with aggregate result counts. + *

    + * This is typically the initial view when opening the inbox hub interface. It retrieves + * and displays summary statistics for all result types (documents, labs, HRM) based on + * the current query filters. The method supports filtering by unclaimed results when the + * "unclaimed" request parameter is set. + *

    + *

    + * The method performs the following operations: + *

    + *
      + *
    1. Validates user has read access to lab results via SecurityInfoManager
    2. + *
    3. Initializes query with unclaimed filter if requested
    4. + *
    5. Sanitizes query parameters based on user context and permissions
    6. + *
    7. Retrieves category data and aggregate counts for each result type
    8. + *
    9. Sets request attributes for JSP rendering
    10. + *
    + *

    + * Security: Requires "_lab" read privilege. Returns "unauthorized" if access denied. + *

    + * + * @return String "success" if authorized and data retrieved successfully, "unauthorized" if access denied */ public String displayInboxForm() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -88,9 +154,18 @@ public String displayInboxForm() { } /** - * Displays the inbox list if the page is set to that option - * fetches all of the lab data to show in the inbox hub list jsp - * @return Struts result name + * Displays the inbox results in a paginated list format. + *

    + * This method retrieves and displays laboratory results, documents, and HRM data in a + * list view with pagination support. It delegates to {@link #fetchLabData(HttpServletRequest)} + * to retrieve the actual result data based on current query parameters including page number, + * page size, demographic filters, and type filters. + *

    + *

    + * Security: Requires "_lab" read privilege. Returns "unauthorized" if access denied. + *

    + * + * @return String "displayList" if authorized and data retrieved successfully, "unauthorized" if access denied */ public String displayInboxList() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -103,9 +178,18 @@ public String displayInboxList() { } /** - * Displays the inbox view if the page is set to that option - * fetches all of the lab data to show in the inbox hub view jsp - * @return Struts result name + * Displays the inbox results in a detailed view format. + *

    + * This method retrieves and displays laboratory results, documents, and HRM data in a + * more detailed view with enhanced result information. Like {@link #displayInboxList()}, + * it delegates to {@link #fetchLabData(HttpServletRequest)} to retrieve result data based + * on current query parameters. + *

    + *

    + * Security: Requires "_lab" read privilege. Returns "unauthorized" if access denied. + *

    + * + * @return String "displayView" if authorized and data retrieved successfully, "unauthorized" if access denied */ public String displayInboxView() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -118,8 +202,35 @@ public String displayInboxView() { } /** - * Fetches all of the lab data that will be shown onto the inbox hub jsp - * @param request + * Retrieves laboratory and medical result data for display in the inbox hub interface. + *

    + * This private helper method performs the following operations: + *

    + *
      + *
    1. Extracts and validates pagination parameters (page, pageSize) from the request
    2. + *
    3. Extracts filter parameters (demographicFilter, typeFilter) from the request
    4. + *
    5. Sanitizes the inbox query based on user context and filters
    6. + *
    7. Retrieves lab result data matching the query criteria
    8. + *
    9. Generates navigation links for each lab result
    10. + *
    11. Sets request attributes for JSP rendering
    12. + *
    + *

    + * Error Handling: Invalid pagination parameters default to page 1 and page size 20. + * NumberFormatException errors are logged but do not halt execution. + *

    + *

    + * Request Attributes Set: + *

    + *
      + *
    • page - String current page number
    • + *
    • pageSize - String number of results per page
    • + *
    • labDocs - ArrayList<LabResultData> the result data
    • + *
    • labLinks - ArrayList<String> navigation links for results (if results exist)
    • + *
    • hasMoreData - Boolean whether more results are available
    • + *
    • searchProviderNo - String provider number from query
    • + *
    + * + * @param request HttpServletRequest the servlet request containing query parameters and session data */ private void fetchLabData(HttpServletRequest request) { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); @@ -166,10 +277,28 @@ private void fetchLabData(HttpServletRequest request) { request.setAttribute("searchProviderNo", query.getSearchProviderNo()); } + /** + * Retrieves the current inbox hub query object. + *

    + * This getter is used by the Struts2 framework for accessing the query object, + * which contains all filter and pagination settings for the inbox hub. + *

    + * + * @return InboxhubQuery the current query object containing filter and pagination settings + */ public InboxhubQuery getQuery() { return query; } + /** + * Sets the inbox hub query object. + *

    + * This setter is used by the Struts2 framework for dependency injection and + * parameter binding. It allows external configuration of the query object. + *

    + * + * @param query InboxhubQuery the query object to set with filter and pagination settings + */ public void setQuery(InboxhubQuery query) { this.query = query; } diff --git a/src/main/java/ca/openosp/openo/inboxhub/inboxdata/LabDataController.java b/src/main/java/ca/openosp/openo/inboxhub/inboxdata/LabDataController.java index 125bc8d30f3..b08312f6e9c 100644 --- a/src/main/java/ca/openosp/openo/inboxhub/inboxdata/LabDataController.java +++ b/src/main/java/ca/openosp/openo/inboxhub/inboxdata/LabDataController.java @@ -51,17 +51,76 @@ import java.util.List; import java.util.Objects; +/** + * Controller for managing laboratory and medical document data in the InboxHub system. + * + *

    This controller provides comprehensive functionality for retrieving, filtering, and processing + * laboratory results, medical documents, and Hospital Report Manager (HRM) records. It serves as the + * primary data access layer for the InboxHub feature, handling various types of medical data including:

    + * + *
      + *
    • Laboratory results (CML, HL7 TEXT, MDS formats)
    • + *
    • Medical documents
    • + *
    • Hospital Report Manager (HRM) documents
    • + *
    • Reference and consultation documents (REF_I12, ORU_R01)
    • + *
    + * + *

    The controller supports advanced filtering capabilities including:

    + *
      + *
    • Provider-based filtering (specific provider, all providers, or unclaimed)
    • + *
    • Patient-based filtering (demographic matching, name, health number)
    • + *
    • Status filtering (new, acknowledged, filed)
    • + *
    • Date range filtering
    • + *
    • Abnormal results filtering
    • + *
    • Document type filtering (lab, doc, HRM, or all)
    • + *
    + * + *

    Key healthcare features include:

    + *
      + *
    • Duplicate lab version filtering based on accession numbers and date proximity
    • + *
    • URL generation for different lab display types with proper encoding
    • + *
    • Category-based document counting for inbox organization
    • + *
    • Support for matched and unmatched patient records
    • + *
    + * + * @see InboxhubQuery + * @see LabResultData + * @see CategoryData + * @see CommonLabResultData + * @see HRMResultsData + * @since 2026-01-24 + */ public class LabDataController { private boolean providerSearch; private boolean patientSearch; + /** + * Constructs a new LabDataController with default search settings. + * + *

    Initializes the controller with both provider and patient search enabled by default. + * These flags control whether provider-specific and patient-specific filtering is applied + * when retrieving laboratory and document data.

    + */ public LabDataController() { providerSearch = true; patientSearch = true; } - //Converts given string date to date object. Returns null if not in yyyy-MM-dd format or blank. + /** + * Converts a string date representation to a Date object. + * + *

    Parses a date string in ISO 8601 format (yyyy-MM-dd) and converts it to a java.util.Date + * object. The conversion uses the system default time zone and sets the time to the start of + * day (00:00:00). If the input string is empty or not in the expected format, returns null.

    + * + *

    This method is used throughout the InboxHub system to convert user-provided date strings + * from query parameters into Date objects for database queries and date range filtering.

    + * + * @param stringDate String the date string to convert in yyyy-MM-dd format + * @return Date the converted Date object set to start of day in system default timezone, + * or null if the input is empty or cannot be parsed + */ public Date convertDate(String stringDate) { if (!stringDate.isEmpty()) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateFormatUtils.ISO_DATE_FORMAT.getPattern()); @@ -77,7 +136,39 @@ public Date convertDate(String stringDate) { return null; } - //Grabs lab link for specific inbox item. + /** + * Generates display URLs for laboratory results and medical documents. + * + *

    Creates properly formatted and URL-encoded links for viewing different types of laboratory + * results and medical documents in the EMR system. The method determines the appropriate display + * JSP or servlet based on the result type and constructs URLs with all necessary query parameters.

    + * + *

    Supported result types and their display destinations:

    + *
      + *
    • MDS: Routed to /SegmentDisplay.jsp for Medical Data Systems results
    • + *
    • CML: Routed to /lab/CA/ON/CMLDisplay.jsp for Ontario CML lab results
    • + *
    • HL7 TEXT: Routes based on discipline/category: + *
        + *
      • REF_I12: Consultation/referral display via /oscarEncounter/ViewRequest.do
      • + *
      • ORU_R01: Observation results via /lab/CA/ALL/viewOruR01.jsp
      • + *
      • Other: Generic HL7 display via /lab/CA/ALL/labDisplay.jsp
      • + *
      + *
    • + *
    • Document: Routed to /documentManager/showDocument.jsp for medical documents
    • + *
    • HRM: Hospital Report Manager display via /hospitalReportManager/Display.do with duplicate handling
    • + *
    • Other: Default BC lab display via /lab/CA/BC/labDisplay.jsp
    • + *
    + * + *

    All URLs include properly encoded parameters for segment ID, provider numbers, result status, + * patient demographics, and search criteria to maintain context when viewing results.

    + * + * @param results ArrayList<LabResultData> the list of laboratory results to generate links for + * @param query InboxhubQuery the query object containing search parameters and filters + * @param contextPath String the web application context path for URL construction + * @param providerNo String the provider number of the currently logged-in user + * @return ArrayList<String> list of fully constructed and encoded URLs for each lab result, + * in the same order as the input results + */ public ArrayList getLabLink(ArrayList results, InboxhubQuery query, String contextPath, String providerNo) { ArrayList labLinks = new ArrayList(); for (int i = 0; i < results.size(); i++) { @@ -137,7 +228,35 @@ else if(labResult.isHRM()) { return labLinks; } - //Gets inbox CategoryData for given query. CategoryData includes document counts for all document types & patient lists. + /** + * Retrieves category data and document counts for the InboxHub based on query parameters. + * + *

    Creates and populates a CategoryData object containing comprehensive statistics about + * laboratory results, medical documents, and HRM records matching the query criteria. The + * category data includes document counts by type, patient lists, and filtering metadata.

    + * + *

    The method analyzes the query to determine search modes:

    + *
      + *
    • Provider search disabled: When searchProviderNo is "-1" (all providers)
    • + *
    • Patient search disabled: When no demographic number, patient name, or health number provided
    • + *
    + * + *

    The CategoryData object provides counts for:

    + *
      + *
    • Total documents (matched and unmatched)
    • + *
    • Total laboratory results (matched and unmatched)
    • + *
    • Total HRM documents (matched and unmatched)
    • + *
    • Patient lists associated with the results
    • + *
    + * + *

    These counts are essential for displaying inbox statistics, pagination controls, + * and category filters in the InboxHub user interface.

    + * + * @param query InboxhubQuery the query object containing search filters including patient demographics, + * provider number, status filter, abnormal filter, and date range + * @return CategoryData the populated category data object containing document counts and patient lists, + * with counts set to zero if SQL errors occur during population + */ public CategoryData getCategoryData(InboxhubQuery query) { if (Objects.equals(query.getSearchProviderNo(), "-1")) { providerSearch = false; @@ -155,7 +274,45 @@ public CategoryData getCategoryData(InboxhubQuery query) { return categoryData; } - //Returns lab data based on the query. If lab, doc, and hrm flags are not set in the query returns all data from all data types. + /** + * Retrieves laboratory results, medical documents, and HRM data based on query parameters. + * + *

    This is the primary data retrieval method for the InboxHub, aggregating results from multiple + * data sources (laboratory results, medical documents, Hospital Report Manager records) into a + * unified list. The method applies various filters including provider, patient demographics, + * status, date range, and abnormal results flags.

    + * + *

    Data source selection logic:

    + *
      + *
    • If no type flags are set (lab, doc, hrm all false), retrieves data from all sources
    • + *
    • If specific type flags are set, retrieves only the selected types
    • + *
    • Mixed mode: When both lab and doc flags are set, results are interleaved
    • + *
    + * + *

    Special processing for laboratory results:

    + *
      + *
    • Uses increased page size (100) to reduce older lab versions in results
    • + *
    • Applies duplicate lab version filtering based on accession numbers and date proximity
    • + *
    • Filters out labs within 4 months of each other with matching accession numbers
    • + *
    + * + *

    HRM-specific behavior:

    + *
      + *
    • HRM results are excluded when abnormal filter is explicitly enabled
    • + *
    • Provider filtering for HRM uses empty string for "ANY_PROVIDER" mode
    • + *
    + * + *

    The method uses pagination (configurable page size, default handling) and supports + * both matched and unmatched patient records. All date conversions use the convertDate + * method for consistent ISO 8601 formatting.

    + * + * @param loggedInInfo LoggedInInfo the logged-in user session information for security context + * @param query InboxhubQuery the query object containing all search parameters, filters, pagination + * settings, and type flags (lab, doc, hrm) + * @return ArrayList<LabResultData> unified list of laboratory results, documents, and HRM records + * matching the query criteria, with duplicate lab versions filtered and results from + * selected data sources combined + */ public ArrayList getLabData(LoggedInInfo loggedInInfo, InboxhubQuery query) { Integer page = query.getPage() - 1; Integer pageSize = query.getPageSize(); @@ -192,6 +349,48 @@ public ArrayList getLabData(LoggedInInfo loggedInInfo, InboxhubQu return labDocs; } + /** + * Sanitizes and validates InboxHub query parameters from form submission. + * + *

    This method processes and normalizes query parameters received from the InboxHub form, + * applying business logic and security rules to ensure valid and consistent search criteria. + * It handles provider filtering, patient matching, and document type selection based on + * user input and session context.

    + * + *

    Provider filtering logic:

    + *
      + *
    • ANY_PROVIDER: Sets searchProviderNo to "-1" for all providers
    • + *
    • NO_PROVIDER: Sets searchProviderNo to "0" for unclaimed results
    • + *
    • Invalid values ("0" or "-1"): Resets to logged-in provider for security
    • + *
    • Valid provider number: Preserved as-is
    • + *
    + * + *

    Patient filtering logic:

    + *
      + *
    • Unmatched flag set: Forces demographicNo to "0" and clears all patient search fields
    • + *
    • demographicFilter provided: Overrides query's demographicNo with filter value
    • + *
    + * + *

    Type filtering logic (when typeFilterValue provided):

    + *
      + *
    • DOC: Sets doc=true, lab=false, hrm=false
    • + *
    • LAB: Sets lab=true, doc=false, hrm=false
    • + *
    • HRM: Sets hrm=true, doc=false, lab=false
    • + *
    • Other/null: No changes to type flags
    • + *
    + * + *

    This method ensures that queries are properly scoped to the logged-in provider's + * permissions and that patient privacy is maintained by preventing unauthorized access + * to all-provider or unclaimed results without proper authorization.

    + * + * @param loggedInInfo LoggedInInfo the logged-in user session containing provider number + * and session attributes for security context + * @param query InboxhubQuery the query object to sanitize and validate, modified in-place + * @param demographicFilter String optional demographic number to override query's demographic + * filter, or null to use query's existing value + * @param typeFilterValue String optional document type filter ("doc", "lab", "hrm"), + * or null to preserve existing type flags + */ public void sanitizeInboxFormQuery(LoggedInInfo loggedInInfo, InboxhubQuery query, String demographicFilter, String typeFilterValue) { String loggedInProviderNo = (String) loggedInInfo.getSession().getAttribute("user"); Provider loggedInProvider = ProviderData.getProvider(loggedInProviderNo); @@ -233,6 +432,28 @@ else if (Objects.equals(query.getSearchProviderNo(), "0") || Objects.equals(quer } } + /** + * Configures the query to display only unclaimed inbox results. + * + *

    When the unclaimed parameter is set to "1", this method resets the query to a specific + * configuration designed to show only unclaimed (unassigned) laboratory results and documents. + * This is a common use case in healthcare workflows where results need to be triaged and + * assigned to providers.

    + * + *

    Unclaimed query configuration:

    + *
      + *
    • Resets all existing query parameters to defaults (preserving null session)
    • + *
    • Sets provider filter to NO_PROVIDER mode (searchProviderNo = "0")
    • + *
    • Sets status filter to NEW only (excludes acknowledged and filed results)
    • + *
    + * + *

    If the unclaimed parameter is null or not "1", the method returns immediately without + * modifying the query, allowing other filtering criteria to remain active.

    + * + * @param query InboxhubQuery the query object to configure for unclaimed results, modified in-place + * @param unclaimed String flag indicating whether to show unclaimed results, must be "1" to activate, + * null or any other value leaves query unchanged + */ public void setInboxFormQueryUnclaimed(InboxhubQuery query, String unclaimed) { if (unclaimed == null || !unclaimed.equals("1")) { return; } query.reset(null); @@ -240,6 +461,39 @@ public void setInboxFormQueryUnclaimed(InboxhubQuery query, String unclaimed) { query.setStatus(StatusFilter.NEW.getValue()); } + /** + * Calculates total result counts for documents, labs, and HRM records based on query filters. + * + *

    This method computes comprehensive statistics about the number of results matching the + * query criteria, broken down by document type (documents, laboratory results, HRM records). + * The counts are calculated from pre-populated CategoryData and are essential for displaying + * pagination controls, result summaries, and category tabs in the InboxHub interface.

    + * + *

    Type selection logic:

    + *
      + *
    • If no type flags are set (lab, doc, hrm all false), counts all three types
    • + *
    • If specific type flags are set, counts only the selected types
    • + *
    + * + *

    Special handling for HRM counts:

    + *
      + *
    • HRM results are excluded when abnormal filter is explicitly enabled
    • + *
    • This prevents HRM records from appearing in abnormal results views
    • + *
    + * + *

    The method delegates to private helper methods (getDocumentCount, getLabCount, getHRMCount) + * which apply patient search and unmatched filtering logic to the CategoryData counts.

    + * + * @param query InboxhubQuery the query object containing type flags (doc, lab, hrm) and + * abnormal filter settings + * @param categoryData CategoryData pre-populated category data containing total, matched, + * and unmatched counts for all document types + * @return int[] array of four integers containing: + * [0] total documents count (excluding HRMs), + * [1] total laboratory results count, + * [2] total HRM records count, + * [3] combined total of all selected types + */ public int[] getTotalResultsCountBasedOnQuery(InboxhubQuery query, CategoryData categoryData) { int totalDocsCount = 0; int totalLabsCount = 0; diff --git a/src/main/java/ca/openosp/openo/integration/clinicalconnect/ClinicalConnectSSO.java b/src/main/java/ca/openosp/openo/integration/clinicalconnect/ClinicalConnectSSO.java deleted file mode 100644 index 0e670c8950a..00000000000 --- a/src/main/java/ca/openosp/openo/integration/clinicalconnect/ClinicalConnectSSO.java +++ /dev/null @@ -1,147 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ - - -package ca.openosp.openo.integration.clinicalconnect; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; -import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor; -import org.apache.wss4j.common.WSS4JConstants; -import org.apache.wss4j.dom.handler.WSHandlerConstants; -import ca.openosp.openo.utility.MiscUtils; - -import com.medseek.clinical.service.*; -import com.medseek.clinical.service.GetDefaultLaunchUrl.Props; - -public class ClinicalConnectSSO { - private static final String VMO_SERVICE = "/VmoService"; - private static final String PATIENT_SERVICE = "/PatientService"; - private static VmoService vmoService = null; - private static PatientService patientService = null; - - private static String serviceUserName = null; - private static String servicePassword = null; - private static String serviceLocation = null; - - public static String getLaunchURL(String serviceUserName, String servicePassword, String serviceLocation, String username, String authType, String patientHCN) { - String url = null; - try { - if (isCredentialsChanged(serviceUserName, servicePassword, serviceLocation)) { - - // create the WS Client - JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); - factory.setServiceClass(VmoService.class); - factory.setAddress(getAddress(VMO_SERVICE)); - - // WS-SECURITY stuff follows - Map outProps = new HashMap(); - outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP); - - // Specify service username - outProps.put(WSHandlerConstants.USER, serviceUserName); - - // Password type : plain text - outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSS4JConstants.PW_TEXT); - - // set our password callback class this is used to lookup the password for a user. - outProps.put(WSHandlerConstants.PW_CALLBACK_REF, new PasswordCallbackHandler(servicePassword)); - WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps); - factory.getOutInterceptors().add(wssOut); - vmoService = (VmoService) factory.create(); - - factory.setServiceClass(PatientService.class); - factory.setAddress(getAddress(PATIENT_SERVICE)); - patientService = (PatientService) factory.create(); - } - - long id = vmoService.findUserMappingId(authType, username); - url = vmoService.getDefaultLaunchUrl(id, new Props(), getPatientToken(patientHCN, id), false); - } catch (Exception e) { - MiscUtils.getLogger().error("getLaunchURL Error!", e); - } - return url; - } - - private static boolean isCredentialsChanged(String srvUserName, String srvPassword, String srvLocation) { - boolean changed = false; - if (!srvUserName.equals(serviceUserName)) { - serviceUserName = srvUserName; - changed = true; - } - if (!srvPassword.equals(servicePassword)) { - servicePassword = srvPassword; - changed = true; - } - if (!srvLocation.equals(serviceLocation)) { - serviceLocation = srvLocation; - changed = true; - } - return changed; - } - - private static String getAddress(String whichService) { - String url = serviceLocation; - while (url.endsWith("/")) { - url = url.substring(0, url.length() - 1); - } - if (url.endsWith(VMO_SERVICE)) url = url.substring(0, url.length() - VMO_SERVICE.length()); - return url + whichService; - } - - private static String getPatientToken(String patientHCN, long id) { - String patientToken = null; - if (patientHCN != null && !patientHCN.trim().isEmpty()) { - - // create a PatientSearchCriteria with HCN - PatientSearchCriteria patientSearchCriteria = new PatientSearchCriteria(); - patientSearchCriteria.setHcn(patientHCN); - - // create RequestData to hold user id - RequestData requestData = new RequestData(); - SecurityEnvelope se = new SecurityEnvelope(); - se.setUserMappingId(Long.valueOf(id)); - requestData.setSecurityEnvelope(se); - - // loop thru all facilities until the patient is found or list exhausted - List facilities = patientService.getSearchSources(requestData); - for (String facility : facilities) { - String facilityToken = patientService.getSourceToken(requestData, facility); - PatientList patientList = vmoService.searchPatients(requestData, facilityToken, patientSearchCriteria, false); - if (patientList == null || patientList.getList().isEmpty()) continue; - - List psList = patientList.getList(); - if (psList != null && !psList.isEmpty()) { - patientToken = psList.get(0).getToken(); - break; - } - } - } - return patientToken; - } -} diff --git a/src/main/java/ca/openosp/openo/integration/clinicalconnect/ClinicalConnectViewer2Action.java b/src/main/java/ca/openosp/openo/integration/clinicalconnect/ClinicalConnectViewer2Action.java deleted file mode 100644 index dc4c41819a8..00000000000 --- a/src/main/java/ca/openosp/openo/integration/clinicalconnect/ClinicalConnectViewer2Action.java +++ /dev/null @@ -1,409 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ -package ca.openosp.openo.integration.clinicalconnect; - -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URLEncoder; -import java.security.KeyStore; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; - -import javax.net.ssl.SSLContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.lang3.StringUtils; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.SSLContexts; -import org.apache.http.entity.ByteArrayEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; -import org.apache.logging.log4j.Logger; -import org.codehaus.jettison.json.JSONObject; -import ca.openosp.openo.commn.dao.DemographicDao; -import ca.openosp.openo.commn.model.Demographic; -import ca.openosp.openo.utility.LoggedInInfo; -import ca.openosp.openo.utility.MiscUtils; -import ca.openosp.openo.utility.SpringUtils; - -import ca.openosp.OscarProperties; -import ca.openosp.openo.log.LogAction; - -import com.opensymphony.xwork2.ActionSupport; -import org.apache.struts2.ServletActionContext; - -public class ClinicalConnectViewer2Action extends ActionSupport { - HttpServletRequest request = ServletActionContext.getRequest(); - HttpServletResponse response = ServletActionContext.getResponse(); - - private DemographicDao demographicDao = SpringUtils.getBean(DemographicDao.class); - Logger logger = MiscUtils.getLogger(); - - private void addError(String demographicNo, String errorMessage, List errorList, HttpServletRequest request, String contextSessionID) { - errorList.add(errorMessage); - request.setAttribute("errors", errorList); - String prefix = contextSessionID; - if (prefix == null) { - prefix = ""; - } - LogAction.addLog(LoggedInInfo.getLoggedInInfoFromSession(request), "Launch CMS EHR Viewer", "launch", "error", demographicNo, prefix + ":" + errorMessage); - } - - public String execute() throws Exception { - if ("launchNonPatientContext".equals(request.getParameter("method"))) { - return launchNonPatientContext(); - } - return launch(); - } - - public String launchNonPatientContext() throws IOException { - List errors = new ArrayList(); - - - String oneIdToken = (String) request.getSession().getAttribute("oneid_token"); - if (StringUtils.isEmpty(oneIdToken)) { - addError(null, "Unable to retrieve OneId Token", errors, request, null); - return "error"; - } - - //get session expiration - Date tokenExpirationDate = retrieveSessionExpiration(oneIdToken); - if (tokenExpirationDate == null) { - addError(null, "Unable to retrieve token expiration information", errors, request, null); - return "error"; - } - - if (tokenExpirationDate.before(getFutureTime())) { - addError(null, "Expired Token", errors, request, null); - //return "error"; - String backendEconsultUrl = OscarProperties.getInstance().getProperty("backendEconsultUrl"); - String oscarUrl = request.getRequestURL().toString(); - String oUrl = oscarUrl.substring(0, oscarUrl.indexOf("clinicalConnectEHRViewer.do")); - String url = backendEconsultUrl + "/SAML2/login?oscarReturnURL=" + URLEncoder.encode(oUrl + "/econsultSSOLogin.do?operation=launch", "UTF-8") + "&loginStart=" + new Date().getTime() / 1000; - - response.sendRedirect(url); - return null; - } - - - //get ContextSessionID - String contextSessionID = retrieveContextSessionId(oneIdToken); - if (contextSessionID == null) { - addError(null, "Unable to retrieve contextSessionID", errors, request, null); - return "error"; - } - - //UPDATE CMS - try { - - String cmsURL = OscarProperties.getInstance().getProperty("clinicalConnect.CMS.url"); - String redirectURL = OscarProperties.getInstance().getProperty("clinicalConnect.redirectUrl"); - cmsURL = cmsURL + "?contextSessionID=" + contextSessionID + "&contextTopic=patientContext"; - - logger.debug("CMS URL = " + cmsURL); - HttpDelete httpDelete = new HttpDelete(cmsURL); - - httpDelete.addHeader("User-Agent", "Java/OSCAR"); - httpDelete.addHeader("Content-Type", "application/json"); - - HttpClient httpClient2 = getHttpClient2(); - HttpResponse httpResponse2 = httpClient2.execute(httpDelete); - - if (httpResponse2.getStatusLine().getStatusCode() >= 200 && httpResponse2.getStatusLine().getStatusCode() < 300) { - - logger.info("successfully deleted contextSessionID in CMS"); - request.getSession().setAttribute("CC_EHR_LOADED", true); - LogAction.addLog(LoggedInInfo.getLoggedInInfoFromSession(request), "Launch CMS EHR Viewer", "launch", "success", null, null); - - response.sendRedirect(redirectURL); - - return null; - - - } else if (httpResponse2.getStatusLine().getStatusCode() == 404) { - //it was previously deleted..same as OK really - request.getSession().setAttribute("CC_EHR_LOADED", true); - LogAction.addLog(LoggedInInfo.getLoggedInInfoFromSession(request), "Launch CMS EHR Viewer", "launch", "success", null, null); - - response.sendRedirect(redirectURL); - - return null; - - } else { - addError(null, "Could not update Patient Context for EHR viewer", errors, request, contextSessionID); - logger.warn("Did not get a success response from CMS : " + httpResponse2.getStatusLine().getStatusCode()); - return "error"; - } - - - } catch (Exception e) { - addError(null, "Error launching EHR viewer: " + e.getMessage(), errors, request, contextSessionID); - logger.error("Error", e); - return "error"; - } - } - - public String launch() throws IOException { - String operation = request.getParameter("operation"); - if (operation != null && operation.equals("npcl")) { - return launchNonPatientContext(); - } - - String demographicNoStr = request.getParameter("demographicNo"); - - List errors = new ArrayList(); - - Demographic demographic = demographicDao.getDemographic(demographicNoStr); - - if (demographic == null) { - addError(demographicNoStr, "Unable to find patient record", errors, request, null); - return "error"; - } - - String oneIdToken = (String) request.getSession().getAttribute("oneid_token"); - if (StringUtils.isEmpty(oneIdToken)) { - addError(demographicNoStr, "Unable to retrieve OneId Token", errors, request, null); - return "error"; - } - - //get ContextSessionID - String contextSessionID = retrieveContextSessionId(oneIdToken); - if (contextSessionID == null) { - addError(demographicNoStr, "Unable to retrieve contextSessionID", errors, request, null); - return "error"; - } - - //UPDATE CMS - try { - - String hcn = demographic.getHin(); - - if (StringUtils.isEmpty(hcn)) { - addError(demographicNoStr, "Patient does not have a Health Card #", errors, request, contextSessionID); - return "error"; - } - - if (!Check(hcn)) { - addError(demographicNoStr, "Patient does not have a valid Health Card #", errors, request, contextSessionID); - return "error"; - } - - String cmsURL = OscarProperties.getInstance().getProperty("clinicalConnect.CMS.url"); - String redirectURL = OscarProperties.getInstance().getProperty("clinicalConnect.redirectUrl"); - - logger.debug("CMS URL = " + cmsURL); - HttpPut httpPut = new HttpPut(cmsURL); - - httpPut.addHeader("User-Agent", "Java/OSCAR"); - httpPut.addHeader("Content-Type", "application/json"); - - JSONObject cms = new JSONObject(); - cms.put("contextSessionID", contextSessionID); - cms.put("contextTopic", "patientContext"); - cms.put("patientContext.Identifier1.type", "JHN"); - cms.put("patientContext.Identifier1.value", hcn); - cms.put("patientContext.Identifier1.system", - "http://ehealthontario.ca/fhir/NamingSystem/id-registration-and-claims-branch-def-source"); - - //optional elements - must send if available - SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); - cms.put("patientContext.birthDate", fmt.format(demographic.getBirthDay().getTime())); - cms.put("patientContext.gender", convertGender(demographic.getSex())); //Male,Female,Unknown - - String theString = cms.toString(); - HttpEntity reqEntity = new ByteArrayEntity(theString.getBytes("UTF-8")); - httpPut.setEntity(reqEntity); - - HttpClient httpClient2 = getHttpClient2(); - HttpResponse httpResponse2 = httpClient2.execute(httpPut); - - if (httpResponse2.getStatusLine().getStatusCode() >= 200 && httpResponse2.getStatusLine().getStatusCode() < 300) { - String entity2 = EntityUtils.toString(httpResponse2.getEntity()); - JSONObject resp = new JSONObject(entity2); - - if (resp.getString("contextSessionID").equals(contextSessionID)) { - logger.info("successfully set contextSessionID in CMS"); - - request.getSession().setAttribute("CC_EHR_LOADED", true); - - LogAction.addLog(LoggedInInfo.getLoggedInInfoFromSession(request), "Launch CMS EHR Viewer", "launch", "success", demographicNoStr, entity2); - - response.sendRedirect(redirectURL); - - return null; - - } else { - addError(demographicNoStr, "Could not update Patient Context for EHR viewer", errors, request, contextSessionID); - LogAction.addLog(LoggedInInfo.getLoggedInInfoFromSession(request), "Launch CMS EHR Viewer", "launch", "error", demographicNoStr, entity2); - logger.warn("response didn't have the proper contextSessionID"); - return "error"; - - - } - - } else { - addError(demographicNoStr, "Could not update Patient Context for EHR viewer", errors, request, contextSessionID); - logger.warn("Did not get a success response from CMS : " + httpResponse2.getStatusLine().getStatusCode()); - return "error"; - } - - - } catch (Exception e) { - addError(demographicNoStr, "Error launching EHR viewer: " + e.getMessage(), errors, request, contextSessionID); - logger.error("Error", e); - return "error"; - } - - - } - - protected String retrieveContextSessionId(String oneIdToken) { - String contextSessionID = null; - - - try { - //get the context session id - String url = OscarProperties.getInstance().getProperty("backendEconsultUrl") + "/api/contextSessionId"; - HttpGet httpGet = new HttpGet(url); - httpGet.addHeader("x-access-token", oneIdToken); - HttpClient httpClient = getHttpClient2(); - HttpResponse httpResponse = httpClient.execute(httpGet); - - if (httpResponse.getStatusLine().getStatusCode() == 200) { - String entity = EntityUtils.toString(httpResponse.getEntity()); - JSONObject obj = new JSONObject(entity); - contextSessionID = (String) obj.get("contextSessionID"); - logger.debug("contextSessionID = " + contextSessionID); - } - } catch (Exception e) { - logger.error("Error", e); - } - - return contextSessionID; - } - - protected Date retrieveSessionExpiration(String oneIdToken) { - String sessionExpiry = null; - - - try { - //get the context session id - String url = OscarProperties.getInstance().getProperty("backendEconsultUrl") + "/api/getTokenExpiry"; - HttpGet httpGet = new HttpGet(url); - httpGet.addHeader("x-access-token", oneIdToken); - HttpClient httpClient = getHttpClient2(); - HttpResponse httpResponse = httpClient.execute(httpGet); - - if (httpResponse.getStatusLine().getStatusCode() == 200) { - String entity = EntityUtils.toString(httpResponse.getEntity()); - JSONObject obj = new JSONObject(entity); - sessionExpiry = (String) obj.get("sessionExpiration"); - logger.debug("sessionExpiry = " + sessionExpiry); - - SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ"); - Date d = fmt.parse(sessionExpiry + "+0000"); - - return d; - } - } catch (Exception e) { - logger.error("Error", e); - } - - return null; - } - - protected HttpClient getHttpClient2() throws Exception { - - String cmsKeystoreFile = OscarProperties.getInstance().getProperty("clinicalConnect.CMS.keystore"); - String cmsKeystorePassword = OscarProperties.getInstance().getProperty("clinicalConnect.CMS.keystore.password"); - - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(new FileInputStream(cmsKeystoreFile), cmsKeystorePassword.toCharArray()); - - //setup SSL - SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(ks, cmsKeystorePassword.toCharArray()).build(); - sslcontext.getDefaultSSLParameters().setNeedClientAuth(true); - sslcontext.getDefaultSSLParameters().setWantClientAuth(true); - SSLConnectionSocketFactory sf = new SSLConnectionSocketFactory(sslcontext); - - //setup timeouts - int timeout = Integer.parseInt(OscarProperties.getInstance().getProperty("clinicalConnect.CMS.timeout", "60")); - RequestConfig config = RequestConfig.custom().setSocketTimeout(timeout * 1000).setConnectTimeout(timeout * 1000).build(); - - CloseableHttpClient httpclient3 = HttpClients.custom().setDefaultRequestConfig(config).setSSLSocketFactory(sf).build(); - - return httpclient3; - - } - - boolean Check(String ccNumber) { - int sum = 0; - boolean alternate = false; - for (int i = ccNumber.length() - 1; i >= 0; i--) { - int n = Integer.parseInt(ccNumber.substring(i, i + 1)); - if (alternate) { - n *= 2; - if (n > 9) { - n = (n % 10) + 1; - } - } - sum += n; - alternate = !alternate; - } - return (sum % 10 == 0); - } - - String convertGender(String sex) { - if (sex == null) { - return "Unknown"; - } - if ("M".equalsIgnoreCase(sex)) { - return "Male"; - } - if ("F".equalsIgnoreCase(sex)) { - return "Female"; - } - return "Unknown"; - } - - Date getFutureTime() { - Calendar c = Calendar.getInstance(); - c.add(Calendar.MINUTE, 1); - //c.add(Calendar.MINUTE, 63); - return c.getTime(); - } -} diff --git a/src/main/java/ca/openosp/openo/integration/clinicalconnect/PasswordCallbackHandler.java b/src/main/java/ca/openosp/openo/integration/clinicalconnect/PasswordCallbackHandler.java deleted file mode 100644 index f93e5d89e8e..00000000000 --- a/src/main/java/ca/openosp/openo/integration/clinicalconnect/PasswordCallbackHandler.java +++ /dev/null @@ -1,53 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ - - -package ca.openosp.openo.integration.clinicalconnect; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.wss4j.common.ext.WSPasswordCallback; - - -public class PasswordCallbackHandler implements CallbackHandler { - String servicePassword; - - public PasswordCallbackHandler(String password) { - servicePassword = password; - } - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (Callback callback : callbacks) { - if (callback instanceof WSPasswordCallback) { - WSPasswordCallback wsPasswordCallback = (WSPasswordCallback) callback; - wsPasswordCallback.setPassword(servicePassword); - } - } - } -} diff --git a/src/main/java/ca/openosp/openo/integration/ebs/client/ng/EdtClientBuilder.java b/src/main/java/ca/openosp/openo/integration/ebs/client/ng/EdtClientBuilder.java index 7b3eb297518..81a949ef30f 100644 --- a/src/main/java/ca/openosp/openo/integration/ebs/client/ng/EdtClientBuilder.java +++ b/src/main/java/ca/openosp/openo/integration/ebs/client/ng/EdtClientBuilder.java @@ -21,7 +21,7 @@ import org.apache.cxf.endpoint.Client; import org.apache.cxf.frontend.ClientProxy; import org.apache.cxf.headers.Header; -import org.apache.cxf.interceptor.LoggingInInterceptor; +import org.apache.cxf.ext.logging.LoggingInInterceptor; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.transport.http.HTTPConduit; import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; diff --git a/src/main/java/ca/openosp/openo/integration/mchcv/HCValidationResult.java b/src/main/java/ca/openosp/openo/integration/mchcv/HCValidationResult.java index e0179f65893..6afc52796a7 100644 --- a/src/main/java/ca/openosp/openo/integration/mchcv/HCValidationResult.java +++ b/src/main/java/ca/openosp/openo/integration/mchcv/HCValidationResult.java @@ -27,7 +27,7 @@ import ca.ontario.health.ebs.EbsFault; import ca.ontario.health.hcv.FeeServiceDetails; import ca.ontario.health.hcv.ResponseID; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import ca.openosp.openo.utility.MiscUtils; import javax.xml.datatype.XMLGregorianCalendar; @@ -265,7 +265,7 @@ private FeeServiceDetails getFeeServiceDetailsbyFeeServiceCode(String feeService if (feeServiceCode.equalsIgnoreCase(feeServiceDetail.getFeeServiceCode())) { selectedFeeServiceDetails = feeServiceDetail; try { - BeanUtils.copyProperties(selectedFeeServiceDetails, feeServiceDetail); + BeanUtils.copyProperties(feeServiceDetail, selectedFeeServiceDetails); } catch (Exception e) { MiscUtils.getLogger().warn("Bean Copy error. Fee Service code: " + feeServiceCode, e); } diff --git a/src/main/java/ca/openosp/openo/login/GenericOAuth10aApi.java b/src/main/java/ca/openosp/openo/login/GenericOAuth10aApi.java index 4f17250d008..cd9fca27c38 100644 --- a/src/main/java/ca/openosp/openo/login/GenericOAuth10aApi.java +++ b/src/main/java/ca/openosp/openo/login/GenericOAuth10aApi.java @@ -2,20 +2,79 @@ import com.github.scribejava.core.builder.api.DefaultApi10a; +/** + * Generic OAuth 1.0a API implementation for healthcare provider authentication. + * + * This class provides a configurable OAuth 1.0a authentication implementation + * using the ScribeJava library. It supports healthcare system integration by + * allowing dynamic configuration of OAuth endpoints via a base URL parameter. + * This is part of OpenO EMR's migration from CXF OAuth2 to ScribeJava OAuth 1.0a + * for improved provider credential management and facility integration. + * + *

    The class extends {@link DefaultApi10a} and implements the three required + * OAuth 1.0a endpoints: request token, access token, and authorization. All + * endpoints are constructed by appending standard OAuth paths to the configured + * base URL.

    + * + * @since 2026-01-24 + * @see DefaultApi10a + * @see ca.openosp.openo.login.OscarOAuthDataProvider + */ public class GenericOAuth10aApi extends DefaultApi10a { private final String baseUrl; + + /** + * Constructs a new GenericOAuth10aApi with the specified base URL. + * + * @param baseUrl String the base URL for OAuth endpoints (e.g., "https://emr.example.com"). + * Must not include trailing slash. All OAuth endpoints will be constructed + * by appending standard paths to this base URL. + */ public GenericOAuth10aApi(String baseUrl) { this.baseUrl = baseUrl; } + /** + * Returns the OAuth 1.0a request token endpoint URL. + * + * This endpoint is used in the first step of the OAuth 1.0a three-legged + * authentication flow to obtain a temporary request token. The request token + * is exchanged for user authorization before obtaining the final access token. + * + * @return String the full URL to the request token endpoint, constructed as + * baseUrl + "/oauth/request_token" + */ @Override public String getRequestTokenEndpoint() { return baseUrl + "/oauth/request_token"; } + /** + * Returns the OAuth 1.0a access token endpoint URL. + * + * This endpoint is used in the final step of the OAuth 1.0a authentication + * flow to exchange an authorized request token for a long-lived access token. + * The access token is used to authenticate subsequent API requests for healthcare + * provider operations within OpenO EMR. + * + * @return String the full URL to the access token endpoint, constructed as + * baseUrl + "/oauth/access_token" + */ @Override public String getAccessTokenEndpoint() { return baseUrl + "/oauth/access_token"; } + /** + * Returns the OAuth 1.0a authorization base URL. + * + * This endpoint is used in the second step of the OAuth 1.0a authentication + * flow where the user is redirected to authorize the application's access. + * Healthcare providers are presented with a consent screen to approve access + * to their EMR data and facilities before the request token can be exchanged + * for an access token. + * + * @return String the full URL to the authorization endpoint, constructed as + * baseUrl + "/oauth/authorize" + */ @Override public String getAuthorizationBaseUrl() { return baseUrl + "/oauth/authorize"; diff --git a/src/main/java/ca/openosp/openo/login/SSOLogin2Action.java b/src/main/java/ca/openosp/openo/login/SSOLogin2Action.java index 0d5b2f09a57..5a7a8773fd0 100644 --- a/src/main/java/ca/openosp/openo/login/SSOLogin2Action.java +++ b/src/main/java/ca/openosp/openo/login/SSOLogin2Action.java @@ -213,12 +213,7 @@ public String econsultLogin() throws IOException { session.setAttribute("delegateOneIdEmail", providerInformation[6]); } - String operation = request.getParameter("operation"); - if (operation != null && "launch".equals(operation)) { - actionForward = "/clinicalConnectEHRViewer.do?method=launchNonPatientContext"; - } else { - actionForward = "/index.jsp"; - } + actionForward = "/index.jsp"; } else { actionForward = "/logout.jsp?errorMessage=A different OSCAR account is linked to the ONE ID account"; } diff --git a/src/main/java/ca/openosp/openo/managers/DashboardManagerImpl.java b/src/main/java/ca/openosp/openo/managers/DashboardManagerImpl.java index 58da9a3727d..651827066c6 100644 --- a/src/main/java/ca/openosp/openo/managers/DashboardManagerImpl.java +++ b/src/main/java/ca/openosp/openo/managers/DashboardManagerImpl.java @@ -2,15 +2,15 @@ package ca.openosp.openo.managers; -import java.security.Security; +import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.logging.log4j.Logger; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.bouncycastle.util.encoders.Base64; -import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; +import org.springframework.security.crypto.encrypt.BytesEncryptor; +import org.springframework.security.crypto.encrypt.Encryptors; import ca.openosp.openo.commn.dao.ClinicDAO; import ca.openosp.openo.commn.dao.DashboardDao; import ca.openosp.openo.commn.dao.IndicatorTemplateDao; @@ -676,6 +676,25 @@ public IndicatorBean getIndicatorPanelForProvider(LoggedInInfo loggedInInfo, Str // TODO add duplicate Dashboard name check. + /** + * Generates an encrypted launch URL for the Shared Outcomes Dashboard. + *

    + * Encrypts clinic and user information using Spring Security Crypto (AES-256-CBC) + * and returns a URL with Base64-encoded encrypted parameters. The encryption uses + * a random initialization vector (IV) for each invocation, ensuring that the same + * input produces different encrypted output each time for enhanced security. + *

    + * The method validates that required configuration properties are present before + * attempting encryption. If any required property is missing or encryption fails, + * the method returns null to prevent exposing unencrypted or malformed data. + * + * @param loggedInInfo LoggedInInfo the current logged-in user context containing + * provider information to be included in the encrypted payload + * @return String the complete dashboard URL with encrypted parameters (e.g., + * "https://dashboard.example.com?encodedParams=BASE64_STRING&version=1.1"), + * or null if the dashboard URL is not configured or encryption fails + * @since 2026-01-28 + */ @Override public String getSharedOutcomesDashboardLaunchURL(LoggedInInfo loggedInInfo) { @@ -720,21 +739,34 @@ public String getSharedOutcomesDashboardLaunchURL(LoggedInInfo loggedInInfo) { logger.debug(json); - String encrypted = null; String b64 = null; - // system must have the UnlimitedJCEPolicyJDK7.zip installed for this to work try { - Security.addProvider(new BouncyCastleProvider()); - - StandardPBEStringEncryptor encrypter = new StandardPBEStringEncryptor(); - encrypter.setAlgorithm("PBEWITHSHA256AND256BITAES-CBC-BC"); - encrypter.setProviderName("BC"); - encrypter.setPassword(OscarProperties.getInstance().getProperty("shared_outcomes_dashboard_key")); - encrypted = encrypter.encrypt(json); - b64 = Base64.toBase64String(encrypted.getBytes()); + String password = OscarProperties.getInstance().getProperty("shared_outcomes_dashboard_key"); + String salt = OscarProperties.getInstance().getProperty("shared_outcomes_dashboard_salt"); + + if (password == null || password.isEmpty()) { + throw new IllegalArgumentException("shared_outcomes_dashboard_key property is required"); + } + if (salt == null || salt.isEmpty()) { + throw new IllegalArgumentException("shared_outcomes_dashboard_salt property is required"); + } + if (!salt.matches("^[0-9a-fA-F]{32}$")) { + throw new IllegalArgumentException( + "shared_outcomes_dashboard_salt must be exactly 32 hex characters (16 bytes). " + + "Generate with: openssl rand -hex 16"); + } + + BytesEncryptor encryptor = Encryptors.stronger(password, salt); + byte[] encrypted = encryptor.encrypt(json.getBytes(StandardCharsets.UTF_8)); + b64 = Base64.getEncoder().encodeToString(encrypted); } catch (Exception e) { - logger.error("error", e); + logger.error("Error encrypting shared dashboard URL parameters", e); + return null; + } + + if (b64 == null) { + return null; } return url + "?" + "encodedParams=" + b64 + "&version=1.1"; diff --git a/src/main/java/ca/openosp/openo/managers/EmailComposeManager.java b/src/main/java/ca/openosp/openo/managers/EmailComposeManager.java index 5119f621a58..c3445d5d601 100644 --- a/src/main/java/ca/openosp/openo/managers/EmailComposeManager.java +++ b/src/main/java/ca/openosp/openo/managers/EmailComposeManager.java @@ -38,8 +38,22 @@ import ca.openosp.openo.util.StringUtils; -/* - * The purpose of the EmailComposeManager is to help prepare all necessary data to display on the emailCompose.jsp page. +/** + * Manager service for composing and preparing healthcare-related email communications. + * + * This manager orchestrates the preparation of email data for display on the emailCompose.jsp page, + * including attachment handling for various healthcare document types (EForms, EDocs, Labs, HRMs, Forms), + * recipient validation, consent status verification, and sender account management. + * + * All operations enforce security privilege checks to ensure HIPAA/PIPEDA compliance for PHI (Patient Health Information). + * Email communications require explicit patient consent verification through the configured consent types. + * + * @see EmailConfig + * @see EmailLog + * @see EmailAttachment + * @see DocumentAttachmentManager + * @see PatientConsentManager + * @since 2026-01-24 */ @Service public class EmailComposeManager { @@ -63,6 +77,17 @@ public class EmailComposeManager { @Autowired private SecurityInfoManager securityInfoManager; + /** + * Prepares an existing email for resending by retrieving its log entry. + * + * This method retrieves the email log for a previously sent email to allow resending + * with the same content and attachments. Requires READ privilege on the _email security object. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param emailLogId Integer the unique identifier of the email log entry to retrieve + * @return EmailLog the email log entry containing the original email data + * @throws RuntimeException if the user lacks the required _email READ privilege + */ public EmailLog prepareEmailForResend(LoggedInInfo loggedInInfo, Integer emailLogId) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -72,6 +97,20 @@ public EmailLog prepareEmailForResend(LoggedInInfo loggedInInfo, Integer emailLo return emailLog; } + /** + * Prepares EForm attachments for email composition by rendering them as PDF documents. + * + * This method converts selected EForms into PDF format for email attachment. The fdid parameter + * represents a featured form that will be prepended to the list of attached forms. Each EForm + * is rendered with proper security context and file size calculation. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param fdid String the featured/primary EForm document ID to prepend to attachments (optional, may be null) + * @param attachedEForms String[] array of EForm IDs to attach to the email + * @return List<EmailAttachment> list of prepared PDF email attachments with metadata + * @throws PDFGenerationException if PDF rendering fails for any EForm + * @throws RuntimeException if the user lacks the required _eform READ privilege + */ public List prepareEFormAttachments(LoggedInInfo loggedInInfo, String fdid, String[] attachedEForms) throws PDFGenerationException { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_eform", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_eform)"); @@ -93,6 +132,18 @@ public List prepareEFormAttachments(LoggedInInfo loggedInInfo, return emailAttachments; } + /** + * Prepares EDoc (electronic document) attachments for email composition by rendering them as PDF documents. + * + * This method converts selected electronic documents into PDF format for email attachment. + * Each EDoc is rendered with proper security context and file size calculation. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param attachedDocuments String[] array of EDoc IDs to attach to the email + * @return List<EmailAttachment> list of prepared PDF email attachments with metadata + * @throws PDFGenerationException if PDF rendering fails for any electronic document + * @throws RuntimeException if the user lacks the required _edoc READ privilege + */ public List prepareEDocAttachments(LoggedInInfo loggedInInfo, String[] attachedDocuments) throws PDFGenerationException { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_edoc", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_edoc)"); @@ -111,6 +162,18 @@ public List prepareEDocAttachments(LoggedInInfo loggedInInfo, S return emailAttachments; } + /** + * Prepares laboratory result attachments for email composition by rendering them as PDF documents. + * + * This method converts selected laboratory results into PDF format for email attachment. + * Each lab result is rendered with proper security context and file size calculation. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param attachedLabs String[] array of lab result IDs to attach to the email + * @return List<EmailAttachment> list of prepared PDF email attachments with metadata + * @throws PDFGenerationException if PDF rendering fails for any laboratory result + * @throws RuntimeException if the user lacks the required _lab READ privilege + */ public List prepareLabAttachments(LoggedInInfo loggedInInfo, String[] attachedLabs) throws PDFGenerationException { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_lab", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_lab)"); @@ -129,6 +192,18 @@ public List prepareLabAttachments(LoggedInInfo loggedInInfo, St return emailAttachments; } + /** + * Prepares HRM (Hospital Report Manager) attachments for email composition by rendering them as PDF documents. + * + * This method converts selected hospital reports into PDF format for email attachment. + * HRM functionality is only available in Ontario billing regions. If not in Ontario, an empty list is returned. + * Security violations are logged but do not throw exceptions, instead returning an empty list. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param attachedHRMDocuments String[] array of HRM document IDs to attach to the email + * @return List<EmailAttachment> list of prepared PDF email attachments with metadata, or empty list if not in Ontario or lacking privileges + * @throws PDFGenerationException if PDF rendering fails for any hospital report + */ public List prepareHRMAttachments(LoggedInInfo loggedInInfo, String[] attachedHRMDocuments) throws PDFGenerationException { if (!OscarProperties.getInstance().isOntarioBillingRegion()) { return new ArrayList<>(); @@ -152,6 +227,21 @@ public List prepareHRMAttachments(LoggedInInfo loggedInInfo, St return emailAttachments; } + /** + * Prepares clinical form attachments for email composition by rendering them as PDF documents. + * + * This method converts selected clinical forms into PDF format for email attachment. + * Forms are rendered with the associated demographic context and require both servlet request/response + * objects for proper rendering. + * + * @param request HttpServletRequest the servlet request object required for form rendering + * @param response HttpServletResponse the servlet response object required for form rendering + * @param attachedForms String[] array of form IDs to attach to the email + * @param demographicId Integer the patient demographic ID associated with the forms + * @return List<EmailAttachment> list of prepared PDF email attachments with metadata + * @throws PDFGenerationException if PDF rendering fails for any clinical form + * @throws RuntimeException if the user lacks the required _form READ privilege for the specified demographic + */ public List prepareFormAttachments(HttpServletRequest request, HttpServletResponse response, String[] attachedForms, Integer demographicId) throws PDFGenerationException { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); if (!securityInfoManager.hasPrivilege(loggedInInfo, "_form", SecurityInfoManager.READ, String.valueOf(demographicId))) { @@ -171,6 +261,15 @@ public List prepareFormAttachments(HttpServletRequest request, return emailAttachments; } + /** + * Sanitizes email attachment filenames by replacing them with standardized sequential names. + * + * This method renames all attachments to a standardized format (attachment_001.pdf, attachment_002.pdf, etc.) + * to prevent PHI disclosure through original filenames and ensure consistent naming across all email attachments. + * This is a security measure to protect patient privacy. + * + * @param emailAttachments List<EmailAttachment> the list of email attachments to sanitize (modified in place) + */ public void sanitizeAttachments(List emailAttachments) { DecimalFormat formatter = new DecimalFormat("000"); int attachmentNumber = 1; @@ -180,6 +279,18 @@ public void sanitizeAttachments(List emailAttachments) { } } + /** + * Retrieves the email communication consent status for a patient. + * + * This method checks the patient's consent status for email communications based on the configured + * consent type in user properties. Returns a two-element array containing the consent type name + * and the consent status (Unknown, Explicit Opt-In, or Explicit Opt-Out). + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param demographicId Integer the patient demographic ID to check consent for + * @return String[] array with two elements: [0] consent type name, [1] consent status description + * @throws RuntimeException if the user lacks the required _email READ privilege + */ public String[] getEmailConsentStatus(LoggedInInfo loggedInInfo, Integer demographicId) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -205,6 +316,15 @@ public String[] getEmailConsentStatus(LoggedInInfo loggedInInfo, Integer demogra return consent.getPatientConsented() ? new String[]{consentType.getName(), OPTIN} : new String[]{consentType.getName(), OPTOUT}; } + /** + * Checks if email consent tracking is properly configured in the system. + * + * This method verifies that a valid and active consent type is configured in user properties + * for email communication tracking. This is required for PIPEDA/HIPAA compliance before + * allowing email communications with patients. + * + * @return Boolean TRUE if email consent is properly configured with an active consent type, FALSE otherwise + */ public Boolean isEmailConsentConfigured() { UserProperty userProperty = userPropertyDAO.getProp(UserProperty.EMAIL_COMMUNICATION); if (userProperty == null || StringUtils.isNullOrEmpty(userProperty.getValue())) { @@ -220,10 +340,26 @@ public Boolean isEmailConsentConfigured() { return Boolean.TRUE; } + /** + * Retrieves all active email sender account configurations. + * + * This method returns all configured and active email sender accounts (SMTP configurations) + * that can be used for sending patient communications. + * + * @return List<EmailConfig> list of all active email configuration accounts + */ public List getAllSenderAccounts() { return emailConfigDao.fillAllActiveEmailConfigs(); } + /** + * Checks if at least one active email sender account is configured. + * + * This method verifies that the system has at least one configured SMTP account + * available for sending emails. + * + * @return Boolean TRUE if at least one active sender account exists, FALSE otherwise + */ public Boolean hasActiveSenderAccount() { if (getAllSenderAccounts().isEmpty()) { return false; @@ -231,6 +367,16 @@ public Boolean hasActiveSenderAccount() { return true; } + /** + * Checks if a patient has at least one valid email recipient address. + * + * This method validates that the patient's demographic record contains at least one + * properly formatted email address that can be used as a recipient. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param demographicId Integer the patient demographic ID to check for valid recipients + * @return Boolean TRUE if at least one valid email address exists for the patient, FALSE otherwise + */ public Boolean hasValidRecipient(LoggedInInfo loggedInInfo, Integer demographicId) { List validRecipients = (List) getRecipients(loggedInInfo, demographicId)[0]; if (validRecipients.isEmpty()) { @@ -239,6 +385,15 @@ public Boolean hasValidRecipient(LoggedInInfo loggedInInfo, Integer demographicI return true; } + /** + * Checks if the email system is fully enabled and ready for use. + * + * This method verifies that both email consent tracking is properly configured + * and at least one active sender account exists. Both conditions must be met + * for the email system to be considered enabled. + * + * @return Boolean TRUE if email consent is configured and sender accounts exist, FALSE otherwise + */ public Boolean isEmailEnabled() { if (isEmailConsentConfigured() && !getAllSenderAccounts().isEmpty()) { return Boolean.TRUE; @@ -246,6 +401,17 @@ public Boolean isEmailEnabled() { return Boolean.FALSE; } + /** + * Retrieves and validates email recipients for a patient. + * + * This method extracts email addresses from the patient's demographic record and validates + * each address using RFC-compliant email validation. Returns two lists: one containing + * valid email addresses and one containing invalid addresses. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param demographicId Integer the patient demographic ID to retrieve recipients for + * @return List<?>[] array of two lists: [0] List<String> valid email addresses, [1] List<String> invalid email addresses + */ public List[] getRecipients(LoggedInInfo loggedInInfo, Integer demographicId) { String recipientsString = demographicManager.getDemographicEmail(loggedInInfo, demographicId); List validRecipients = new ArrayList<>(); @@ -266,21 +432,60 @@ public List[] getRecipients(LoggedInInfo loggedInInfo, Integer demographicId) return new List[]{validRecipients, invalidRecipients}; } + /** + * Creates a password for encrypting PDF attachments based on patient demographic data. + * + * This method generates a password by concatenating the patient's birth date components + * (year, month, day) and health insurance number (HIN). This provides a patient-specific + * password that the patient can reconstruct using their own demographic information. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param demographicId Integer the patient demographic ID to create password for + * @return String the generated PDF password in format: YYYYMMDDHIN + */ public String createEmailPDFPassword(LoggedInInfo loggedInInfo, Integer demographicId) { Demographic demographic = demographicManager.getDemographic(loggedInInfo, demographicId); return demographic.getYearOfBirth() + demographic.getMonthOfBirth() + demographic.getDateOfBirth() + demographic.getHin(); } + /** + * Checks if the current user has a specific privilege for email operations. + * + * This method verifies that the logged-in user has the specified privilege level + * (READ, WRITE, UPDATE, or DELETE) for the _email security object. + * + * @param loggedInInfo LoggedInInfo the current logged-in user session information + * @param privilege String the privilege level to check (e.g., "r", "w", "u", "d") + * @return boolean true if the user has the specified email privilege, false otherwise + */ public boolean hasEmailPrivilege(LoggedInInfo loggedInInfo, String privilege) { boolean hasEmailPrivilege = securityInfoManager.hasPrivilege(loggedInInfo, "_email", privilege, null); return hasEmailPrivilege; } + /** + * Validates an email address using RFC-compliant validation rules. + * + * This method uses Apache Commons EmailValidator to verify that the email address + * conforms to RFC 822 standards for email address format. + * + * @param email String the email address to validate + * @return boolean true if the email address is valid according to RFC standards, false otherwise + */ private boolean isValidEmail(String email) { EmailValidator emailValidator = EmailValidator.getInstance(); return emailValidator.isValid(email); } + /** + * Converts a string array to a mutable ArrayList. + * + * This method converts a string array into an ArrayList to allow modification. + * If the input array is null, an empty list is returned. + * + * @param stringArray String[] the array to convert (may be null) + * @return List<String> a mutable list containing all elements from the array, or empty list if input is null + */ private List convertToList(String[] stringArray) { List stringList = new ArrayList<>(); if (stringArray != null) { @@ -289,6 +494,15 @@ private List convertToList(String[] stringArray) { return stringList; } + /** + * Retrieves the file size in bytes for a given file path. + * + * This method safely retrieves the file size for attachment metadata. + * If an IOException occurs during file access, the error is logged and 0 is returned. + * + * @param filePath Path the file path to get the size for + * @return Long the file size in bytes, or 0 if the file cannot be accessed + */ public Long getFileSize(Path filePath) { Long fileSize = 0l; try { diff --git a/src/main/java/ca/openosp/openo/managers/EmailManager.java b/src/main/java/ca/openosp/openo/managers/EmailManager.java index 6dc67161513..a3b9f744fd4 100644 --- a/src/main/java/ca/openosp/openo/managers/EmailManager.java +++ b/src/main/java/ca/openosp/openo/managers/EmailManager.java @@ -50,6 +50,34 @@ import ca.openosp.openo.encounter.data.EctProgram; import ca.openosp.openo.util.StringUtils; +/** + * Email management service for the OpenO EMR healthcare system. + * + * This manager provides comprehensive email functionality for healthcare providers, + * including secure email transmission, encryption support for PHI (Protected Health Information), + * attachment handling, and integration with patient charts through case management notes. + * + * Key Features: + * - Secure email sending with role-based access control (_email privilege) + * - Optional PDF encryption for messages and attachments containing PHI + * - Email status tracking and audit logging + * - Integration with patient demographic records and provider profiles + * - Automatic chart note creation with configurable display options + * - Email outbox management with status monitoring + * + * Security Considerations: + * - All operations require _email security privilege (READ or WRITE) + * - PHI content can be encrypted using password-protected PDFs + * - Email activity is logged for audit compliance + * - User inputs are sanitized using OWASP encoding + * + * @see EmailLog + * @see EmailConfig + * @see EmailData + * @see EmailSender + * @see CaseManagementNote + * @since 2026-01-24 + */ @Service public class EmailManager { private final Logger logger = MiscUtils.getLogger(); @@ -71,6 +99,28 @@ public class EmailManager { @Autowired private SecurityInfoManager securityInfoManager; + /** + * Sends an email with optional encryption and creates a corresponding email log entry. + * + * This method orchestrates the complete email sending workflow including field sanitization, + * outbox preparation, optional encryption, transmission, and status tracking. If configured + * to display in the patient chart, it also creates a case management note documenting the + * email communication. + * + * The method performs the following steps: + * 1. Validates user has _email WRITE privilege + * 2. Sanitizes email data fields + * 3. Creates email log entry in FAILED status + * 4. Encrypts message and/or attachments if requested + * 5. Sends email via configured email server + * 6. Updates log status to SUCCESS or FAILED + * 7. Creates chart note if configured for WITH_FULL_NOTE display + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param emailData EmailData containing email subject, body, recipients, attachments, and configuration options + * @return EmailLog the persisted email log entry with final status and metadata + * @throws RuntimeException if user lacks _email WRITE privilege + */ public EmailLog sendEmail(LoggedInInfo loggedInInfo, EmailData emailData) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -95,6 +145,25 @@ public EmailLog sendEmail(LoggedInInfo loggedInInfo, EmailData emailData) { return emailLog; } + /** + * Prepares an email for sending by creating and persisting an email log entry in the outbox. + * + * This method creates a comprehensive email log record that captures all email metadata, + * configuration, and content. The email log is initially created with FAILED status and + * a default error message, which is updated to SUCCESS after successful transmission. + * + * The method: + * 1. Retrieves active email configuration for the sender + * 2. Loads demographic and provider information + * 3. Creates EmailLog entity with all email data + * 4. Persists the email log to database + * 5. Creates audit log entry for compliance tracking + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param emailData EmailData containing email content, recipients, and configuration + * @return EmailLog the persisted email log entry ready for transmission + * @throws RuntimeException if user lacks _email WRITE privilege + */ public EmailLog prepareEmailForOutbox(LoggedInInfo loggedInInfo, EmailData emailData) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -131,6 +200,19 @@ public EmailLog prepareEmailForOutbox(LoggedInInfo loggedInInfo, EmailData email return emailLog; } + /** + * Updates the status of an email log entry by ID. + * + * This is a convenience method that loads the email log by ID and delegates to the + * main status update method. It is useful when only the email log ID is available. + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param emailLogId Integer the unique identifier of the email log entry to update + * @param emailStatus EmailStatus the new status to set (SUCCESS, FAILED, RESOLVED, etc.) + * @param errorMessage String the error message to store, empty string if no error + * @return EmailLog the updated email log entry with new status and timestamp + * @throws RuntimeException if user lacks _email WRITE privilege + */ public EmailLog updateEmailStatus(LoggedInInfo loggedInInfo, Integer emailLogId, EmailStatus emailStatus, String errorMessage) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -140,6 +222,25 @@ public EmailLog updateEmailStatus(LoggedInInfo loggedInInfo, Integer emailLogId, return updateEmailStatus(loggedInInfo, emailLog, emailStatus, errorMessage); } + /** + * Updates the status of an email log entry with new status and error message. + * + * This method updates the email log status in both the database and the in-memory object. + * The timestamp is updated to the current time for status changes, but preserved when + * resolving an issue (RESOLVED status) to maintain the original send time. + * + * Common status values: + * - SUCCESS: Email sent successfully + * - FAILED: Email transmission failed + * - RESOLVED: Issue with email has been resolved by user + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param emailLog EmailLog the email log entry to update + * @param emailStatus EmailStatus the new status to set + * @param errorMessage String the error message to store, empty string if no error + * @return EmailLog the updated email log entry with new status and timestamp + * @throws RuntimeException if user lacks _email WRITE privilege + */ public EmailLog updateEmailStatus(LoggedInInfo loggedInInfo, EmailLog emailLog, EmailStatus emailStatus, String errorMessage) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.WRITE, null)) { throw new RuntimeException("missing required security object (_email)"); @@ -157,6 +258,28 @@ public EmailLog updateEmailStatus(LoggedInInfo loggedInInfo, EmailLog emailLog, return emailLog; } + /** + * Retrieves email status results filtered by date range, demographic, sender, and status. + * + * This method provides comprehensive email log querying for reporting and monitoring purposes. + * All filter parameters are optional (can be null) to allow flexible searching. Results are + * converted to EmailStatusResult DTOs for UI display and sorted by timestamp. + * + * Date parameters are parsed in yyyy-MM-dd format: + * - dateBeginStr is set to 00:00:00 on the specified date + * - dateEndStr is set to 23:59:59 on the specified date + * + * If date parsing fails, an empty list is returned. + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param dateBeginStr String the start date in yyyy-MM-dd format, or null for no start date + * @param dateEndStr String the end date in yyyy-MM-dd format, or null for no end date + * @param demographic_no String the patient demographic number to filter by, or null for all patients + * @param senderEmailAddress String the sender email address to filter by, or null for all senders + * @param emailStatus String the email status to filter by (SUCCESS, FAILED, etc.), or null for all statuses + * @return List<EmailStatusResult> list of email status results matching the filter criteria, sorted by timestamp + * @throws RuntimeException if user lacks _email READ privilege + */ public List getEmailStatusByDateDemographicSenderStatus(LoggedInInfo loggedInInfo, String dateBeginStr, String dateEndStr, String demographic_no, String senderEmailAddress, String emailStatus) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -172,6 +295,19 @@ public List getEmailStatusByDateDemographicSenderStatus(Logge return retriveEmailStatusResultList(resultList); } + /** + * Retrieves the email log associated with a case management note. + * + * This method enables bidirectional navigation between chart notes and email communications. + * When an email is configured to display in the patient chart (WITH_FULL_NOTE option), + * a case management note is created and linked to the email log. This method retrieves + * the original email log from the note ID. + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param noteId Long the unique identifier of the case management note + * @return EmailLog the email log associated with the note, or null if no email link exists + * @throws RuntimeException if user lacks _email READ privilege + */ public EmailLog getEmailLogByCaseManagementNoteId(LoggedInInfo loggedInInfo, Long noteId) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -185,6 +321,23 @@ public EmailLog getEmailLogByCaseManagementNoteId(LoggedInInfo loggedInInfo, Lon return emailLogDao.find(emailLogId.intValue()); } + /** + * Creates a case management note in the patient chart documenting an email communication. + * + * This method is called when an email is configured with ChartDisplayOption.WITH_FULL_NOTE. + * It creates a formatted chart note containing email metadata (subject, recipients, timestamp) + * and links it to the email log for bidirectional navigation. + * + * The note is automatically: + * - Signed by the current provider + * - Associated with the current program + * - Linked to the email log via CaseManagementNoteLink + * - Created with doctor role (or program-specific role if available) + * + * @param loggedInInfo LoggedInInfo the logged-in user session information + * @param emailLog EmailLog the email log to document in the chart + * @throws RuntimeException if user lacks _email READ privilege + */ public void addEmailNote(LoggedInInfo loggedInInfo, EmailLog emailLog) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_email", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_email)"); @@ -219,6 +372,16 @@ public void addEmailNote(LoggedInInfo loggedInInfo, EmailLog emailLog) { caseManagementManager.saveNoteLink(caseManagementNoteLink); } + /** + * Creates and associates email attachments with an email log entry. + * + * This helper method creates new EmailAttachment instances linked to the email log, + * copying metadata from the source attachments. Each attachment includes file name, + * file path, document type, and optional document ID for referenced documents. + * + * @param emailLog EmailLog the email log to attach files to + * @param emailAttachments List<EmailAttachment> the source attachments to copy + */ private void setEmailAttachments(EmailLog emailLog, List emailAttachments) { List emailAttachmentList = new ArrayList<>(); for (EmailAttachment emailAttachment : emailAttachments) { @@ -227,6 +390,22 @@ private void setEmailAttachments(EmailLog emailLog, List emailA emailLog.setEmailAttachments(emailAttachmentList); } + /** + * Sanitizes and normalizes email data fields based on encryption settings. + * + * This method ensures encryption-related fields are consistent with the selected + * encryption options. It clears encryption fields when encryption is not needed, + * and clears the internal comment when no chart note will be created. + * + * Sanitization rules: + * - If no encrypted message and no attachments: disable encryption entirely + * - If no encrypted message and unencrypted attachments: disable encryption + * - If no attachments: disable attachment encryption + * - If encryption disabled: clear all encryption-related fields + * - If no chart note: clear internal comment + * + * @param emailData EmailData the email data to sanitize + */ private void sanitizeEmailFields(EmailData emailData) { if (StringUtils.isNullOrEmpty(emailData.getEncryptedMessage()) && emailData.getAttachments().isEmpty()) { emailData.setIsEncrypted(false); @@ -252,6 +431,23 @@ private void sanitizeEmailFields(EmailData emailData) { } } + /** + * Encrypts the email message and/or attachments as password-protected PDFs. + * + * This method handles encryption of PHI content for secure transmission. It converts + * the encrypted message to a PDF attachment and encrypts selected attachments, then + * appends the password clue to the email body. + * + * Encryption workflow: + * 1. Convert encrypted message text to PDF attachment (if present) + * 2. Collect attachments to encrypt based on isAttachmentEncrypted flag + * 3. Encrypt all selected attachments with the provided password + * 4. Update email attachments list with encrypted files + * 5. Append password clue to email body + * + * @param emailData EmailData the email data containing content to encrypt + * @throws EmailSendingException if PDF encryption fails + */ private void encryptEmail(EmailData emailData) throws EmailSendingException { // Encrypt message and attachment List encryptableAttachments = new ArrayList<>(); @@ -274,6 +470,15 @@ private void encryptEmail(EmailData emailData) throws EmailSendingException { emailData.setBody(emailData.getBody() + "\n\n*****\n" + emailData.getPasswordClue().trim() + "\n*****\n"); } + /** + * Creates a PDF attachment from the encrypted message text. + * + * This method converts plain text message content to an HTML-formatted PDF for encryption. + * The text is OWASP-encoded for security and newlines are converted to HTML breaks. + * + * @param emailData EmailData containing the encrypted message text + * @return EmailAttachment a new attachment with the message PDF, or null if message is empty + */ private EmailAttachment createMessageAttachment(EmailData emailData) { if (StringUtils.isNullOrEmpty(emailData.getEncryptedMessage())) { return null; @@ -285,6 +490,17 @@ private EmailAttachment createMessageAttachment(EmailData emailData) { return emailAttachment; } + /** + * Encrypts a list of PDF attachments with password protection. + * + * This method iterates through attachments and encrypts each PDF file using the + * provided password. The encrypted file replaces the original file path in the + * attachment metadata. + * + * @param encryptableAttachments List<EmailAttachment> the attachments to encrypt + * @param password String the password to protect the PDFs with + * @throws EmailSendingException if PDF encryption fails for any attachment + */ private void encryptAttachments(List encryptableAttachments, String password) throws EmailSendingException { for (EmailAttachment attachment : encryptableAttachments) { try { @@ -298,7 +514,17 @@ private void encryptAttachments(List encryptableAttachments, St } } - + /** + * Parses a date string with optional time component into a Date object. + * + * This utility method handles date parsing with configurable format and time. + * If time is not provided or empty, the date is set to start of day (00:00:00). + * + * @param date String the date string to parse + * @param format String the date format pattern (e.g., "yyyy-MM-dd") + * @param time String the time string in HH:mm:ss format, or null/empty for start of day + * @return Date the parsed date with time in system default timezone, or null if parsing fails + */ private Date parseDate(String date, String format, String time) { if (date == null) { return null; diff --git a/src/main/java/ca/openosp/openo/managers/NioFileManagerImpl.java b/src/main/java/ca/openosp/openo/managers/NioFileManagerImpl.java index aeebad38b31..4890c28e223 100644 --- a/src/main/java/ca/openosp/openo/managers/NioFileManagerImpl.java +++ b/src/main/java/ca/openosp/openo/managers/NioFileManagerImpl.java @@ -32,7 +32,6 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -43,9 +42,10 @@ import ca.openosp.OscarProperties; import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.Logger; -import org.jpedal.PdfDecoder; -import org.jpedal.exception.PdfException; -import org.jpedal.fonts.FontMappings; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.rendering.PDFRenderer; +import org.apache.pdfbox.rendering.ImageType; +import javax.imageio.ImageIO; import ca.openosp.openo.utility.LoggedInInfo; import ca.openosp.openo.utility.MiscUtils; import ca.openosp.openo.utility.PathValidationUtils; @@ -231,22 +231,31 @@ public Path createCacheVersion2(LoggedInInfo loggedInInfo, String sourceDirector return null; } - PdfDecoder decode_pdf = new PdfDecoder(true); - FontMappings.setFontReplacements(); - decode_pdf.useHiResScreenDisplay(true); - decode_pdf.setExtractionMode(0, 96, 96 / 72f); + try (PDDocument document = PDDocument.load(sourceFile.toFile())) { + int pageIndex = pageNum - 1; + int pageCount = document.getNumberOfPages(); - try (InputStream inputStream = Files.newInputStream(sourceFile)) { - decode_pdf.openPdfFileFromInputStream(inputStream, false); - BufferedImage image_to_save = decode_pdf.getPageAsImage(pageNum); - decode_pdf.getObjectStore().saveStoredImage(cacheFilePath.toString(), image_to_save, true, false, "png"); + // Validate page index is within bounds + if (pageIndex < 0 || pageIndex >= pageCount) { + log.error("Requested page " + pageNum + " is out of range for document with " + pageCount + " pages"); + return null; + } + + PDFRenderer renderer = new PDFRenderer(document); + // Render at 96 DPI to match jpedal settings + // Note: jpedal uses 1-based page indexing, PDFBox uses 0-based + BufferedImage image_to_save = renderer.renderImageWithDPI(pageIndex, 96, ImageType.RGB); + + // Check ImageIO.write success (returns false on failure) + if (!ImageIO.write(image_to_save, "png", cacheFilePath.toFile())) { + log.error("Failed to write PNG image to cache file: " + cacheFilePath); + return null; + } + + image_to_save.flush(); } catch (IOException e) { - log.error("Error", e); - } catch (PdfException e) { - log.error("Error", e); - } finally { - decode_pdf.flushObjectValues(true); - decode_pdf.closePdfFile(); + log.error("Error rendering PDF page to cache", e); + return null; // Must return null on error } } diff --git a/src/main/java/ca/openosp/openo/managers/NoteManager.java b/src/main/java/ca/openosp/openo/managers/NoteManager.java index 11bd9c5cfe0..5fef704449a 100644 --- a/src/main/java/ca/openosp/openo/managers/NoteManager.java +++ b/src/main/java/ca/openosp/openo/managers/NoteManager.java @@ -21,6 +21,26 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +/** + * Manager service for clinical notes and case management in the OpenO EMR system. + * + * This service provides business logic for retrieving, converting, and managing clinical notes + * associated with patient demographics and CPP (Cumulative Patient Profile) codes. It handles + * the integration between case management notes, clinical issues, and extended note attributes + * to support comprehensive patient record management in healthcare workflows. + * + * The NoteManager coordinates operations between the case management data access layer and + * REST API transfer objects, ensuring proper conversion and filtering of clinical notes based + * on issue codes, CPP classification, and active status. It supports both general note retrieval + * and CPP-specific note queries for integration with patient charts and clinical documentation. + * + * @see CaseManagementNote + * @see CaseManagementNoteDAO + * @see CaseManagementManager + * @see NoteTo1 + * @see CppCode + * @since 2026-01-24 + */ @Service public class NoteManager { @@ -35,6 +55,19 @@ public class NoteManager { @Autowired private IssueDAO issueDAO; + /** + * Retrieves all CPP (Cumulative Patient Profile) notes for a specific patient demographic. + * + * This method queries all case management notes associated with the specified patient that + * are classified under CPP issue codes. CPP notes represent cumulative patient profile + * information including medical history, ongoing problems, medications, allergies, and + * other persistent clinical data. The returned notes are converted to transfer objects + * suitable for REST API responses and client consumption. + * + * @param loggedInInfo LoggedInInfo object containing the current user's session and security context + * @param demographicNo Integer unique identifier for the patient demographic record + * @return List<NoteTo1> collection of CPP notes converted to transfer objects, or empty list if none found + */ public List getCppNotes(LoggedInInfo loggedInInfo, Integer demographicNo) { List notes = new ArrayList<>(caseManagementNoteDAO.findNotesByDemographicAndIssueCode(demographicNo, CppCode.toArray())); List noteTo1s = new ArrayList<>(); @@ -44,6 +77,19 @@ public List getCppNotes(LoggedInInfo loggedInInfo, Integer demographicN return noteTo1s; } + /** + * Retrieves active CPP (Cumulative Patient Profile) notes for a specific patient demographic. + * + * This method filters case management notes to return only those with active status + * and associated with CPP issue codes. Active notes represent current, ongoing clinical + * information that is relevant to the patient's care. This is commonly used for displaying + * up-to-date patient profile information in encounter screens and clinical workflows. + * Inactive or archived notes are excluded from the results. + * + * @param loggedInInfo LoggedInInfo object containing the current user's session and security context + * @param demographicNo Integer unique identifier for the patient demographic record + * @return List<NoteTo1> collection of active CPP notes converted to transfer objects, or empty list if none found + */ public List getActiveCppNotes(LoggedInInfo loggedInInfo, Integer demographicNo) { String[] issueIds = getIssueIds(null); List notes = new ArrayList<>(caseManagementNoteDAO.getActiveNotesByDemographic(String.valueOf(demographicNo), issueIds)); @@ -54,6 +100,20 @@ public List getActiveCppNotes(LoggedInInfo loggedInInfo, Integer demogr return noteTo1s; } + /** + * Retrieves active CPP (Cumulative Patient Profile) notes for a specific patient demographic + * filtered by custom CPP codes. + * + * This method provides the same functionality as {@link #getActiveCppNotes(LoggedInInfo, Integer)} + * but allows for custom filtering using a specific set of CPP codes rather than the default + * comprehensive CPP code list. This is useful for retrieving notes related to specific clinical + * categories or when a subset of CPP information is required for targeted clinical views or reports. + * + * @param loggedInInfo LoggedInInfo object containing the current user's session and security context + * @param demographicNo Integer unique identifier for the patient demographic record + * @param newCppCodes String[] array of CPP code strings to filter notes by + * @return List<NoteTo1> collection of active CPP notes matching the specified codes, or empty list if none found + */ public List getActiveCppNotes(LoggedInInfo loggedInInfo, Integer demographicNo, String[] newCppCodes) { String[] issueIds = getIssueIds(newCppCodes); List notes = new ArrayList<>(caseManagementNoteDAO.getActiveNotesByDemographic(String.valueOf(demographicNo), issueIds)); @@ -64,6 +124,25 @@ public List getActiveCppNotes(LoggedInInfo loggedInInfo, Integer demogr return noteTo1s; } + /** + * Converts a CaseManagementNote entity to a NoteTo1 transfer object for API consumption. + * + * This method performs comprehensive conversion of a case management note entity into + * a REST API transfer object, including all core note properties, extended attributes, + * and associated clinical issues. The conversion process includes: + * - Core note metadata (revision, dates, provider information, status) + * - Extended note attributes (start date, resolution date, problem status, treatment, etc.) + * - Associated clinical issues with CPP classification + * - Summary code generation from all associated issues + * + * The method handles the complex mapping of note extensions (date values, problem details, + * relationships, life stage, etc.) and determines CPP classification based on associated + * issue codes. This is a central conversion utility used throughout the note retrieval workflow. + * + * @param loggedInInfo LoggedInInfo object containing the current user's session and security context + * @param caseManagementNote CaseManagementNote entity object to convert + * @return NoteTo1 transfer object containing all converted note data and associations + */ public NoteTo1 convertNote(LoggedInInfo loggedInInfo, CaseManagementNote caseManagementNote) { NoteTo1 note = new NoteTo1(); note.setNoteId(caseManagementNote.getId().intValue()); @@ -139,10 +218,34 @@ public NoteTo1 convertNote(LoggedInInfo loggedInInfo, CaseManagementNote caseMan return note; } + /** + * Determines whether a case management issue is classified as a CPP (Cumulative Patient Profile) code. + * + * This method checks if the issue code associated with a CaseManagementIssue matches any + * of the predefined CPP codes defined in the CppCode enumeration. CPP codes represent + * categories of persistent patient information such as medical history, ongoing problems, + * medications, allergies, and family history. This classification is used to filter and + * categorize clinical notes for display in the patient's cumulative profile. + * + * @param cmeIssue CaseManagementIssue object to evaluate for CPP classification + * @return boolean true if the issue's code is a CPP code, false otherwise + */ public boolean isCppCode(CaseManagementIssue cmeIssue) { return (CppCode.toStringList()).contains(cmeIssue.getIssue().getCode()); } + /** + * Retrieves issue IDs corresponding to specified CPP codes or default CPP codes. + * + * This method queries the issue database to find all issue entities that match the provided + * CPP codes, or defaults to the comprehensive CPP code list if no custom codes are specified. + * The returned issue IDs are used for filtering case management notes by specific clinical + * issue categories. This supports dynamic note filtering based on CPP classification and + * enables flexible retrieval of notes associated with specific clinical domains. + * + * @param newCppCodes String[] array of custom CPP code strings to query, or null to use default CPP codes + * @return String[] array of issue ID strings corresponding to the queried CPP codes + */ public String[] getIssueIds(String[] newCppCodes) { List issues = new ArrayList<>(); if (newCppCodes != null && newCppCodes.length > 0) { diff --git a/src/main/java/ca/openosp/openo/managers/ProfessionalSpecialistsManager.java b/src/main/java/ca/openosp/openo/managers/ProfessionalSpecialistsManager.java index fb8f1dcee48..9b61350164d 100644 --- a/src/main/java/ca/openosp/openo/managers/ProfessionalSpecialistsManager.java +++ b/src/main/java/ca/openosp/openo/managers/ProfessionalSpecialistsManager.java @@ -10,6 +10,30 @@ import java.io.Serializable; import java.util.List; +/** + * Service layer manager for professional specialist operations in the OpenO EMR system. + *

    + * This manager provides secure access to professional specialist data, including specialist + * physicians, consultants, and other healthcare professionals to whom patients may be referred. + * It enforces role-based access control through the consultation security object (_con) and + * coordinates between the web layer and data access layer. + *

    + *

    + * Professional specialists are healthcare providers external to the clinic who receive patient + * referrals. This includes specialists, consultants, laboratories, and other healthcare services. + * Each specialist record contains contact information, specialty type, and optional electronic + * data exchange configuration for automated referral processing. + *

    + *

    + * All operations require READ privilege on the consultation security object (_con) to protect + * sensitive healthcare provider information. + *

    + * + * @see ca.openosp.openo.commn.model.ProfessionalSpecialist + * @see ca.openosp.openo.commn.dao.ProfessionalSpecialistDao + * @see ca.openosp.openo.managers.SecurityInfoManager + * @since 2026-01-24 + */ @Service public class ProfessionalSpecialistsManager implements Serializable { @@ -19,10 +43,35 @@ public class ProfessionalSpecialistsManager implements Serializable { @Autowired private SecurityInfoManager securityInfoManager; + /** + * Default constructor for Spring dependency injection. + *

    + * The manager is instantiated by Spring and configured with required dependencies + * through autowired fields. + *

    + */ public ProfessionalSpecialistsManager() { // default } + /** + * Retrieves a professional specialist record by unique identifier. + *

    + * This method fetches a single professional specialist record from the database, + * enforcing security constraints to ensure only authorized users can access + * healthcare provider information. The specialist record includes contact details, + * specialty type, and any configured electronic data exchange settings. + *

    + * + * @param loggedInInfo LoggedInInfo the current user's session information containing + * provider credentials and security context + * @param id int the unique database identifier of the professional specialist + * @return ProfessionalSpecialist the specialist record with all associated data, + * or null if no specialist exists with the given identifier + * @throws RuntimeException if the current user lacks READ privilege on the + * consultation security object (_con) + * @see ca.openosp.openo.commn.model.ProfessionalSpecialist + */ public ProfessionalSpecialist getProfessionalSpecialist(LoggedInInfo loggedInInfo, int id) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_con", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_con)"); @@ -30,6 +79,32 @@ public ProfessionalSpecialist getProfessionalSpecialist(LoggedInInfo loggedInInf return professionalSpecialistDao.find(id); } + /** + * Searches for professional specialists matching a keyword query. + *

    + * This method performs a text search across professional specialist records, + * typically matching against name, specialty type, and annotation fields. + * Results are filtered by security constraints to ensure only authorized + * users can search healthcare provider information. + *

    + *

    + * The search is case-insensitive and may match partial strings across multiple + * fields including first name, last name, professional letters, specialty type, + * and annotations. Empty or null keywords may return all non-deleted specialists + * depending on the DAO implementation. + *

    + * + * @param loggedInInfo LoggedInInfo the current user's session information containing + * provider credentials and security context + * @param keyword String the search term to match against specialist records; may be + * null or empty to retrieve all specialists + * @return List<ProfessionalSpecialist> list of specialist records matching the + * search criteria, ordered by last name and first name; empty list if no + * matches found + * @throws RuntimeException if the current user lacks READ privilege on the + * consultation security object (_con) + * @see ca.openosp.openo.commn.dao.ProfessionalSpecialistDao#search(String) + */ public List searchProfessionalSpecialist(LoggedInInfo loggedInInfo, String keyword) { if (!securityInfoManager.hasPrivilege(loggedInInfo, "_con", SecurityInfoManager.READ, null)) { throw new RuntimeException("missing required sec object (_con)"); diff --git a/src/main/java/ca/openosp/openo/mds/data/ProviderData.java b/src/main/java/ca/openosp/openo/mds/data/ProviderData.java index 1855a3bb116..bb925cabf8d 100644 --- a/src/main/java/ca/openosp/openo/mds/data/ProviderData.java +++ b/src/main/java/ca/openosp/openo/mds/data/ProviderData.java @@ -27,9 +27,9 @@ import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.List; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.PMmodule.dao.ProviderDao; import ca.openosp.openo.commn.model.Provider; import ca.openosp.openo.utility.MiscUtils; @@ -81,7 +81,7 @@ public static ArrayList> getProviderList() { List residents = dao.getProvidersByType(ProviderDao.PR_TYPE_RESIDENT); providers.addAll(residents); - Collections.sort(providers, new BeanComparator("formattedName")); + Collections.sort(providers, Comparator.comparing(Provider::getFormattedName)); for (Provider p : providers) { ArrayList provider = new ArrayList(); provider.add(p.getProviderNo()); @@ -105,7 +105,7 @@ public static ArrayList> getProviderListWithLabNo() { ProviderDao dao = SpringUtils.getBean(ProviderDao.class); List providers = dao.getProvidersByTypeWithNonEmptyOhipNo(ProviderDao.PR_TYPE_DOCTOR); - Collections.sort(providers, new BeanComparator("formattedName")); + Collections.sort(providers, Comparator.comparing(Provider::getFormattedName)); for (Provider p : providers) { ArrayList provider = new ArrayList(); provider.add(p.getProviderNo()); diff --git a/src/main/java/ca/openosp/openo/messenger/config/data/MsgMessengerGroupData.java b/src/main/java/ca/openosp/openo/messenger/config/data/MsgMessengerGroupData.java index 6a34c2f8bb3..d08fa9c2dc9 100644 --- a/src/main/java/ca/openosp/openo/messenger/config/data/MsgMessengerGroupData.java +++ b/src/main/java/ca/openosp/openo/messenger/config/data/MsgMessengerGroupData.java @@ -26,12 +26,12 @@ package ca.openosp.openo.messenger.config.data; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Locale; import javax.servlet.jsp.JspWriter; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.PMmodule.dao.ProviderDao; import ca.openosp.openo.commn.dao.GroupMembersDao; import ca.openosp.openo.commn.dao.GroupsDao; @@ -208,7 +208,7 @@ public void printAllProvidersWithMembers(Locale locale, String grpNo, JspWriter ProviderDao dao = SpringUtils.getBean(ProviderDao.class); List ps = dao.getProviders(); // Sort providers by last name for display - Collections.sort(ps, new BeanComparator("lastName")); + Collections.sort(ps, Comparator.comparing(Provider::getLastName)); try { // Generate HTML table row for each provider for (Provider p : ps) { diff --git a/src/main/java/ca/openosp/openo/prescript/data/RxPrescriptionData.java b/src/main/java/ca/openosp/openo/prescript/data/RxPrescriptionData.java index 15ac34aeed8..4b7d25fe9b3 100644 --- a/src/main/java/ca/openosp/openo/prescript/data/RxPrescriptionData.java +++ b/src/main/java/ca/openosp/openo/prescript/data/RxPrescriptionData.java @@ -37,7 +37,6 @@ import ca.openosp.openo.utility.LoggedInInfo; import ca.openosp.openo.utility.MiscUtils; import ca.openosp.openo.utility.SpringUtils; -import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.logging.log4j.Logger; @@ -1658,13 +1657,12 @@ public boolean Save(String scriptId) { // clean up fields if (this.takeMin > this.takeMax) this.takeMax = this.takeMin; - if (getSpecial() == null || getSpecial().length() < 6) - logger.warn("drug special appears to be null or empty : " + getSpecial()); - - String escapedSpecial = StringEscapeUtils.escapeSql(this.getSpecial()); - - if (escapedSpecial == null || escapedSpecial.length() < 6) - logger.warn("drug special after escaping appears to be null or empty : " + escapedSpecial); + // Redact PHI - log only metadata (length), not prescription instructions + String specialValue = getSpecial(); + if (specialValue == null || specialValue.length() < 6) { + logger.warn("drug special appears to be null or empty (length={})", + specialValue == null ? 0 : specialValue.length()); + } DrugDao dao = SpringUtils.getBean(DrugDao.class); Drug drug = new Drug(); diff --git a/src/main/java/ca/openosp/openo/prescript/web/CopyFavorites2Action.java b/src/main/java/ca/openosp/openo/prescript/web/CopyFavorites2Action.java index 7b4f11f2939..2e2ab494955 100644 --- a/src/main/java/ca/openosp/openo/prescript/web/CopyFavorites2Action.java +++ b/src/main/java/ca/openosp/openo/prescript/web/CopyFavorites2Action.java @@ -24,7 +24,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanUtils; import org.apache.logging.log4j.Logger; import org.apache.struts2.ServletActionContext; import ca.openosp.openo.commn.dao.FavoritesDao; @@ -109,7 +109,7 @@ public String copy() { Favorites f = favoritesDao.find(id); Favorites copy = new Favorites(); try { - BeanUtils.copyProperties(copy, f); + BeanUtils.copyProperties(f, copy); copy.setProviderNo(providerNo); copy.setId(null); favoritesDao.persist(copy); diff --git a/src/main/java/ca/openosp/openo/provider/web/ProviderProperty2Action.java b/src/main/java/ca/openosp/openo/provider/web/ProviderProperty2Action.java index b5acbf3ffe2..0921c429a00 100644 --- a/src/main/java/ca/openosp/openo/provider/web/ProviderProperty2Action.java +++ b/src/main/java/ca/openosp/openo/provider/web/ProviderProperty2Action.java @@ -24,7 +24,7 @@ package ca.openosp.openo.provider.web; -import org.apache.commons.beanutils.BeanComparator; +import java.util.Comparator; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.Logger; @@ -1611,7 +1611,7 @@ public String viewLabRecall() { ProviderDao dao = SpringUtils.getBean(ProviderDao.class); List ps = dao.getProviders(); - Collections.sort(ps, new BeanComparator("lastName")); + Collections.sort(ps, Comparator.comparing(Provider::getLastName)); try { for (Provider p : ps) { if (!p.getProviderNo().equals("-1")) { @@ -1774,7 +1774,7 @@ public String viewTicklerTaskAssignee() { ProviderDao dao = SpringUtils.getBean(ProviderDao.class); List ps = dao.getProviders(); - Collections.sort(ps, new BeanComparator("lastName")); + Collections.sort(ps, Comparator.comparing(Provider::getLastName)); try { for (Provider p : ps) { if (!p.getProviderNo().equals("-1")) { @@ -2517,90 +2517,6 @@ public String savePreventionPrefs() { return "genPreventionPrefs"; } - - public String viewClinicalConnectPrefs() { - LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); - String providerNo = loggedInInfo.getLoggedInProviderNo(); - - UserProperty prop = loadProperty(providerNo, "clinicalConnectDisableCloseWindow"); - UserProperty prop2 = loadProperty(providerNo, "clinicalConnectDisableLogoutWarning"); - - if (prop == null) prop = new UserProperty(); - if (prop2 == null) prop2 = new UserProperty(); - - prop.setChecked("yes".equals(prop.getValue())); - prop2.setChecked("yes".equals(prop2.getValue())); - - request.setAttribute("clinicalConnectDisableCloseWindow", prop); - request.setAttribute("clinicalConnectDisableLogoutWarning", prop2); - - request.setAttribute("providertitle", "provider.clinicalConnectPrefs.title"); - request.setAttribute("providermsgPrefs", "provider.clinicalConnectPrefs.msgPrefs"); //=Preferences - request.setAttribute("providerbtnSubmit", "provider.clinicalConnectPrefs.btnSubmit"); //=Save - request.setAttribute("providerbtnCancel", "provider.clinicalConnectPrefs.btnCancel"); //=Cancel - request.setAttribute("method", "saveClinicalConnectPrefs"); - - this.setClinicalConnectDisableCloseWindow(prop); - this.setClinicalConnectDisableLogoutWarning(prop2); - - return "genClinicalConnectPrefs"; - } - - - public String saveClinicalConnectPrefs() { - String checkboxValue1 = request.getParameter("clinicalConnectDisableCloseWindow.checked"); - String checkboxValue2 = request.getParameter("clinicalConnectDisableLogoutWarning.checked"); - - LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); - String providerNo = loggedInInfo.getLoggedInProviderNo(); - - boolean checked1 = checkboxValue1 != null; - boolean checked2 = checkboxValue2 != null; - - String value1 = checked1 ? "yes" : "no"; - String value2 = checked2 ? "yes" : "no"; - - // Disable Close Window setting - UserProperty prop = this.userPropertyDAO.getProp(providerNo, UserProperty.CLINICALCONNECT_DISABLE_CLOSE_WINDOW); - if (prop == null) { - prop = new UserProperty(); - prop.setProviderNo(providerNo); - prop.setName(UserProperty.CLINICALCONNECT_DISABLE_CLOSE_WINDOW); - } - prop.setValue(value1); - this.userPropertyDAO.saveProp(prop); - - // Disable Logout Warning setting - UserProperty prop2 = this.userPropertyDAO.getProp(providerNo, UserProperty.CLINICALCONNECT_DISABLE_LOGOUT_WARNING); - if (prop2 == null) { - prop2 = new UserProperty(); - prop2.setProviderNo(providerNo); - prop2.setName(UserProperty.CLINICALCONNECT_DISABLE_LOGOUT_WARNING); - } - prop2.setValue(value2); - this.userPropertyDAO.saveProp(prop2); - - LogAction.addLog(loggedInInfo, "ClinicalConnectPreferences", "clinicalConnectDisableCloseWindow", "", null, value1); - LogAction.addLog(loggedInInfo, "ClinicalConnectPreferences", "clinicalConnectDisableLogoutWarning", "", null, value2); - - prop.setChecked(checked1); - prop2.setChecked(checked2); - - request.setAttribute("status", "success"); - request.setAttribute("clinicalConnectDisableCloseWindow", prop); - request.setAttribute("clinicalConnectDisableLogoutWarning", prop2); - - request.setAttribute("providertitle", "provider.clinicalConnectPrefs.title"); - request.setAttribute("providermsgPrefs", "provider.clinicalConnectPrefs.msgPrefs"); //=Preferences - request.setAttribute("providerbtnClose", "provider.clinicalConnectPrefs.btnClose"); //=Close - request.setAttribute("providermsgSuccess", "provider.clinicalConnectPrefs.msgSuccess"); - - request.setAttribute("method", "saveClinicalConnectPrefs"); - - return "genClinicalConnectPrefs"; - - } - public String viewLabMacroPrefs() { LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); String providerNo = loggedInInfo.getLoggedInProviderNo(); @@ -2776,8 +2692,6 @@ public void init() { methodMap.put("saveAppointmentCardPrefs", this::saveAppointmentCardPrefs); methodMap.put("viewPreventionPrefs", this::viewPreventionPrefs); methodMap.put("savePreventionPrefs", this::savePreventionPrefs); - methodMap.put("viewClinicalConnectPrefs", this::viewClinicalConnectPrefs); - methodMap.put("saveClinicalConnectPrefs", this::saveClinicalConnectPrefs); methodMap.put("viewLabMacroPrefs", this::viewLabMacroPrefs); methodMap.put("saveLabMacroPrefs", this::saveLabMacroPrefs); methodMap.put("viewHl7LabResultPrefs", this::viewHl7LabResultPrefs); @@ -2819,8 +2733,6 @@ public void init() { private UserProperty preventionSSOWarningProperty; private UserProperty preventionISPAWarningProperty; private UserProperty preventionNonISPAWarningProperty; - private UserProperty clinicalConnectDisableCloseWindow; - private UserProperty clinicalConnectDisableLogoutWarning; private UserProperty labMacroJSON; public UserProperty getDateProperty() { @@ -3098,22 +3010,6 @@ public void setPreventionNonISPAWarningProperty(UserProperty preventionNonISPAWa this.preventionNonISPAWarningProperty = preventionNonISPAWarningProperty; } - public UserProperty getClinicalConnectDisableCloseWindow() { - return clinicalConnectDisableCloseWindow; - } - - public void setClinicalConnectDisableCloseWindow(UserProperty clinicalConnectDisableCloseWindow) { - this.clinicalConnectDisableCloseWindow = clinicalConnectDisableCloseWindow; - } - - public UserProperty getClinicalConnectDisableLogoutWarning() { - return clinicalConnectDisableLogoutWarning; - } - - public void setClinicalConnectDisableLogoutWarning(UserProperty clinicalConnectDisableLogoutWarning) { - this.clinicalConnectDisableLogoutWarning = clinicalConnectDisableLogoutWarning; - } - public UserProperty getLabMacroJSON() { return labMacroJSON; } diff --git a/src/main/java/ca/openosp/openo/providers/bean/ProviderNameBeanHandler.java b/src/main/java/ca/openosp/openo/providers/bean/ProviderNameBeanHandler.java index 12f4b1fe1f5..4cb0eb90f43 100644 --- a/src/main/java/ca/openosp/openo/providers/bean/ProviderNameBeanHandler.java +++ b/src/main/java/ca/openosp/openo/providers/bean/ProviderNameBeanHandler.java @@ -27,10 +27,10 @@ import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Vector; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.PMmodule.dao.ProviderDao; import ca.openosp.openo.commn.dao.MyGroupDao; import ca.openosp.openo.commn.model.MyGroup; @@ -71,7 +71,7 @@ public Collection getDoctorNameVector() { public void setThisGroupProviderVector(String groupNo) { MyGroupDao dao = SpringUtils.getBean(MyGroupDao.class); List groups = dao.getGroupByGroupNo(groupNo); - Collections.sort(groups, new BeanComparator("firstName")); + Collections.sort(groups, Comparator.comparing(MyGroup::getFirstName)); for (MyGroup g : groups) { ProviderNameBean pNameBean = new ProviderNameBean(g.getLastName() + ", " + g.getFirstName(), g.getId().getProviderNo()); thisGroupProviderVector.add(pNameBean); diff --git a/src/main/java/ca/openosp/openo/report/data/RptLabReportData.java b/src/main/java/ca/openosp/openo/report/data/RptLabReportData.java index b8b7059dd7f..632baca6832 100644 --- a/src/main/java/ca/openosp/openo/report/data/RptLabReportData.java +++ b/src/main/java/ca/openosp/openo/report/data/RptLabReportData.java @@ -32,12 +32,12 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; import java.util.Hashtable; import java.util.List; import java.util.Map; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.PMmodule.dao.ProviderDao; import ca.openosp.openo.commn.dao.DemographicDao; import ca.openosp.openo.commn.dao.DocumentDao; @@ -73,7 +73,7 @@ public ArrayList providerList() { ProviderDao dao = SpringUtils.getBean(ProviderDao.class); List ps = dao.getProvidersByType(ProviderDao.PR_TYPE_DOCTOR); - Collections.sort(ps, new BeanComparator("lastName")); + Collections.sort(ps, Comparator.comparing(Provider::getLastName)); for (Provider p : ps) { ArrayList a = new ArrayList(); a.add(p.getProviderNo()); diff --git a/src/main/java/ca/openosp/openo/report/oscarMeasurements/pageUtil/RptMeasurementTypesBeanHandler.java b/src/main/java/ca/openosp/openo/report/oscarMeasurements/pageUtil/RptMeasurementTypesBeanHandler.java index 8959e595ef0..745ba626075 100644 --- a/src/main/java/ca/openosp/openo/report/oscarMeasurements/pageUtil/RptMeasurementTypesBeanHandler.java +++ b/src/main/java/ca/openosp/openo/report/oscarMeasurements/pageUtil/RptMeasurementTypesBeanHandler.java @@ -26,10 +26,10 @@ package ca.openosp.openo.report.oscarMeasurements.pageUtil; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Vector; -import org.apache.commons.beanutils.BeanComparator; import ca.openosp.openo.commn.dao.MeasurementGroupDao; import ca.openosp.openo.commn.dao.MeasurementTypeDao; import ca.openosp.openo.commn.model.MeasurementGroup; @@ -53,12 +53,12 @@ public boolean init(String groupName) { MeasurementGroupDao mgDao = SpringUtils.getBean(MeasurementGroupDao.class); MeasurementTypeDao mtDao = SpringUtils.getBean(MeasurementTypeDao.class); List groups = mgDao.findByName(groupName); - Collections.sort(groups, new BeanComparator("typeDisplayName")); + Collections.sort(groups, Comparator.comparing(MeasurementGroup::getTypeDisplayName)); for (MeasurementGroup g : groups) { String typeDisplayName = g.getTypeDisplayName(); List mts = mtDao.findByTypeDisplayName(typeDisplayName); - Collections.sort(mts, new BeanComparator("typeDescription")); + Collections.sort(mts, Comparator.comparing(MeasurementType::getTypeDescription)); for (MeasurementType mt : mts) { RptMeasurementTypesBean measurementTypes = new RptMeasurementTypesBean(mt.getId(), mt.getType(), mt.getTypeDisplayName(), mt.getTypeDescription(), mt.getMeasuringInstruction(), mt.getValidation()); measurementTypeVector.add(measurementTypes); diff --git a/src/main/java/ca/openosp/openo/report/reportByTemplate/ThirdApptTimeReporter.java b/src/main/java/ca/openosp/openo/report/reportByTemplate/ThirdApptTimeReporter.java index b30da580421..6cecf78259b 100644 --- a/src/main/java/ca/openosp/openo/report/reportByTemplate/ThirdApptTimeReporter.java +++ b/src/main/java/ca/openosp/openo/report/reportByTemplate/ThirdApptTimeReporter.java @@ -26,13 +26,12 @@ import java.util.Arrays; import java.util.Collections; +import java.util.Comparator; import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletRequest; -import org.apache.commons.beanutils.BeanComparator; -import org.apache.commons.collections.comparators.ReverseComparator; import ca.openosp.openo.commn.dao.OscarAppointmentDao; import ca.openosp.openo.commn.dao.ScheduleTemplateDao; import ca.openosp.openo.commn.model.Appointment; @@ -129,7 +128,7 @@ public boolean generateReport(HttpServletRequest request) { duration = dayMins / timecodes.length(); List appts = apptDao.findByProviderAndDayandNotStatus(st.getId().getProviderNo(), sd.getDate(), "C"); - Collections.sort(appts, new ReverseComparator(new BeanComparator("startTime"))); + Collections.sort(appts, Comparator.comparing(Appointment::getStartTime).reversed()); codePos = 0; latestApptHour = latestApptMin = 0; diff --git a/src/main/java/ca/openosp/openo/services/DemographicManager.java b/src/main/java/ca/openosp/openo/services/DemographicManager.java index 7190a7ba717..067ba9320bc 100644 --- a/src/main/java/ca/openosp/openo/services/DemographicManager.java +++ b/src/main/java/ca/openosp/openo/services/DemographicManager.java @@ -5,12 +5,69 @@ import java.util.List; +/** + * Service interface for managing patient demographic information in the OpenO EMR system. + * + *

    This interface provides core operations for accessing and retrieving patient demographic + * data, including individual patient records, demographic collections, and program enrollment + * information. Patient demographics form the foundation of the healthcare record system and + * include essential information such as patient identification, Health Insurance Number (HIN), + * contact details, and rostering status.

    + * + *

    The DemographicManager serves as a service layer abstraction over the data access layer, + * providing business logic and healthcare-specific operations for managing patient information + * in compliance with Canadian healthcare regulations (PIPEDA/HIPAA).

    + * + * @see ca.openosp.openo.commn.model.Demographic + * @see ca.openosp.openo.commn.dao.DemographicDao + * @since 2026-01-24 + */ public interface DemographicManager { + /** + * Retrieves a single patient demographic record by demographic number. + * + *

    This method fetches the complete demographic record for a patient identified + * by their unique demographic number. The demographic number is the primary identifier + * used throughout the OpenO EMR system for patient records.

    + * + * @param demographic_no String the unique demographic identifier for the patient + * @return Demographic the patient demographic record, or null if not found + */ Demographic getDemographic(String demographic_no); + /** + * Retrieves all demographic records in the system. + * + *

    This method returns a collection of all patient demographic records. Due to + * potential performance implications with large patient populations, use with caution + * and consider implementing pagination or filtering for production use.

    + * + * @return List list of all Demographic records in the system + */ List getDemographics(); + /** + * Retrieves all program identifiers associated with a specific patient. + * + *

    This method returns a list of program IDs that the patient is enrolled in, + * supporting OpenO's program management functionality for case management, community + * programs, and specialized healthcare initiatives.

    + * + * @param demoNo String the demographic number of the patient + * @return List list of Integer program IDs associated with the patient + */ List getProgramIdByDemoNo(String demoNo); + /** + * Retrieves demographic program enrollment records for a specific patient. + * + *

    This method returns detailed program enrollment information for a patient, + * including program assignments, enrollment dates, and program-specific data used + * in the PMmodule (Program Management module) for tracking patient participation + * in healthcare programs.

    + * + * @param demoNo Integer the demographic number of the patient + * @return List list of demographic program enrollment records + */ List getDemoProgram(Integer demoNo); } diff --git a/src/main/java/ca/openosp/openo/services/DemographicManagerImpl.java b/src/main/java/ca/openosp/openo/services/DemographicManagerImpl.java index 331a93c8832..fb246f200c6 100644 --- a/src/main/java/ca/openosp/openo/services/DemographicManagerImpl.java +++ b/src/main/java/ca/openosp/openo/services/DemographicManagerImpl.java @@ -7,30 +7,93 @@ import java.util.List; +/** + * Implementation of the DemographicManager service interface providing patient demographic management + * functionality within the OpenO EMR system. + * + *

    This service layer implementation delegates to {@link DemographicDao} for data access operations + * and provides transactional support for patient demographic data management. It handles patient record + * retrieval and program enrollment queries for healthcare providers across the EMR system.

    + * + *

    All methods in this class are transactional, ensuring data consistency when accessing patient + * health information (PHI) and maintaining HIPAA/PIPEDA compliance requirements.

    + * + * @since 2026-01-23 + * @see DemographicManager + * @see DemographicDao + * @see ca.openosp.openo.commn.model.Demographic + */ @Transactional public class DemographicManagerImpl implements DemographicManager { private DemographicDao demographicDao = null; + /** + * Sets the data access object for demographic operations. + * + *

    This setter method is used by Spring's dependency injection framework to inject + * the {@link DemographicDao} implementation at runtime.

    + * + * @param demographicDao {@link DemographicDao} the demographic data access object to use for database operations + */ public void setDemographicDao(DemographicDao demographicDao) { this.demographicDao = demographicDao; } + /** + * Retrieves a patient demographic record by their demographic number. + * + *

    The demographic number is the unique identifier for a patient within the OpenO EMR system. + * This method retrieves the complete patient record including personal information, contact details, + * health insurance number (HIN), and rostering status.

    + * + * @param demographic_no {@link String} the unique demographic identifier for the patient + * @return {@link Demographic} the patient demographic record, or null if no patient exists with the given number + */ @Override public Demographic getDemographic(String demographic_no) { return demographicDao.getDemographic(demographic_no); } + /** + * Retrieves all patient demographic records from the system. + * + *

    This method returns a complete list of all patient records in the EMR database. + * Use with caution as this can return a large dataset in production environments with + * extensive patient populations.

    + * + * @return {@link List} of {@link Demographic} objects representing all patients in the system + */ @Override public List getDemographics() { return demographicDao.getDemographics(); } + /** + * Retrieves program IDs associated with a specific patient demographic. + * + *

    This method returns all program identifiers that a patient is enrolled in within the + * OpenO EMR system. Programs may include case management programs, community health initiatives, + * or specialized care programs defined in the PMmodule.

    + * + * @param demoNo {@link String} the demographic number of the patient as a string + * @return {@link List} of program IDs (as Integer objects) associated with the patient + */ @Override public List getProgramIdByDemoNo(String demoNo) { return demographicDao.getProgramIdByDemoNo(Integer.parseInt(demoNo)); } + /** + * Retrieves program enrollment records for a specific patient demographic. + * + *

    This method returns detailed program enrollment information for a patient, including + * enrollment dates, program status, and associated metadata. The records include both active + * and historical program enrollments.

    + * + * @param demoNo {@link Integer} the demographic number of the patient + * @return {@link List} of program enrollment objects associated with the patient + */ @Override public List getDemoProgram(Integer demoNo) { return demographicDao.getDemoProgram(demoNo); diff --git a/src/main/java/ca/openosp/openo/util/BeanUtilHlp.java b/src/main/java/ca/openosp/openo/util/BeanUtilHlp.java index 727360e6831..59e993ff242 100644 --- a/src/main/java/ca/openosp/openo/util/BeanUtilHlp.java +++ b/src/main/java/ca/openosp/openo/util/BeanUtilHlp.java @@ -25,9 +25,8 @@ package ca.openosp.openo.util; -import java.lang.reflect.InvocationTargetException; - -import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.BeanWrapper; +import org.springframework.beans.BeanWrapperImpl; import ca.openosp.openo.utility.MiscUtils; /** @@ -53,12 +52,10 @@ public String getPropertyValue(Object bean, String fieldName) { String value = ""; try { - value = BeanUtils.getProperty(bean, fieldName); - } catch (NoSuchMethodException ex) { - MiscUtils.getLogger().error("Error", ex); - } catch (InvocationTargetException ex) { - MiscUtils.getLogger().error("Error", ex); - } catch (IllegalAccessException ex) { + BeanWrapper beanWrapper = new BeanWrapperImpl(bean); + Object propertyValue = beanWrapper.getPropertyValue(fieldName); + value = propertyValue != null ? propertyValue.toString() : "null"; + } catch (Exception ex) { MiscUtils.getLogger().error("Error", ex); } return value; diff --git a/src/main/java/ca/openosp/openo/util/Doc2PDF.java b/src/main/java/ca/openosp/openo/util/Doc2PDF.java index ed210b2075f..3992d307f5f 100644 --- a/src/main/java/ca/openosp/openo/util/Doc2PDF.java +++ b/src/main/java/ca/openosp/openo/util/Doc2PDF.java @@ -45,7 +45,9 @@ import org.apache.commons.codec.binary.Base64; import org.apache.logging.log4j.Logger; import ca.openosp.openo.utility.MiscUtils; -import org.w3c.tidy.Tidy; +import org.jsoup.Jsoup; +import org.jsoup.nodes.Entities; +import java.nio.charset.StandardCharsets; import com.itextpdf.text.Document; import com.itextpdf.text.PageSize; @@ -60,6 +62,31 @@ public class Doc2PDF { private static Logger logger = MiscUtils.getLogger(); + /** + * Configure Jsoup document for XHTML output compatible with iText XMLWorkerHelper. + * This ensures consistent HTML cleaning across all PDF conversion methods. + * + * @param doc The Jsoup document to configure + * @since 2026-01-29 + */ + private static void configureJsoupForXhtml(org.jsoup.nodes.Document doc) { + doc.outputSettings() + .syntax(org.jsoup.nodes.Document.OutputSettings.Syntax.xml) + .escapeMode(Entities.EscapeMode.xhtml) + .prettyPrint(false); // Critical: prevents whitespace issues in iText XML parser + } + + /** + * Parses JSP output to PDF and writes it to the HTTP response. + * Uses Jsoup for HTML parsing with UTF-8 encoding and XHTML output. + * + * @param request HttpServletRequest containing request context (protocol, host, port) + * @param response HttpServletResponse to write the PDF to (sets Content-Type: application/pdf) + * @param uri String URI of the JSP page to parse + * @param jsessionid String session ID for authentication + * @throws RuntimeException if PDF conversion fails + * @since 2026-01-29 + */ public static void parseJSP2PDF(HttpServletRequest request, HttpServletResponse response, String uri, String jsessionid) { try { @@ -67,16 +94,15 @@ public static void parseJSP2PDF(HttpServletRequest request, HttpServletResponse // step 2: // we create a writer that listens to the document // and directs a XML-stream to a file - Tidy tidy = new Tidy(); - tidy.setXHTML(true); - BufferedInputStream in = GetInputFromURI(jsessionid, uri); - ByteArrayOutputStream tidyout = new ByteArrayOutputStream(); - tidy.parse(in, tidyout); + // Parse directly from InputStream with UTF-8 encoding and base URI + org.jsoup.nodes.Document doc = Jsoup.parse(in, StandardCharsets.UTF_8.name(), uri); + configureJsoupForXhtml(doc); - MiscUtils.getLogger().debug(tidyout.toString()); - String documentTxt = AddAbsoluteTag(request, tidyout.toString(), uri); + String cleanHtml = doc.html(); + MiscUtils.getLogger().debug("Parsed HTML content, length: {} chars", cleanHtml.length()); + String documentTxt = AddAbsoluteTag(request, cleanHtml, uri); PrintPDFFromHTMLString(response, documentTxt); @@ -152,6 +178,16 @@ public static void HTMLDOC(HttpServletRequest request, HttpServletResponse respo return; } + /** + * Converts an HTML string to PDF and writes it to the HTTP response. + * Uses Jsoup for HTML parsing with UTF-8 encoding and XHTML output. + * + * @param request HttpServletRequest containing request context (protocol, host, port) + * @param response HttpServletResponse to write the PDF to (sets Content-Type: application/pdf) + * @param docText String containing the HTML content to convert + * @throws RuntimeException if PDF conversion fails + * @since 2026-01-29 + */ public static void parseString2PDF(HttpServletRequest request, HttpServletResponse response, String docText) { try { @@ -159,15 +195,13 @@ public static void parseString2PDF(HttpServletRequest request, HttpServletRespon // step 2: // we create a writer that listens to the document // and directs a XML-stream to a file - Tidy tidy = new Tidy(); - tidy.setXHTML(true); + // Parse and clean HTML with Jsoup (handles UTF-8 internally) + org.jsoup.nodes.Document doc = Jsoup.parse(docText); + configureJsoupForXhtml(doc); - BufferedInputStream in = new BufferedInputStream(new ByteArrayInputStream(docText.getBytes())); - ByteArrayOutputStream tidyout = new ByteArrayOutputStream(); + String cleanHtml = doc.html(); - tidy.parse(in, tidyout); - - PrintPDFFromHTMLString(response, AddAbsoluteTag(request, tidyout.toString(), "")); + PrintPDFFromHTMLString(response, AddAbsoluteTag(request, cleanHtml, "")); } catch (Exception e) { logger.error("Unexpected error", e); @@ -175,6 +209,16 @@ public static void parseString2PDF(HttpServletRequest request, HttpServletRespon } + /** + * Converts an HTML string to binary PDF format (Base64-encoded). + * Uses Jsoup for HTML parsing with UTF-8 encoding and XHTML output. + * + * @param request HttpServletRequest containing request context (protocol, host, port) + * @param response HttpServletResponse (not used but maintained for API compatibility) + * @param docText String containing the HTML content to convert + * @return String Base64-encoded PDF binary data, or null if conversion fails + * @since 2026-01-29 + */ public static String parseString2Bin(HttpServletRequest request, HttpServletResponse response, String docText) { try { @@ -182,15 +226,13 @@ public static String parseString2Bin(HttpServletRequest request, HttpServletResp // step 2: // we create a writer that listens to the document // and directs a XML-stream to a file - Tidy tidy = new Tidy(); - tidy.setXHTML(true); - - BufferedInputStream in = new BufferedInputStream(new ByteArrayInputStream(docText.getBytes())); - ByteArrayOutputStream tidyout = new ByteArrayOutputStream(); + // Parse and clean HTML with Jsoup (handles UTF-8 internally) + org.jsoup.nodes.Document doc = Jsoup.parse(docText); + configureJsoupForXhtml(doc); - tidy.parse(in, tidyout); + String cleanHtml = doc.html(); - String testFile = GetPDFBin(response, AddAbsoluteTag(request, tidyout.toString(), "")); + String testFile = GetPDFBin(response, AddAbsoluteTag(request, cleanHtml, "")); return testFile; @@ -244,7 +286,7 @@ public static String GetPDFBin(HttpServletResponse response, String docText) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PdfWriter writer = PdfWriter.getInstance(document, baos); document.open(); - InputStream is = new ByteArrayInputStream(docText.getBytes()); + InputStream is = new ByteArrayInputStream(docText.getBytes(StandardCharsets.UTF_8)); XMLWorkerHelper.getInstance().parseXHtml(writer, document, is); document.close(); return (new String(Base64.encodeBase64(baos.toByteArray()))); @@ -261,7 +303,7 @@ public static void PrintPDFFromBin(HttpServletResponse response, String docBin) try { - byte[] binDecodedArray = Base64.decodeBase64(docBin.getBytes()); + byte[] binDecodedArray = Base64.decodeBase64(docBin.getBytes(StandardCharsets.UTF_8)); PrintPDFFromBytes(response, binDecodedArray); return; @@ -310,7 +352,7 @@ public static void PrintPDFFromHTMLString(HttpServletResponse response, String d ByteArrayOutputStream baos = new ByteArrayOutputStream(); PdfWriter writer = PdfWriter.getInstance(document, baos); document.open(); - InputStream is = new ByteArrayInputStream(docText.getBytes()); + InputStream is = new ByteArrayInputStream(docText.getBytes(StandardCharsets.UTF_8)); XMLWorkerHelper.getInstance().parseXHtml(writer, document, is); document.close(); byte[] binArray = baos.toByteArray(); diff --git a/src/main/java/ca/openosp/openo/util/JDBCUtil.java b/src/main/java/ca/openosp/openo/util/JDBCUtil.java index b58fbfd046d..c518c96b562 100644 --- a/src/main/java/ca/openosp/openo/util/JDBCUtil.java +++ b/src/main/java/ca/openosp/openo/util/JDBCUtil.java @@ -43,7 +43,6 @@ import ca.openosp.Misc; import org.apache.commons.text.StringEscapeUtils; -import org.apache.xerces.parsers.DOMParser; import ca.openosp.openo.utility.MiscUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -108,7 +107,6 @@ public static void saveAsXML(Document doc, String fileName) { public static void toDataBase(InputStream inputStream, String fileName) { boolean validation = true; - DOMParser parser = new DOMParser(); Document doc; try { @@ -136,9 +134,15 @@ public static void toDataBase(InputStream inputStream, String fileName) { rs = DBHandler.GetSQL(sql, true); rs.moveToInsertRow(); //To validate or not - parser.setFeature("http://xml.org/sax/features/validation", validation); - parser.parse(source); - doc = parser.getDocument(); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); + factory.setFeature("http://xml.org/sax/features/external-general-entities", false); + factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); + factory.setXIncludeAware(false); + factory.setExpandEntityReferences(false); + factory.setValidating(validation); + DocumentBuilder builder = factory.newDocumentBuilder(); + doc = builder.parse(source); rs = toResultSet(doc, rs); rs.insertRow(); } diff --git a/src/main/java/ca/openosp/openo/utility/ContextStartupListener.java b/src/main/java/ca/openosp/openo/utility/ContextStartupListener.java index 4244395026b..7b191242f60 100644 --- a/src/main/java/ca/openosp/openo/utility/ContextStartupListener.java +++ b/src/main/java/ca/openosp/openo/utility/ContextStartupListener.java @@ -40,8 +40,6 @@ import ca.openosp.openo.commn.jobs.OscarJobUtils; import ca.openosp.openo.hospitalReportManager.HRMFixMissingReportHelper; import ca.openosp.openo.integration.mcedt.mailbox.CidPrefixResourceResolver; -import org.quartz.SchedulerException; -import org.quartz.impl.StdSchedulerFactory; import ca.openosp.openo.daos.security.SecroleDao; import ca.openosp.OscarProperties; @@ -181,11 +179,6 @@ public void contextDestroyed(javax.servlet.ServletContextEvent sce) { CaisiIntegratorUpdateTask.stopTask(); - try { - StdSchedulerFactory.getDefaultScheduler().shutdown(); - } catch (SchedulerException e) { - logger.error("Error", e); - } try { MiscUtils.checkShutdownSignaled(); MiscUtils.deregisterShutdownHook(); diff --git a/src/main/java/ca/openosp/openo/utility/CxfClientUtilsOld.java b/src/main/java/ca/openosp/openo/utility/CxfClientUtilsOld.java index 38a8a1aa2a4..aa1553bcde5 100644 --- a/src/main/java/ca/openosp/openo/utility/CxfClientUtilsOld.java +++ b/src/main/java/ca/openosp/openo/utility/CxfClientUtilsOld.java @@ -42,8 +42,8 @@ import org.apache.cxf.endpoint.Client; import org.apache.cxf.endpoint.Endpoint; import org.apache.cxf.frontend.ClientProxy; -import org.apache.cxf.interceptor.LoggingInInterceptor; -import org.apache.cxf.interceptor.LoggingOutInterceptor; +import org.apache.cxf.ext.logging.LoggingInInterceptor; +import org.apache.cxf.ext.logging.LoggingOutInterceptor; import org.apache.cxf.service.factory.ServiceConstructionException; import org.apache.cxf.transport.common.gzip.GZIPFeature; import org.apache.cxf.transport.common.gzip.GZIPInInterceptor; diff --git a/src/main/java/ca/openosp/openo/utility/OscarTrackingBasicDataSource.java b/src/main/java/ca/openosp/openo/utility/OscarTrackingBasicDataSource.java index 3314085ae28..44722f28270 100644 --- a/src/main/java/ca/openosp/openo/utility/OscarTrackingBasicDataSource.java +++ b/src/main/java/ca/openosp/openo/utility/OscarTrackingBasicDataSource.java @@ -49,7 +49,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.dbcp.BasicDataSource; +import org.apache.commons.dbcp2.BasicDataSource; import org.apache.logging.log4j.Logger; public class OscarTrackingBasicDataSource extends BasicDataSource { diff --git a/src/main/java/ca/openosp/openo/utility/PasswordHash.java b/src/main/java/ca/openosp/openo/utility/PasswordHash.java index 5e3c1c2fa5a..185e95e3261 100644 --- a/src/main/java/ca/openosp/openo/utility/PasswordHash.java +++ b/src/main/java/ca/openosp/openo/utility/PasswordHash.java @@ -33,52 +33,187 @@ import java.security.spec.InvalidKeySpecException; import java.util.Base64; -/* - * PBKDF2 salted password hashing. - * Author: havoc AT defuse.ca - * www: http://crackstation.net/hashing-security.htm +/** + * PBKDF2 (Password-Based Key Derivation Function 2) salted password hashing utility + * for secure password storage in healthcare provider authentication systems. + * + *

    This class provides cryptographically secure password hashing and verification + * using PBKDF2 with HMAC-SHA1 algorithm. It implements industry best practices for + * password storage by using:

    + *
      + *
    • Cryptographic salting with SecureRandom to prevent rainbow table attacks
    • + *
    • Configurable iteration count (default 64,000) to slow down brute force attacks
    • + *
    • Constant-time comparison to prevent timing attacks
    • + *
    • Base64 encoding for safe storage in databases
    • + *
    + * + *

    The hash format is: {@code algorithm:iterations:hashSize:salt:hash}

    + * + *

    Healthcare Context: This utility is critical for protecting + * healthcare provider credentials in compliance with HIPAA/PIPEDA security requirements. + * All passwords must be securely hashed before storage, and verification must use + * constant-time comparison to prevent timing-based attacks that could expose + * sensitive authentication information.

    + * + *

    Security Note: Never log, display, or transmit passwords or + * password hashes in plain text. Always use the provided methods for hash creation + * and verification.

    + * + *

    Based on reference implementation from crackstation.net/hashing-security.htm

    + * + * @see ca.openosp.openo.managers.SecurityInfoManager + * @see ca.openosp.openo.utility.LoggedInInfo + * @since 2026-01-23 */ public class PasswordHash { + /** + * Exception thrown when a password hash is invalid or malformed. + * + *

    This exception indicates that the provided hash string does not conform + * to the expected format (algorithm:iterations:hashSize:salt:hash) or contains + * invalid data such as corrupted Base64 encoding or incorrect field counts.

    + * + * @since 2026-01-23 + */ static public class InvalidHashException extends Exception { + /** + * Constructs a new InvalidHashException with the specified detail message. + * + * @param message String the detail message explaining why the hash is invalid + */ public InvalidHashException(String message) { super(message); } + + /** + * Constructs a new InvalidHashException with the specified detail message and cause. + * + * @param message String the detail message explaining why the hash is invalid + * @param source Throwable the cause of this exception (e.g., Base64 decoding exception) + */ public InvalidHashException(String message, Throwable source) { super(message, source); } } + /** + * Exception thrown when a password hashing operation cannot be performed. + * + *

    This exception indicates a system-level failure such as an unsupported + * cryptographic algorithm, invalid key specification, or other operational + * errors that prevent password hashing or verification from completing.

    + * + * @since 2026-01-23 + */ static public class CannotPerformOperationException extends Exception { + /** + * Constructs a new CannotPerformOperationException with the specified detail message. + * + * @param message String the detail message explaining why the operation failed + */ public CannotPerformOperationException(String message) { super(message); } + + /** + * Constructs a new CannotPerformOperationException with the specified detail message and cause. + * + * @param message String the detail message explaining why the operation failed + * @param source Throwable the cause of this exception (e.g., NoSuchAlgorithmException) + */ public CannotPerformOperationException(String message, Throwable source) { super(message, source); } } + /** + * The PBKDF2 algorithm identifier used for password hashing. + * + *

    Note: This constant is set to "PBKDF2WithHmacSHA2" which is not a valid + * Java algorithm name and will cause a NoSuchAlgorithmException at runtime. The actual + * implementation uses PBKDF2 with HMAC-SHA1 (indicated by the "sha1" algorithm identifier + * in the hash format at line 248 and verified at line 322). This is a known bug that will + * be fixed in a future PR to use a valid algorithm name such as "PBKDF2WithHmacSHA1" or + * upgrade to "PBKDF2WithHmacSHA256".

    + * + * @see #createHash(char[]) + * @see #verifyPassword(char[], String) + */ public static final String PBKDF2_ALGORITHM = "PBKDF2WithHmacSHA2"; - // These constants may be changed without breaking existing hashes. + /** + * Size of the cryptographic salt in bytes (24 bytes = 192 bits). + * This constant may be changed without breaking existing hashes. + */ public static final int SALT_BYTE_SIZE = 24; + + /** + * Size of the resulting hash in bytes (18 bytes = 144 bits). + * This constant may be changed without breaking existing hashes. + */ public static final int HASH_BYTE_SIZE = 18; + + /** + * Number of PBKDF2 iterations (64,000). + * Higher iteration counts increase security but also increase computation time. + * This constant may be changed without breaking existing hashes. + */ public static final int PBKDF2_ITERATIONS = 64000; - // These constants define the encoding and may not be changed. + /** + * Number of fields in the hash string format (5 sections). + * This constant defines the encoding format and must not be changed. + */ public static final int HASH_SECTIONS = 5; + + /** + * Index of the algorithm field in the hash string (position 0). + * This constant defines the encoding format and must not be changed. + */ public static final int HASH_ALGORITHM_INDEX = 0; + + /** + * Index of the iteration count field in the hash string (position 1). + * This constant defines the encoding format and must not be changed. + */ public static final int ITERATION_INDEX = 1; + + /** + * Index of the hash size field in the hash string (position 2). + * This constant defines the encoding format and must not be changed. + */ public static final int HASH_SIZE_INDEX = 2; + + /** + * Index of the salt field in the hash string (position 3). + * This constant defines the encoding format and must not be changed. + */ public static final int SALT_INDEX = 3; + + /** + * Index of the PBKDF2 hash field in the hash string (position 4). + * This constant defines the encoding format and must not be changed. + */ public static final int PBKDF2_INDEX = 4; /** - * Returns a salted PBKDF2 hash of the password. + * Creates a salted PBKDF2 hash of the password for secure storage. * - * @param password the password to hash - * @return a salted PBKDF2 hash of the password + *

    This method converts the password string to a character array and delegates + * to {@link #createHash(char[])} for hash generation. The returned hash includes + * all necessary parameters (algorithm, iterations, salt) for later verification.

    + * + *

    Healthcare Security: Use this method when storing healthcare + * provider passwords. Never store passwords in plain text. The generated hash is + * safe to store in the database.

    + * + * @param password String the password to hash (will be converted to char array internally) + * @return String a salted PBKDF2 hash in the format "algorithm:iterations:hashSize:salt:hash" + * @throws CannotPerformOperationException if the PBKDF2 algorithm is not supported or key generation fails + * @see #createHash(char[]) + * @see #verifyPassword(String, String) */ public static String createHash(String password) throws CannotPerformOperationException @@ -87,10 +222,25 @@ public static String createHash(String password) } /** - * Returns a salted PBKDF2 hash of the password. + * Creates a salted PBKDF2 hash of the password using a character array. + * + *

    This is the core hash creation method. It:

    + *
      + *
    1. Generates a cryptographically secure random salt using SecureRandom
    2. + *
    3. Applies PBKDF2 with HMAC-SHA1 using the configured iteration count
    4. + *
    5. Encodes the salt and hash using Base64 for safe database storage
    6. + *
    7. Returns a formatted string containing all parameters needed for verification
    8. + *
    * - * @param password a character array of the password to hash - * @return a salted PBKDF2 hash of the password + *

    The character array parameter is preferred over String for security-sensitive + * applications as it allows the password to be cleared from memory after use.

    + * + * @param password char[] a character array containing the password to hash + * @return String a salted PBKDF2 hash in the format "algorithm:iterations:hashSize:salt:hash" + * (currently algorithm is "sha1" as seen at line 248) + * @throws CannotPerformOperationException if the PBKDF2 algorithm is not supported or key generation fails + * @see #createHash(String) + * @see #verifyPassword(char[], String) */ public static String createHash(char[] password) throws CannotPerformOperationException @@ -116,11 +266,23 @@ public static String createHash(char[] password) } /** - * Validates a password using a hash. + * Verifies a password against a stored hash for authentication purposes. + * + *

    This method converts the password string to a character array and delegates + * to {@link #verifyPassword(char[], String)} for verification. The verification + * uses constant-time comparison to prevent timing attacks.

    + * + *

    Healthcare Security: Use this method when authenticating + * healthcare providers. The constant-time comparison prevents attackers from + * using timing differences to extract password information.

    * - * @param password the password to check - * @param correctHash the hash of the valid password - * @return true if the password is correct, false if not + * @param password String the password to verify + * @param correctHash String the stored hash to verify against (in format "algorithm:iterations:hashSize:salt:hash") + * @return boolean true if the password matches the hash, false otherwise + * @throws CannotPerformOperationException if the hash uses an unsupported algorithm or key generation fails + * @throws InvalidHashException if the hash format is invalid or contains corrupted data + * @see #verifyPassword(char[], String) + * @see #createHash(String) */ public static boolean verifyPassword(String password, String correctHash) throws CannotPerformOperationException, InvalidHashException @@ -129,11 +291,31 @@ public static boolean verifyPassword(String password, String correctHash) } /** - * Validates a hashed password character array. + * Verifies a password character array against a stored hash using constant-time comparison. + * + *

    This is the core verification method. It:

    + *
      + *
    1. Parses the hash string to extract algorithm, iterations, salt, and expected hash
    2. + *
    3. Validates the hash format and parameters
    4. + *
    5. Recomputes the hash using the same salt and iterations
    6. + *
    7. Compares the hashes using constant-time comparison to prevent timing attacks
    8. + *
    + * + *

    The character array parameter is preferred over String for security-sensitive + * applications as it allows the password to be cleared from memory after use.

    + * + *

    Security Note: The constant-time comparison (via {@link #slowEquals(byte[], byte[])}) + * is critical for preventing timing attacks that could be used to extract password information + * in online authentication systems.

    * - * @param password the password to check as a character array - * @param correctHash the hash of the valid password - * @return true if the password is correct, false if not + * @param password char[] the password to verify as a character array + * @param correctHash String the stored hash to verify against (in format "algorithm:iterations:hashSize:salt:hash") + * @return boolean true if the password matches the hash, false otherwise + * @throws CannotPerformOperationException if the hash uses an unsupported algorithm (currently only SHA1 is supported) + * @throws InvalidHashException if the hash format is invalid, missing fields, has corrupted Base64 encoding, or invalid parameters + * @see #verifyPassword(String, String) + * @see #createHash(char[]) + * @see #slowEquals(byte[], byte[]) */ public static boolean verifyPassword(char[] password, String correctHash) throws CannotPerformOperationException, InvalidHashException diff --git a/src/main/java/ca/openosp/openo/utility/QrCodeUtils.java b/src/main/java/ca/openosp/openo/utility/QrCodeUtils.java index 75776ce5201..e6865415b33 100644 --- a/src/main/java/ca/openosp/openo/utility/QrCodeUtils.java +++ b/src/main/java/ca/openosp/openo/utility/QrCodeUtils.java @@ -26,11 +26,13 @@ package ca.openosp.openo.utility; +import com.google.zxing.BarcodeFormat; +import com.google.zxing.EncodeHintType; import com.google.zxing.WriterException; import com.google.zxing.client.j2se.MatrixToImageWriter; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.qrcode.QRCodeWriter; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import com.google.zxing.qrcode.encoder.Encoder; -import com.google.zxing.qrcode.encoder.QRCode; import org.apache.logging.log4j.Logger; import javax.imageio.IIOImage; @@ -43,7 +45,9 @@ import java.awt.image.BufferedImage; import java.io.*; import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; +import java.util.Map; public class QrCodeUtils { @@ -95,10 +99,16 @@ public static byte[] toMultipleQrCodePngs(String s, ErrorCorrectionLevel ec, QrC } public static BufferedImage toSingleQrCodeBufferedImage(String s, ErrorCorrectionLevel ec, int scaleFactor) throws WriterException { - QRCode qrCode = new QRCode(); - Encoder.encode(s, ec, qrCode); + // Use QRCodeWriter with hints for error correction level + Map hints = new HashMap<>(); + hints.put(EncodeHintType.ERROR_CORRECTION, ec); - BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(qrCode.getMatrix()); + QRCodeWriter qrCodeWriter = new QRCodeWriter(); + // Use a base size that will be scaled + int baseSize = 100; + BitMatrix bitMatrix = qrCodeWriter.encode(s, BarcodeFormat.QR_CODE, baseSize, baseSize, hints); + + BufferedImage bufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix); if (scaleFactor != 1) { int newWidth = bufferedImage.getWidth() * scaleFactor; diff --git a/src/main/java/ca/openosp/openo/webserv/rest/PersonaService.java b/src/main/java/ca/openosp/openo/webserv/rest/PersonaService.java index a025539dd92..caf88d371be 100644 --- a/src/main/java/ca/openosp/openo/webserv/rest/PersonaService.java +++ b/src/main/java/ca/openosp/openo/webserv/rest/PersonaService.java @@ -71,7 +71,6 @@ import ca.openosp.openo.webserv.rest.to.model.NavBarMenuTo1; import ca.openosp.openo.webserv.rest.to.model.PatientListConfigTo1; import ca.openosp.openo.webserv.rest.to.model.ProgramProviderTo1; -import ca.openosp.openo.webserv.rest.util.ClinicalConnectUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -252,11 +251,6 @@ public NavbarResponse getMyNavbar() { .add(idCounter++, bundle.getString("navbar.menu.documents"), null, "../documentManager/documentReport.jsp?function=providers&functionid=" + provider.getPractitionerNo(), "edocView"); - if (ClinicalConnectUtil.isReady(provider.getProviderNo())) { - moreMenuList.add(idCounter++, bundle.getString("navbar.menu.clinicalconnect"), null, "../commons/ClinicalConnectRedirect.jsp", "clinicalconnect"); - } - - List dashboards = dashboardManager.getDashboards(getLoggedInInfo()); if (dashboards != null) { diff --git a/src/main/java/ca/openosp/openo/webserv/rest/RecordUxService.java b/src/main/java/ca/openosp/openo/webserv/rest/RecordUxService.java index aa2b408d0ad..708b0115255 100644 --- a/src/main/java/ca/openosp/openo/webserv/rest/RecordUxService.java +++ b/src/main/java/ca/openosp/openo/webserv/rest/RecordUxService.java @@ -64,7 +64,6 @@ import ca.openosp.openo.webserv.rest.to.model.EncounterTemplateTo1; import ca.openosp.openo.webserv.rest.to.model.MenuItemTo1; import ca.openosp.openo.webserv.rest.to.model.SummaryTo1; -import ca.openosp.openo.webserv.rest.util.ClinicalConnectUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -212,14 +211,6 @@ public List getRecordMenu(@PathParam("demographicNo") Integer demog morelist.add(new MenuItemTo1(idCounter++, "DS Guidelines", "../oscarEncounter/decisionSupport/guidelineAction.do?method=list&provider_no=" + loggedInInfo.getLoggedInProviderNo() + "&demographic_no=" + demographicNo)); } - if (securityInfoManager.hasPrivilege(loggedInInfo, "_demographic", "r", null)) { - if (ClinicalConnectUtil.isReady(loggedInInfo.getLoggedInProviderNo())) { - //Launch ClinicalConnect and open patient record - String url = ClinicalConnectUtil.getLaunchURL(loggedInInfo, demographicNo.toString()); - morelist.add(new MenuItemTo1(idCounter++, "Launch ClinicalConnect", url)); - } - } - /*measurements,Measurements Episodes Pregnancies diff --git a/src/main/java/ca/openosp/openo/webserv/rest/ResourceService.java b/src/main/java/ca/openosp/openo/webserv/rest/ResourceService.java index 40d4c79f585..0382fa35288 100644 --- a/src/main/java/ca/openosp/openo/webserv/rest/ResourceService.java +++ b/src/main/java/ca/openosp/openo/webserv/rest/ResourceService.java @@ -44,7 +44,6 @@ import ca.openosp.openo.managers.SecurityInfoManager; import ca.openosp.openo.utility.LoggedInInfo; import ca.openosp.openo.utility.MiscUtils; -import ca.openosp.openo.webserv.rest.util.ClinicalConnectUtil; import org.springframework.beans.factory.annotation.Autowired; import ca.openosp.OscarProperties; @@ -118,18 +117,4 @@ public String getCurrentLuCodesVersion() { } return bundle.getString("lucodes.currentrules.default"); } - - - - @GET - @Path("/clinicalconnect") - @Produces("text/plain") - public String launchClinicalConnect(@Context HttpServletRequest request) { - LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); - - if (ClinicalConnectUtil.isReady(loggedInInfo.getLoggedInProviderNo())) - return ClinicalConnectUtil.getLaunchURL(loggedInInfo, null); - else - return null; - } } \ No newline at end of file diff --git a/src/main/java/ca/openosp/openo/webserv/rest/util/ClinicalConnectUtil.java b/src/main/java/ca/openosp/openo/webserv/rest/util/ClinicalConnectUtil.java deleted file mode 100644 index c48ee1b6174..00000000000 --- a/src/main/java/ca/openosp/openo/webserv/rest/util/ClinicalConnectUtil.java +++ /dev/null @@ -1,212 +0,0 @@ -//CHECKSTYLE:OFF -/** - * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - * This software is published under the GPL GNU General Public License. - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - *

    - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

    - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *

    - * This software was written for the - * Department of Family Medicine - * McMaster University - * Hamilton - * Ontario, Canada - */ -package ca.openosp.openo.webserv.rest.util; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.security.Key; -import java.security.NoSuchAlgorithmException; -import java.util.Base64; - -import javax.crypto.Cipher; -import javax.crypto.KeyGenerator; -import javax.crypto.SecretKey; -import javax.crypto.spec.SecretKeySpec; - -import org.apache.logging.log4j.Logger; - -import ca.openosp.openo.commn.dao.DemographicDao; -import ca.openosp.openo.commn.dao.UserPropertyDAO; -import ca.openosp.openo.commn.model.Demographic; -import ca.openosp.openo.commn.model.UserProperty; -import ca.openosp.openo.integration.clinicalconnect.ClinicalConnectSSO; -import ca.openosp.openo.utility.LoggedInInfo; -import ca.openosp.openo.utility.MiscUtils; -import ca.openosp.openo.utility.SpringUtils; - -import ca.openosp.OscarProperties; -import ca.openosp.openo.log.LogAction; - -public class ClinicalConnectUtil { - private static Logger logger = MiscUtils.getLogger(); - private static UserPropertyDAO userPropertyDao = SpringUtils.getBean(UserPropertyDAO.class); - private static DemographicDao demographicDao = SpringUtils.getBean(DemographicDao.class); - private static SecretKey secretKey = null; - - public static boolean isReady(String providerNo) { - String cr = getServiceUserName(); - if (cr != null && !cr.trim().isEmpty()) cr = getServicePassword(); - else return false; - if (cr != null && !cr.trim().isEmpty()) cr = getServiceLocation(); - else return false; - if (cr != null && !cr.trim().isEmpty()) cr = getUsername(providerNo); - else return false; - if (cr != null && !cr.trim().isEmpty()) cr = getAuthType(providerNo); - else return false; - - return true; - } - - public static String getLaunchURL(LoggedInInfo loggedInInfo, String demographicNo) { - String providerNo = loggedInInfo.getLoggedInProviderNo(); - String patientHCN = null; - - if (demographicNo != null) { - Demographic demo = demographicDao.getDemographic(demographicNo); - patientHCN = demo.getHin(); - LogAction.addLog(loggedInInfo, "Sent to ClinicalConnect", "Patient HCN", patientHCN, demographicNo, null); - } - return ClinicalConnectSSO.getLaunchURL(getServiceUserName(), getServicePassword(), getServiceLocation(), getUsername(providerNo), getAuthType(providerNo), patientHCN); - } - - public static String getServiceUserName() { - UserProperty prop = userPropertyDao.getProp(UserProperty.CLINICALCONNECT_SERVICE_USERNAME); - if (prop != null) return decryptAes(getAesEncryptionKey(), prop.getValue()); - else return null; - } - - public static String getServicePassword() { - UserProperty prop = userPropertyDao.getProp(UserProperty.CLINICALCONNECT_SERVICE_PASSWORD); - if (prop != null) return decryptAes(getAesEncryptionKey(), prop.getValue()); - else return null; - } - - public static String getServiceLocation() { - UserProperty prop = userPropertyDao.getProp(UserProperty.CLINICALCONNECT_SERVICE_LOCATION); - if (prop != null) return prop.getValue(); - else return null; - } - - public static void saveServiceUsername(String serviceUserName) { - userPropertyDao.saveProp(UserProperty.CLINICALCONNECT_SERVICE_USERNAME, encryptAes(getAesEncryptionKey(), serviceUserName)); - } - - public static void saveServicePassword(String servicePassword) { - userPropertyDao.saveProp(UserProperty.CLINICALCONNECT_SERVICE_PASSWORD, encryptAes(getAesEncryptionKey(), servicePassword)); - } - - public static void saveServiceLocation(String serviceLocation) { - userPropertyDao.saveProp(UserProperty.CLINICALCONNECT_SERVICE_LOCATION, serviceLocation); - } - - -//--- private methods ---// - - private static String getUsername(String providerNo) { - UserProperty prop = userPropertyDao.getProp(providerNo, UserProperty.CLINICALCONNECT_ID); - if (prop != null) return prop.getValue(); - else return null; - } - - private static String getAuthType(String providerNo) { - UserProperty prop = userPropertyDao.getProp(providerNo, UserProperty.CLINICALCONNECT_TYPE); - if (prop != null) return prop.getValue(); - else return null; - } - - private static SecretKey getAesEncryptionKey() { - if (secretKey != null) return secretKey; - - String documentDir = OscarProperties.getInstance().getProperty("DOCUMENT_DIR"); - String secretKeyDir = documentDir + "/SSOClinicalConnect/"; - String secretKeyFile = secretKeyDir + "SecretKey"; - try { - //read secretKey from file - FileInputStream fis = new FileInputStream(secretKeyFile); - byte[] keybyte = new byte[16]; - fis.read(keybyte); - fis.close(); - secretKey = new SecretKeySpec(keybyte, "AES"); - } catch (FileNotFoundException e1) { - logger.info("SecretKey file not found, creating..."); - - secretKey = generateAesEncryptionKey(); - - try { - //check if secretkey directory exists, if not, create it - File skdir = new File(secretKeyDir); - if (!skdir.exists()) skdir.mkdirs(); - - //write secretkey to file - FileOutputStream fos = new FileOutputStream(secretKeyFile); - fos.write(secretKey.getEncoded()); - fos.close(); - } catch (Exception e2) { - logger.error("Cannot write secretKey to file", e2); - } - } catch (IOException e3) { - logger.error("Cannot read secretKey file", e3); - } - return secretKey; - } - - private static SecretKey generateAesEncryptionKey() { - try { - KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); - keyGenerator.init(128); - return keyGenerator.generateKey(); - } catch (NoSuchAlgorithmException e) { - logger.error("Error generating AES entryption key", e); - } - return null; - } - - private static String encryptAes(SecretKey secretKey, String plainData) { - try { - byte[] b = null; - if (plainData != null) b = plainData.getBytes(MiscUtils.DEFAULT_UTF8_ENCODING); - byte[] encryptedData = encryptDecrypt("AES", Cipher.ENCRYPT_MODE, secretKey, b); - - return Base64.getEncoder().encodeToString(encryptedData); - } catch (Exception e) { - logger.error("Cannot encrypt", e); - } - return null; - } - - private static String decryptAes(SecretKey secretKey, String encryptedDataStr) { - try { - byte[] encryptedData = Base64.getDecoder().decode(encryptedDataStr); - - byte[] b = encryptDecrypt("AES", Cipher.DECRYPT_MODE, secretKey, encryptedData); - return new String(b, MiscUtils.DEFAULT_UTF8_ENCODING); - } catch (Exception e) { - logger.error("Cannot decrypt", e); - } - return null; - } - - private static byte[] encryptDecrypt(String algorithm, int cipherMode, Key key, byte[] data) throws Exception { - if (key == null) return (data); - - Cipher cipher = Cipher.getInstance(algorithm); - cipher.init(cipherMode, key); - byte[] results = cipher.doFinal(data); - return (results); - } -} diff --git a/src/main/java/ca/openosp/openo/ws/Client.java b/src/main/java/ca/openosp/openo/ws/Client.java index 8a0c7943d8f..5ec9edbcf20 100644 --- a/src/main/java/ca/openosp/openo/ws/Client.java +++ b/src/main/java/ca/openosp/openo/ws/Client.java @@ -250,8 +250,6 @@ public String getHin() { * be encrypted at rest in the database.

    * * @param hin String the Health Insurance Number to set - * @throws ca.openosp.openo.ws.InvalidHinException if the HIN fails provincial validation (server-side) - * @throws ca.openosp.openo.ws.DuplicateHinException if the HIN is already registered (server-side) * @see #setProvince(String) * @see #setHinType(String) * @see #setHinVersion(String) diff --git a/src/main/resources/cxf.xml b/src/main/resources/cxf.xml index 6c8fa809c59..c422088cf0d 100644 --- a/src/main/resources/cxf.xml +++ b/src/main/resources/cxf.xml @@ -12,8 +12,8 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"> - - + + diff --git a/src/main/resources/oscarResources_en.properties b/src/main/resources/oscarResources_en.properties index 8d5c4e37179..d7744e98448 100644 --- a/src/main/resources/oscarResources_en.properties +++ b/src/main/resources/oscarResources_en.properties @@ -1382,7 +1382,6 @@ admin.admin.migrate_contacts=Migrate Contacts admin.admin.setProviderAvailabilities=Set Provider Availabilities admin.admin.eformReportTool=EForm Report Tool admin.admin.born=BORN -admin.admin.ClinicalConnectConfig=Clinical Connect Configuration admin.admin.encounterType=Customize Encounter Types admin.admin.cvc=Configure/Update CVC @@ -1537,8 +1536,6 @@ admin.provider.formSlpPassword=Self Learning Password admin.provider.formPractitionerNo=Practitioner Number admin.provideraddrecordhtm.btnProviderAddRecord=Add Provider Record AddProviderStatus.msgAddFailure=Sorry, addition has failed. -admin.provider.formClinicalConnectId=ClinicalConnect Username -admin.provider.formClinicalConnectType=ClinicalConnect Auth.Type admin.provider.formOfficialFirstName=Official First Name admin.provider.formOfficialSecondName=Official Second Name admin.provider.formOfficialLastName=Official Last Name @@ -1762,7 +1759,6 @@ provider.preventionPrefs=Prevention Preferences provider.preventionPrefs.btnSubmit=Save provider.preventionPrefs.btnCancel=Cancel provider.preventionPrefs.btnClose=Close -provider.btnViewClinicalConnectPrefs=Set ClinicalConnect Preferences provider.btnViewLabMacroPrefs=Set Lab Macros provider.btnViewTicklerPreferences=Set Tickler Preferences @@ -5776,12 +5772,6 @@ provider.appointmentCardPrefs.btnSubmit=Save provider.appointmentCardPrefs.msgSuccess=Appointment card preferences saved -provider.clinicalConnectPrefs.title=Set ClinicalConnect Preferences -provider.clinicalConnectPrefs.msgPrefs=ClinicalConnect Preferences -provider.clinicalConnectPrefs.btnSubmit=Save -provider.clinicalConnectPrefs.btnCancel=Cancel -provider.clinicalConnectPrefs.btnClose=Close -provider.clinicalConnectPrefs.msgSuccess=ClinicalConnect preferences saved provider.labMacroPrefs.title=Set Lab Macro Preferences provider.labMacroPrefs.msgPrefs=Lab Macro Preferences provider.labMacroPrefs.btnSubmit=Save diff --git a/src/main/resources/oscarResources_pt_BR.properties b/src/main/resources/oscarResources_pt_BR.properties index df80532adff..acf9fd9488b 100644 --- a/src/main/resources/oscarResources_pt_BR.properties +++ b/src/main/resources/oscarResources_pt_BR.properties @@ -1501,7 +1501,6 @@ admin.admin.generalSettings.use_custom_clinic=Usar personalizado admin.admin.generalSettings.unit=Minutos admin.admin.born=BORN -admin.admin.ClinicalConnectConfig=Configura\u00E7\u00E3o de Conex\u00E3o Cl\u00EDnica admin.admin.encounterType=Personalizar tipos de consulta admin.admin.cvc=Configurar/Atualizar CVC @@ -1659,8 +1658,6 @@ admin.provider.formSlpPassword=Senha de autoaprendizagem admin.provider.formPractitionerNo=N\u00FAmero do Praticante admin.provideraddrecordhtm.btnProviderAddRecord=Adicionar registro de provedor AddProviderStatus.msgAddFailure=N\u00FAmero do Praticante -admin.provider.formClinicalConnectId=Desculpe, a adi\u00E7\u00E3o falhou. -admin.provider.formClinicalConnectType=Tipo de Autentica\u00E7\u00E3o ClinicalConnect admin.provider.formOfficialFirstName=Nome Oficial admin.provider.formOfficialSecondName=Segundo nome oficial admin.provider.formOfficialLastName=Sobrenome oficial @@ -1885,7 +1882,6 @@ provider.preventionPrefs=Prefer\u00EAncias de preven\u00E7\u00E3o provider.preventionPrefs.btnSubmit=Salve provider.preventionPrefs.btnCancel=Cancelar provider.preventionPrefs.btnClose=Fechar -provider.btnViewClinicalConnectPrefs=Definir prefer\u00EAncias do ClinicalConnect provider.btnViewLabMacroPrefs=Definir macros de laborat\u00F3rio provider.btnViewTicklerPreferences=Definir prefer\u00EAncias da queixa @@ -5590,12 +5586,6 @@ provider.appointmentCardPrefs.msgEdit=Insira seus valores personalizados para as provider.appointmentCardPrefs.btnSubmit=Salve provider.appointmentCardPrefs.msgSuccess=Prefer\u00EAncias de cart\u00E3o de consulta salvas -provider.clinicalConnectPrefs.title=Prefer\u00EAncias do ClinicalConnect -provider.clinicalConnectPrefs.msgPrefs=Prefer\u00EAncias do ClinicalConnect -provider.clinicalConnectPrefs.btnSubmit=Salve -provider.clinicalConnectPrefs.btnCancel=Cancelar -provider.clinicalConnectPrefs.btnClose=Fechar -provider.clinicalConnectPrefs.msgSuccess=Prefer\u00EAncias do ClinicalConnect salvas provider.labMacroPrefs.title=Definir prefer\u00EAncias de macro de laborat\u00F3rio provider.labMacroPrefs.msgPrefs=Prefer\u00EAncias de macro de laborat\u00F3rio provider.labMacroPrefs.btnSubmit=Salve diff --git a/src/main/resources/oscar_mcmaster.properties b/src/main/resources/oscar_mcmaster.properties index 80d7d16066b..6e85c12cdc8 100644 --- a/src/main/resources/oscar_mcmaster.properties +++ b/src/main/resources/oscar_mcmaster.properties @@ -345,11 +345,6 @@ SUPERUSER = oscardoc save_as_xml = false #form_record_path = /usr/local/tomcat/webapps/OscarDocument/oscar_mcmaster/form/records/ -### send to osdsf thru XMLRPC -#osdsfRPCURL= -#pdfFORMDIR = /usr/local/tomcat/webapps/OscarDocument/oscar_mcmaster/form - - ## oscarComm ## When the providers has the program access role of "oscarcomm", ## the link named as "oscarComm" will appear on the CME page if the value for the key "oscarcomm" here is on @@ -507,7 +502,6 @@ inactive_statuses = 'IN','DE','IC','ID','MO','FI' #hsfo.xmlVersionDate=2007-02-12 #hsfo.webServiceURL= -## not null : start quartz scheduler #hsfo.loginSiteCode= DX_QUICK_LIST_BILLING_REVIEW=yes @@ -1524,14 +1518,6 @@ dhir.enabled=false #dhir.timeout=60 #dhir.url= -#clinical connect integration -#clinicalConnect.CMS.url= - -#clinicalConnect.CMS.keystore= -#clinicalConnect.CMS.keystore.password= -clinicalConnect.CMS.timeout=60 -#clinicalConnect.redirectUrl - #when true, labels from earlier version of lab are applied to newer versions of that lab inbox.labels.sticky=false diff --git a/src/main/resources/spring_jpa.xml b/src/main/resources/spring_jpa.xml index 5c908278258..ed206730333 100644 --- a/src/main/resources/spring_jpa.xml +++ b/src/main/resources/spring_jpa.xml @@ -19,7 +19,7 @@ @@ -30,9 +30,9 @@ - + - + @@ -40,9 +40,8 @@ - - - + + diff --git a/src/main/resources/spring_ws.xml b/src/main/resources/spring_ws.xml index ad5d1e6a26a..22a7b126926 100644 --- a/src/main/resources/spring_ws.xml +++ b/src/main/resources/spring_ws.xml @@ -38,15 +38,14 @@ CXF Bus + SOAP endpoints (unchanged) ========================================================= --> - - + - + diff --git a/src/main/webapp/PMmodule/Admin/ProgramEdit/service_restrictions.jsp b/src/main/webapp/PMmodule/Admin/ProgramEdit/service_restrictions.jsp index e931d32f58f..a7ae405270e 100644 --- a/src/main/webapp/PMmodule/Admin/ProgramEdit/service_restrictions.jsp +++ b/src/main/webapp/PMmodule/Admin/ProgramEdit/service_restrictions.jsp @@ -1,4 +1,3 @@ -<%@ taglib uri="http://displaytag.sf.net/el" prefix="display-el" %> <%@ page import="ca.openosp.openo.PMmodule.model.ProgramClientRestriction" %> <%@ page import="ca.openosp.openo.commn.model.Provider" %> @@ -97,13 +96,13 @@ Please define the following parameters control the behaviour of new service rest - - - + - + <% String demographicNo = "" + ((ProgramClientRestriction) pageContext.getAttribute("restriction")).getDemographicNo(); %> @@ -113,14 +112,14 @@ Please define the following parameters control the behaviour of new service rest ');return false;" href="javascript:void(0);"> Disable - - - - - - - - + + + + + + + +
    @@ -131,13 +130,13 @@ Please define the following parameters control the behaviour of new service rest
    - - - + - + <% String demographicNo = "" + ((ProgramClientRestriction) pageContext.getAttribute("restriction")).getDemographicNo(); %> @@ -147,11 +146,11 @@ Please define the following parameters control the behaviour of new service rest ');return false;" href="javascript:void(0);"> Enable - - - - - - - - +
    + + + + + + + diff --git a/src/main/webapp/WEB-INF/classes/struts.xml b/src/main/webapp/WEB-INF/classes/struts.xml index 8aa2aa8d2f9..b3b5a303ae6 100644 --- a/src/main/webapp/WEB-INF/classes/struts.xml +++ b/src/main/webapp/WEB-INF/classes/struts.xml @@ -1345,7 +1345,6 @@ /provider/setAppointmentCardPrefs.jsp /provider/setDashboardPrefs.jsp /provider/setPreventionPrefs.jsp - /provider/setClinicalConnectPrefs.jsp /provider/setLabMacroPrefs.jsp @@ -2276,9 +2275,6 @@ /oscarPrevention/dhirSubmission.jsp /oscarPrevention/test_case.jsp - - /cc/launcherError.jsp - diff --git a/src/main/webapp/admin/clinicalconnect.jsp b/src/main/webapp/admin/clinicalconnect.jsp deleted file mode 100644 index 83b86176e7a..00000000000 --- a/src/main/webapp/admin/clinicalconnect.jsp +++ /dev/null @@ -1,99 +0,0 @@ -<%-- - - Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - This software is published under the GPL GNU General Public License. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - This software was written for the - Department of Family Medicine - McMaster University - Hamilton - Ontario, Canada - ---%> - -<%@ taglib uri="/WEB-INF/security.tld" prefix="security" %> -<% - String roleName$ = (String) session.getAttribute("userrole") + "," + (String) session.getAttribute("user"); - boolean authed = true; -%> - - <%authed = false; %> - <%response.sendRedirect(request.getContextPath() + "/securityError.jsp?type=_admin&type=_admin.misc");%> - -<% - if (!authed) return; -%> - -<%@ page import="java.util.*" %> -<%@ page import="ca.openosp.openo.webserv.rest.util.ClinicalConnectUtil" %> - -<% - String username = request.getParameter("serviceUsername"); - String password = request.getParameter("servicePassword"); - String location = request.getParameter("serviceLocation"); - - boolean saved = false; - if (username != null) { - saved = true; - ClinicalConnectUtil.saveServiceUsername(username); - } else username = ClinicalConnectUtil.getServiceUserName(); - if (password != null) ClinicalConnectUtil.saveServicePassword(password); - else password = ClinicalConnectUtil.getServicePassword(); - if (location != null) ClinicalConnectUtil.saveServiceLocation(location); - else location = ClinicalConnectUtil.getServiceLocation(); - - if (username == null) username = new String(); - if (password == null) password = new String(); - if (location == null) location = new String(); -%> - - - - Clinical Connects Config - - - - -

    Clinical Connect Configuration

    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - <%=saved ? "Saved!" : ""%> -
    -
    -
    - diff --git a/src/main/webapp/admin/providersearchresults.jsp b/src/main/webapp/admin/providersearchresults.jsp index a6bf5fe0c8d..62957a02a30 100644 --- a/src/main/webapp/admin/providersearchresults.jsp +++ b/src/main/webapp/admin/providersearchresults.jsp @@ -229,19 +229,19 @@ <%= provider.getId() %> - <%= Encode.forHtmlContent(provider.getLastName() + ", " + provider.getFirstName()) %> + <%= Encode.forHtmlContent((provider.getLastName() == null ? "" : provider.getLastName()) + ", " + (provider.getFirstName() == null ? "" : provider.getFirstName())) %> - <%= Encode.forHtmlContent(provider.getOhipNo())%> + <%= Encode.forHtmlContent(provider.getOhipNo() == null ? "" : provider.getOhipNo())%> - <%= Encode.forHtmlContent(provider.getSpecialty()) %> + <%= Encode.forHtmlContent(provider.getSpecialty() == null ? "" : provider.getSpecialty()) %> - <%= Encode.forHtmlContent(provider.getTeam()) %> + <%= Encode.forHtmlContent(provider.getTeam() == null ? "" : provider.getTeam()) %> - <%= Encode.forHtmlContent(provider.getSex()) %> + <%= Encode.forHtmlContent(provider.getSex() == null ? "" : provider.getSex()) %> - <%= Encode.forHtmlContent(provider.getPhone()) %> + <%= Encode.forHtmlContent(provider.getPhone() == null ? "" : provider.getPhone()) %> - <%= (provider.getStatus() != null) ? (provider.getStatus().equals("1") ? "Active" : "Inactive") : "" %> + <%= (provider.getStatus() != null) ? ("1".equals(provider.getStatus()) ? "Active" : "Inactive") : "" %> <% diff --git a/src/main/webapp/admin/providerupdate.jsp b/src/main/webapp/admin/providerupdate.jsp index 9df4f57b8bf..6a7e812e65f 100644 --- a/src/main/webapp/admin/providerupdate.jsp +++ b/src/main/webapp/admin/providerupdate.jsp @@ -194,12 +194,6 @@ UserPropertyDAO userPropertyDAO = (UserPropertyDAO) SpringUtils.getBean(UserPropertyDAO.class); - String clinicalConnectId = request.getParameter("clinicalConnectId"); - String clinicalConnectType = request.getParameter("clinicalConnectType"); - - userPropertyDAO.saveProp(provider.getProviderNo(), UserProperty.CLINICALCONNECT_ID, clinicalConnectId); - userPropertyDAO.saveProp(provider.getProviderNo(), UserProperty.CLINICALCONNECT_TYPE, clinicalConnectType); - String officialFirstName = request.getParameter("officialFirstName"); String officialSecondName = request.getParameter("officialSecondName"); String officialLastName = request.getParameter("officialLastName"); diff --git a/src/main/webapp/admin/providerupdateprovider.jsp b/src/main/webapp/admin/providerupdateprovider.jsp index a798108ad4c..ecda10ac28c 100644 --- a/src/main/webapp/admin/providerupdateprovider.jsp +++ b/src/main/webapp/admin/providerupdateprovider.jsp @@ -64,6 +64,7 @@ <%@ page import="ca.openosp.openo.commn.Gender" %> <%@ page import="ca.openosp.openo.commn.IsPropertiesOn" %> <%@ page import="ca.openosp.MyDateFormat" %> +<%@ page import="org.owasp.encoder.Encode" %> <% ProviderDataDao providerDao = SpringUtils.getBean(ProviderDataDao.class); %> @@ -151,30 +152,42 @@ + <% + String keyword = request.getParameter("keyword"); + ProviderData provider = providerDao.findByProviderNo(keyword); + + if (provider == null) { + %>
    +

    Provider not found

    +
    + + + <% + return; + } -
    - - <% - String keyword = request.getParameter("keyword"); - ProviderData provider = providerDao.findByProviderNo(keyword); + SecurityDao securityDao = (SecurityDao) SpringUtils.getBean(SecurityDao.class); + List results = securityDao.findByProviderNo(provider.getId()); + Security security = null; + if (results.size() > 0) security = results.get(0); - SecurityDao securityDao = (SecurityDao) SpringUtils.getBean(SecurityDao.class); - List results = securityDao.findByProviderNo(provider.getId()); - Security security = null; - if (results.size() > 0) security = results.get(0); + LogAction.addLog((String) session.getAttribute("user"), LogConst.UPDATE, "adminUpdateUser", + request.getParameter("keyword"), request.getRemoteAddr()); + %> +
    + + + + +
    - if (provider == null) { - out.println("failed"); - } else { - LogAction.addLog((String) session.getAttribute("user"), LogConst.UPDATE, "adminUpdateUser", - request.getParameter("keyword"), request.getRemoteAddr()); - %> + @@ -194,7 +207,7 @@ + value="<%= Encode.forHtmlAttribute(provider.getLastName() == null ? "" : provider.getLastName()) %>" maxlength="30"> + value="<%= Encode.forHtmlAttribute(provider.getFirstName() == null ? "" : provider.getFirstName()) %>" maxlength="30"> @@ -235,22 +248,22 @@ style="display:none" + style="display:none" <% } else { } @@ -289,13 +302,13 @@ + value="<%= Encode.forHtmlAttribute(provider.getSpecialty() == null ? "" : provider.getSpecialty()) %>" maxlength="40"> + value="<%= Encode.forHtmlAttribute(provider.getTeam() == null ? "" : provider.getTeam()) %>" maxlength="20"> + value="<%= Encode.forHtmlAttribute(provider.getPhone()==null ? "" : provider.getPhone()) %>"> @@ -414,14 +427,14 @@ @@ -437,7 +450,7 @@ if (ll != null) { for (LookupListItem llItem : ll.getItems()) { String selected = ""; - if (provider.getPractitionerNoType().equals(llItem.getValue())) { + if (llItem.getValue() != null && llItem.getValue().equals(provider.getPractitionerNoType())) { selected = " selected=\"selected\" "; } %> @@ -462,46 +475,28 @@ <% UserPropertyDAO userPropertyDAO = (UserPropertyDAO) SpringUtils.getBean(UserPropertyDAO.class); %> - - - - - <% - String ccType = StringUtils.trimToEmpty(userPropertyDAO.getStringValue(provider_no, UserProperty.CLINICALCONNECT_TYPE)); - %> - - - - @@ -577,21 +572,21 @@ @@ -606,9 +601,6 @@
    @@ -202,7 +215,7 @@
    @@ -260,7 +273,7 @@ List providerL = providerDao.findAllBilling("1"); %> -
    :
    :
    : @@ -303,7 +316,7 @@ @@ -320,82 +333,82 @@ : " size="40" + value="<%= Encode.forHtmlAttribute(provider.getAddress()==null ? "" : provider.getAddress()) %>" size="40" maxlength="40">
    : ">
    : " + value="<%= Encode.forHtmlAttribute(provider.getWorkPhone()==null ? "" : provider.getWorkPhone()) %>" maxlength="50">
    : " + value="<%= Encode.forHtmlAttribute(provider.getEmail()==null ? "" : provider.getEmail()) %>" maxlength="50">
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_pager")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_pager")) %>" datafld='xml_p_pager'>
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_cell")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_cell")) %>" datafld='xml_p_cell'>
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_phone2")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_phone2")) %>" datafld='xml_p_phone2'>
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_fax")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_fax")) %>" datafld='xml_p_fax'>
    : " maxlength="20"> + value="<%= Encode.forHtmlAttribute(provider.getOhipNo()==null ? "" : provider.getOhipNo()) %>" maxlength="20">
    : " maxlength="20"> + value="<%= Encode.forHtmlAttribute(provider.getRmaNo()==null ? "" : provider.getRmaNo()) %>" maxlength="20">
    : " + value="<%= Encode.forHtmlAttribute(provider.getBillingNo()==null ? "" : provider.getBillingNo()) %>" maxlength="20">
    : " maxlength="10"> + value="<%= Encode.forHtmlAttribute(provider.getHsoNo()==null ? "" : provider.getHsoNo()) %>" maxlength="10">
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_specialty_code")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_specialty_code")) %>" datafld='xml_p_specialty_code'>
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_billinggroup_no")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_billinggroup_no")) %>" datafld='xml_p_billinggroup_no'>
    : " + value="<%= Encode.forHtmlAttribute(provider.getPractitionerNo()==null ? "" : provider.getPractitionerNo()) %>" maxlength="10">
    :
    : -
    :
    :
    :
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_slpusername")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_slpusername")) %>" datafld='xml_p_slpusername'>
    : " + value="<%= Encode.forHtmlAttribute(SxmlMisc.getXmlContent(provider.getComments(),"xml_p_slppassword")==null ? "" : SxmlMisc.getXmlContent(provider.getComments(),"xml_p_slppassword")) %>" datafld='xml_p_slppassword'>
    : "> + value="<%= Encode.forHtmlAttribute(provider.getSignedConfidentiality()==null ? "" : String.valueOf(provider.getSignedConfidentiality())) %>">
    - <% - } - %>
    diff --git a/src/main/webapp/admin/sitesAdmin.jsp b/src/main/webapp/admin/sitesAdmin.jsp index 3b17e85fa66..e978290f692 100644 --- a/src/main/webapp/admin/sitesAdmin.jsp +++ b/src/main/webapp/admin/sitesAdmin.jsp @@ -76,26 +76,26 @@ - - NoYes - + NoYes + - - - - - - - - + value="${site.name}"/>
    + + + + + + + + <% if (IsPropertiesOn.isProviderFormalizeEnable()) { %> - - + + <% } %> - + diff --git a/src/main/webapp/administration/leftNav.jspf b/src/main/webapp/administration/leftNav.jspf index 4d4aa3a64a7..01e2407cea6 100644 --- a/src/main/webapp/administration/leftNav.jspf +++ b/src/main/webapp/administration/leftNav.jspf @@ -866,13 +866,9 @@ String curProvider_no = (String)session.getAttribute("user"); <%-- K2A config link removed --%> <%--
  • --%> - +
  • - - -
  • -
    diff --git a/src/main/webapp/common/ClinicalConnectRedirect.jsp b/src/main/webapp/common/ClinicalConnectRedirect.jsp deleted file mode 100644 index 56514db99e8..00000000000 --- a/src/main/webapp/common/ClinicalConnectRedirect.jsp +++ /dev/null @@ -1,37 +0,0 @@ -<%-- - - Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - This software is published under the GPL GNU General Public License. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - This software was written for the - Department of Family Medicine - McMaster University - Hamilton - Ontario, Canada - ---%> -<%@page import="ca.openosp.openo.webserv.rest.util.ClinicalConnectUtil,ca.openosp.openo.utility.LoggedInInfo" %> -<% - - LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request); - - if (ClinicalConnectUtil.isReady(loggedInInfo.getLoggedInProviderNo())) { - String location = ClinicalConnectUtil.getLaunchURL(loggedInInfo, null); - response.sendRedirect(location); - return; - } -%> -NO ACCESS TO CLINICAL CONNECT \ No newline at end of file diff --git a/src/main/webapp/form/VTForm2Osdsf.properties b/src/main/webapp/form/VTForm2Osdsf.properties deleted file mode 100755 index 7e919b2e617..00000000000 --- a/src/main/webapp/form/VTForm2Osdsf.properties +++ /dev/null @@ -1,114 +0,0 @@ -# Sample ResourceBundle properties file -demographic_no=PatientCod - -surname=TxtSurname - -givenName=TxtGivenName - -gender=SelGender - -dob=DatBirthDate - -visitDate =VisitCod - -HTValue=IntHeightCm - -WTValue=DblWeightKg - -WCValue=IntWaistCircumferenceCm - -HCValue=IntHipCircumferenceCm - -SBPValue=IntSBPMmHg - -DBPValue=IntDBPMmHg - -BPDate=DatBP - -HRValue=IntPulseBpm - -HbA1Value=DblHbA1C - -HbA1Date=DatHbA1C - -BGValue=DblGlucoseMM - -BGDate=DatGlucose - -LDLValue=DblLDLMM - -LDLDate=DatLDL - -HDLValue=DblHDLMM - -HDLDate=DatHDL - -TCHLValue=DblTotalCholesterolMM - -TCHLDate=DatTotalCholesterol - -TRIGValue=DblTriglyceridesMM - -TRIGDate=DatTriglycerides - -UALBValue=DblUrineAlbuminCreatinineRatioMgPermmol - -UALBDate=DatUrineAlbuminCreatinineRatio - -24UAValue=DblUrineAlbuminMgPerDay - -24UADate=DatUrineAlbumin - -FTNeDate = DatFootExam -FTNeValue = SelFootExamNeuropathy -FTIsValue = SelFootExamIschemia -FTUlValue = SelFootExamUlcer -FTInValue = SelFootExamInfection -FTOtValue = SelFootExamOtherAbnormality -FTReValue = BReferredFootExam -iDiaDate = DatEyeExam -iDiaValue = SelEyeExamDiabeticRetinopathy -iHypValue = SelEyeExamHypertensiveRetinopathy -iOthValue = SelEyeExamOtherAbnormality -iRefValue = BReferredEyeExam -SmkSValue = IntSmokingAverageCigsPerDay -SmkSDate = DatSmokingAverage -SmkHValue = IntSmokingCumulativePackYears -SmkCValue = DatSmokingCeased -ExerValue = IntExerciseAverageMinutesPerWeek -DietValue = IntFruitsAndVegetablesAverageServingsPerDay -DpScValue = SelDepressionCategory -StScValue = SelStressCategory -LcCtValue = SelLocusOfControlCategory -MedGValue = SelMedicationAdherenceGenprob -MedNValue = SelMedicationAdherenceBeliefs -MedRValue = SelMedicationAdherenceRecall -MedAValue = SelMedicationAdherenceAccess -NtrCValue = BCounseledDiet -ExeCValue = BCounseledExercise -SmCCValue = BCounseledSmokingCessation -DiaCValue = BCounseledDiabetes -PsyCValue = BCounseledPsychosocial -OthCValue = BCounseledOther - - -MIValue=BMI - -ACSValue=BACS - -AngValue=BAngina - -RVTNValue=BRevascularization - -CVDValue=BStroke - -PVDValue=BPVD - -DMValue=BDiabetes - -HTNValue=BHypertension - -HchlValue=BHypercholesterolemia - - -WHRBValue=BWaistHipRatioExceedsThreshold \ No newline at end of file diff --git a/src/main/webapp/form/VTFormFromOsdsf.properties b/src/main/webapp/form/VTFormFromOsdsf.properties deleted file mode 100755 index e7c17f02396..00000000000 --- a/src/main/webapp/form/VTFormFromOsdsf.properties +++ /dev/null @@ -1,99 +0,0 @@ - -HTValue=Int_Height_cm - -WTValue=Dbl_Weight_kg - -WCValue=Int_WaistCircumference_cm - -HCValue=Int_HipCircumference_cm - -SBPValue=Int_SBP_mmHg - -DBPValue=Int_DBP_mmHg - -BPDate=Dat_BP - -HRValue=Int_Pulse_bpm - -HbA1Value=Dbl_HbA1C - -HbA1Date=Dat_HbA1C - -BGValue=Dbl_Glucose_mM - -BGDate=Dat_Glucose - -LDLValue=Dbl_LDL_mM - -LDLDate=Dat_LDL - -HDLValue=Dbl_HDL_mM - -HDLDate=Dat_HDL - -TCHLValue=Dbl_TotalCholesterol_mM - -TCHLDate=Dat_TotalCholesterol - -TRIGValue=Dbl_Triglycerides_mM - -TRIGDate=Dat_Triglycerides - -UALBValue=Dbl_UrineAlbuminCreatinineRatio_mgPermmol - -UALBDate=Dat_UrineAlbuminCreatinineRatio - -24UAValue=Dbl_UrineAlbumin_mgPerDay - -24UADate=Dat_UrineAlbumin -FTNeDate = Dat_FootExam -FTNeValue = Sel_FootExam_Neuropathy -FTIsValue = Sel_FootExam_Ischemia -FTUlValue = Sel_FootExam_Ulcer -FTInValue = Sel_FootExam_Infection -FTOtValue = Sel_FootExam_OtherAbnormality -FTReValue = B_Referred_FootExam -iDiaDate = Dat_EyeExam -iDiaValue = Sel_EyeExam_DiabeticRetinopathy -iHypValue = Sel_EyeExam_HypertensiveRetinopathy -iOthValue = Sel_EyeExam_OtherAbnormality -iRefValue = B_Referred_EyeExam -SmkSValue = Int_SmokingAverage_CigsPerDay -SmkSDate = Dat_SmokingAverage -SmkHValue = Int_SmokingCumulative_PackYears -SmkCValue = Dat_SmokingCeased -ExerValue = Int_ExerciseAverage_MinutesPerWeek -DietValue = Int_FruitsAndVegetablesAverage_ServingsPerDay -DpScValue = Sel_Depression_category -StScValue = Sel_Stress_category -LcCtValue = Sel_LocusOfControl_category -MedGValue = Sel_MedicationAdherence_genprob -MedNValue = Sel_MedicationAdherence_beliefs -MedRValue = Sel_MedicationAdherence_recall -MedAValue = Sel_MedicationAdherence_access -NtrCValue = B_Counseled_Diet -ExeCValue = B_Counseled_Exercise -SmCCValue = B_Counseled_SmokingCessation -DiaCValue = B_Counseled_Diabetes -PsyCValue = B_Counseled_Psychosocial -OthCValue = B_Counseled_Other -MIValue=B_MI - -ACSValue=B_ACS - -AgnValue=B_Angina - -RVTNValue=B_Revascularization - -CVDValue=B_Stroke - -PVDValue=B_PVD - -DMValue=B_Diabetes - -HTNValue=B_Hypertension - -HchlValue=B_Hypercholesterolemia - - -WHRBValue=B_WaistHipRatioExceedsThreshold diff --git a/src/main/webapp/form/formVT2OSDSF.jsp b/src/main/webapp/form/formVT2OSDSF.jsp deleted file mode 100644 index 156641a1e25..00000000000 --- a/src/main/webapp/form/formVT2OSDSF.jsp +++ /dev/null @@ -1,107 +0,0 @@ -<%-- - - Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - This software is published under the GPL GNU General Public License. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - This software was written for the - Department of Family Medicine - McMaster University - Hamilton - Ontario, Canada - ---%> - -<%@ taglib uri="/WEB-INF/security.tld" prefix="security" %> -<% - String roleName2$ = (String) session.getAttribute("userrole") + "," + (String) session.getAttribute("user"); - boolean authed = true; -%> - - <%authed = false; %> - <%response.sendRedirect(request.getContextPath() + "/securityError.jsp?type=_form");%> - -<% - if (!authed) { - return; - } -%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> - - - - - Vascular Tracker to OSDEF - - - - - - - -
    Uploading data to OSDEF... HbA1c "/> LDL - "/> - HDL "/> Total Cholesterol "/> Triglycerides "/> Urinary - Albumin Creatinine Ratio "/> 24 hrs albumin Foot check: Ulcer "/> Foot check: Ischemia "/> Foot check: Neuropathy "/> Eye Exam: Diabetic Retinopathy "/> Eye Exam: Hypertensive Retinopathy - "/> Vascular Specialist Blood pressure - SBP: DBP: DateBP: - "/> "/> - "/> - Weight "/> Height "/> smoking number - of pack of cigarette per day "/> number of cigarette per day "/> exercise - - - - diff --git a/src/main/webapp/form/formVTForm.jsp b/src/main/webapp/form/formVTForm.jsp index 2bdbecd88ca..ac0f58909fd 100644 --- a/src/main/webapp/form/formVTForm.jsp +++ b/src/main/webapp/form/formVTForm.jsp @@ -114,9 +114,6 @@ pageWindow = popup; popup.focus(); } - /*else{ - alert("Miles server is not avaiable!"); - }*/ } @@ -692,8 +689,7 @@ + onload="window.focus();window.resizeTo(680,760); initialize();">
    @@ -717,9 +713,7 @@ - + - - - - diff --git a/src/main/webapp/provider/setClinicalConnectPrefs.jsp b/src/main/webapp/provider/setClinicalConnectPrefs.jsp deleted file mode 100644 index 3b0b228bd05..00000000000 --- a/src/main/webapp/provider/setClinicalConnectPrefs.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%-- - - Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. - This software is published under the GPL GNU General Public License. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - This software was written for the - Department of Family Medicine - McMaster University - Hamilton - Ontario, Canada - ---%> - -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@ include file="/casemgmt/taglibs.jsp" %> -<%@page import="java.util.*" %> -<%@ page import="java.util.ResourceBundle"%> - - -<% - ResourceBundle bundle = ResourceBundle.getBundle("oscarResources", request.getLocale()); - - String providertitle = (String) request.getAttribute("providertitle"); - String providermsgPrefs = (String) request.getAttribute("providermsgPrefs"); - String providerbtnCancel = (String) request.getAttribute("providerbtnCancel"); - String providerbtnClose = (String) request.getAttribute("providerbtnClose"); - String providerbtnSubmit = (String) request.getAttribute("providerbtnSubmit"); - String providermsgSuccess = (String) request.getAttribute("providermsgSuccess"); -%> - - - - "> - - <%=bundle.getString(providertitle)%> - - - - -
    Vascular Data Entry Template - (draft) <%=request.getAttribute("decisionSupportURL") == null ? "(Miles server is not available)" : ""%> - Vascular Data Entry Template
    diff --git a/src/main/webapp/js/newCaseManagementView.js.jsp b/src/main/webapp/js/newCaseManagementView.js.jsp index 523414e9a99..86109639a74 100644 --- a/src/main/webapp/js/newCaseManagementView.js.jsp +++ b/src/main/webapp/js/newCaseManagementView.js.jsp @@ -3871,20 +3871,9 @@ function autoSave(async) { } - <% - UserPropertyDAO userPropertyDAO = SpringUtils.getBean(UserPropertyDAO.class); - UserProperty prop = userPropertyDAO.getProp(LoggedInInfo.getLoggedInInfoFromSession(request).getLoggedInProviderNo(), "clinicalConnectDisableCloseWindow"); - if(prop != null && "true".equals(prop.getValue()) ) { - - } else { -%> window.addEventListener("beforeunload", function () { for (var x = 0; x < activeCCWindows.length; x++) { activeCCWindows[x].close(); } }); - <% - } - -%> diff --git a/src/main/webapp/logoutSSO.jsp b/src/main/webapp/logoutSSO.jsp index 4e7a0fab171..be0d1d5f3ea 100644 --- a/src/main/webapp/logoutSSO.jsp +++ b/src/main/webapp/logoutSSO.jsp @@ -24,72 +24,20 @@ --%> -<%@page import="ca.openosp.openo.utility.SpringUtils" %> -<%@page import="ca.openosp.openo.utility.LoggedInInfo" %> -<%@page import="ca.openosp.openo.commn.model.UserProperty" %> -<%@page import="ca.openosp.openo.commn.dao.UserPropertyDAO" %> <%@page import="java.net.URLEncoder" %> <%@page import="ca.openosp.OscarProperties" %> -<%@page import="java.util.HashMap, ca.openosp.openo.log.*" - errorPage="/errorpage.jsp" %> +<%@page errorPage="/errorpage.jsp" %> <% - String message = null; String econsultUrl = OscarProperties.getInstance().getProperty("backendEconsultUrl"); StringBuffer oscarUrl = request.getRequestURL(); oscarUrl.setLength(oscarUrl.length() - request.getServletPath().length()); String redirectURL = econsultUrl + "/SAML2/logout?oscarReturnURL=" + URLEncoder.encode(oscarUrl + "/logout.jsp", "UTF-8"); - - UserPropertyDAO userPropertyDAO = SpringUtils.getBean(UserPropertyDAO.class); - UserProperty prop = userPropertyDAO.getProp(LoggedInInfo.getLoggedInInfoFromSession(request).getLoggedInProviderNo(), "clinicalConnectDisableLogoutWarning"); - if (prop != null && "true".equals(prop.getValue())) { + // Check if this is a OneID SSO session + if (request.getSession().getAttribute("oneIdEmail") != null && !request.getSession().getAttribute("oneIdEmail").equals("")) { response.sendRedirect(redirectURL); - return; - } - - - if (request.getSession().getAttribute("CC_EHR_LOADED") == null) { - if (request.getSession().getAttribute("oneIdEmail") != null && !request.getSession().getAttribute("oneIdEmail").equals("")) { - - response.sendRedirect(redirectURL); - return; - } else { - response.sendRedirect(request.getContextPath() + "/logout.jsp"); - } } else { - message = "Please be aware that any browser windows that you were working on will remain open. To ensure patient privacy, close all browser windows containing confidential or private health information (PHI) after logging out of your EMR."; - message = "Warning: Any browser windows that you opened during your session will remain open. To ensure patient privacy, close all browser windows containing confidential or private health information (PHI) after signing out."; + response.sendRedirect(request.getContextPath() + "/logout.jsp"); } - %> - - - "> - - - - -


    -
    -
    - -
    <%=message %> -
    -
    -
    - CONFIRM SIGN OUT* -
    - '"/> - -
    - -

    -
    * If not action is taken in 10 seconds, you will automatically be signed out. To disable this warning, to go - Preferences -> ClinicalConnect settings.
    -
    - - - diff --git a/src/main/webapp/oscarRx/printRx/PreviewContent.jsp b/src/main/webapp/oscarRx/printRx/PreviewContent.jsp index 8f36991e5a7..798e169bbed 100644 --- a/src/main/webapp/oscarRx/printRx/PreviewContent.jsp +++ b/src/main/webapp/oscarRx/printRx/PreviewContent.jsp @@ -28,7 +28,6 @@ <%--<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>--%> <%@ taglib prefix="oscar" uri="/oscarPropertiestag" %> <%--<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>--%> -<%@ page import="org.apache.commons.lang.StringEscapeUtils" %> <%@ page import="org.owasp.encoder.Encode" %> <%@ page import="ca.openosp.openo.prescript.data.RxPatientData" %> <%@ page import="ca.openosp.OscarProperties, ca.openosp.openo.utility.DigitalSignatureUtils" %> @@ -103,9 +102,9 @@ <%-- Phone number is now set in the action --%> )","\\\n")) %>"/> + value="<%= Encode.forHtml(((String)request.getAttribute("clinicTitle")).replaceAll("(
    )","\\\n")) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("phone")) %>"/>
    @@ -117,30 +116,30 @@ "/> + value="<%= Encode.forHtml(((RxPatientData.Patient)request.getAttribute("patient")).getFirstName())+ " " +Encode.forHtml(((RxPatientData.Patient)request.getAttribute("patient")).getSurname()) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("patientDOBStr")) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("pracNo")) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("patientAddress")) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("patientCityPostal"))%>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("patientHin")) %>"/> "/> + value="<%=Encode.forHtml((String)request.getAttribute("patientChartNo"))%>"/> <%=StringEscapeUtils.escapeHtml((String)request.getAttribute("patientPhone")) %>"/> + value="<%=Encode.forHtml((String)request.getAttribute("patientPhone")) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("rxDateFormatted")) %>"/> "/> + value="<%= Encode.forHtml((String)request.getAttribute("doctorName")) %>"/>
    diff --git a/src/main/webapp/provider/appointmentprovideradminday.jsp b/src/main/webapp/provider/appointmentprovideradminday.jsp index 9c232052e4d..a801d3770df 100644 --- a/src/main/webapp/provider/appointmentprovideradminday.jsp +++ b/src/main/webapp/provider/appointmentprovideradminday.jsp @@ -945,14 +945,6 @@ eConsult <% } %> - <%if (!OscarProperties.getInstance().getProperty("clinicalConnect.CMS.url", "").isEmpty()) { %> -
  • - - ClinicalConnect -
  • - <%}%> diff --git a/src/main/webapp/provider/mainMenu.jsp b/src/main/webapp/provider/mainMenu.jsp index c680740fde5..0a4e26f438c 100644 --- a/src/main/webapp/provider/mainMenu.jsp +++ b/src/main/webapp/provider/mainMenu.jsp @@ -214,14 +214,6 @@ eConsult <% } %> - <%if (!StringUtils.isEmpty(OscarProperties.getInstance().getProperty("clinicalConnect.CMS.url", ""))) { %> -
  • - - ClinicalConnect -
  • - <%}%>
  • diff --git a/src/main/webapp/provider/providerpreference.jsp b/src/main/webapp/provider/providerpreference.jsp index a0afcbe9093..eefa488c090 100644 --- a/src/main/webapp/provider/providerpreference.jsp +++ b/src/main/webapp/provider/providerpreference.jsp @@ -806,11 +806,6 @@ onClick="popupPage(230,860,'<%=request.getContextPath()%>/setProviderStaleDate.do?method=viewPreventionPrefs');return false;">
  • - - - - - - - - - - - - -
    - <%=bundle.getString(providermsgPrefs)%> -
    - <%if (request.getAttribute("status") == null) {%> - - "> - - - checked />Disable Close Window (when eChart closed) - -
    - - checked />Disable Logout Warning - -

    - - - - - <%} else {%> - <%=bundle.getString(providermsgSuccess)%> -

    - - <%}%> -
    - - diff --git a/src/main/webapp/taglibs.jsp b/src/main/webapp/taglibs.jsp index 0a5256cd3b2..f0d01414b12 100644 --- a/src/main/webapp/taglibs.jsp +++ b/src/main/webapp/taglibs.jsp @@ -28,7 +28,6 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://displaytag.sf.net" prefix="display" %> -<%@ taglib uri="http://displaytag.sf.net/el" prefix="display-el" %> <%@ taglib uri="/WEB-INF/caisi-tag.tld" prefix="caisi" %> <%@ taglib uri="/WEB-INF/caisirole-tag.tld" prefix="caisirole" %> <%@ taglib uri="/WEB-INF/oscar-tag.tld" prefix="oscar" %> diff --git a/src/test-modern/java/ca/openosp/openo/managers/DashboardManagerEncryptionUnitTest.java b/src/test-modern/java/ca/openosp/openo/managers/DashboardManagerEncryptionUnitTest.java new file mode 100644 index 00000000000..fd2c225e5cb --- /dev/null +++ b/src/test-modern/java/ca/openosp/openo/managers/DashboardManagerEncryptionUnitTest.java @@ -0,0 +1,301 @@ +/** + * Copyright (c) 2024. Magenta Health. All Rights Reserved. + * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. + * This software is published under the GPL GNU General Public License. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + *

    + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

    + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *

    + * This software was written for the + * Department of Family Medicine + * McMaster University + * Hamilton + * Ontario, Canada + *

    + * Modifications made by Magenta Health in 2024. + */ +package ca.openosp.openo.managers; + +import ca.openosp.OscarProperties; +import ca.openosp.openo.commn.dao.ClinicDAO; +import ca.openosp.openo.commn.dao.DashboardDao; +import ca.openosp.openo.commn.dao.IndicatorTemplateDao; +import ca.openosp.openo.commn.model.Clinic; +import ca.openosp.openo.commn.model.Provider; +import ca.openosp.openo.test.unit.OpenOUnitTestBase; +import ca.openosp.openo.utility.LoggedInInfo; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.MockedStatic; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.security.crypto.encrypt.BytesEncryptor; +import org.springframework.security.crypto.encrypt.Encryptors; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.mockStatic; +import static org.mockito.Mockito.when; + +/** + * Unit tests for DashboardManager encryption functionality. + * Tests the migration from jasypt to Spring Security Crypto. + * + *

    These tests verify the encryption behavior in isolation using mocks, + * without requiring the full Spring application context.

    + * + * @since 2026-01-28 + */ +@Tag("unit") +@Tag("encryption") +@Tag("dashboard") +@Tag("manager") +@ExtendWith(MockitoExtension.class) +@DisplayName("Dashboard Manager Encryption Unit Tests") +class DashboardManagerEncryptionUnitTest extends OpenOUnitTestBase { + + @Mock + private SecurityInfoManager securityInfoManager; + + @Mock + private IndicatorTemplateDao indicatorTemplateDao; + + @Mock + private DashboardDao dashboardDao; + + @Mock + private ClinicDAO clinicDAO; + + private DashboardManagerImpl dashboardManager; + + private LoggedInInfo loggedInInfo; + private Provider testProvider; + private Clinic testClinic; + private MockedStatic mockedProperties; + + @BeforeEach + void setUp() { + // Register mocks for SpringUtils BEFORE creating DashboardManagerImpl + registerMock(SecurityInfoManager.class, securityInfoManager); + registerMock(IndicatorTemplateDao.class, indicatorTemplateDao); + registerMock(DashboardDao.class, dashboardDao); + registerMock(ClinicDAO.class, clinicDAO); + + // Configure SecurityInfoManager to allow all operations in tests + lenient().when(securityInfoManager.hasPrivilege(any(), anyString(), anyString(), any())) + .thenReturn(true); + + // Create DashboardManagerImpl - it will get mocks from SpringUtils + dashboardManager = new DashboardManagerImpl(); + + // Set up test clinic + testClinic = new Clinic(); + testClinic.setClinicName("Test Clinic"); + + // Set up test provider + testProvider = new Provider(); + testProvider.setProviderNo("999998"); + testProvider.setFirstName("Test"); + testProvider.setLastName("Provider"); + + // Set up LoggedInInfo + loggedInInfo = mock(LoggedInInfo.class); + when(loggedInInfo.getLoggedInProvider()).thenReturn(testProvider); + } + + @AfterEach + void tearDown() { + if (mockedProperties != null) { + mockedProperties.close(); + mockedProperties = null; + } + } + + @Test + @DisplayName("Generate encrypted URL when valid configuration is provided") + void shouldGenerateEncryptedURL_whenValidConfiguration() { + mockedProperties = mockStatic(OscarProperties.class); + OscarProperties properties = mock(OscarProperties.class); + mockedProperties.when(OscarProperties::getInstance).thenReturn(properties); + + when(properties.getProperty("shared_outcomes_dashboard_url")) + .thenReturn("https://test.dashboard.example.com"); + when(properties.getProperty("shared_outcomes_dashboard_key")) + .thenReturn("test-password-for-encryption"); + when(properties.getProperty("shared_outcomes_dashboard_salt")) + .thenReturn("8f3c21ab56789def1234567890abcdef"); + when(properties.getProperty("shared_outcomes_dashboard_clinic_id")) + .thenReturn("TEST_CLINIC_001"); + + when(clinicDAO.getClinic()).thenReturn(testClinic); + + String url = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + + assertThat(url).isNotNull(); + assertThat(url).startsWith("https://test.dashboard.example.com"); + assertThat(url).contains("encodedParams="); + assertThat(url).contains("version=1.1"); + } + + @Test + @DisplayName("Produce valid Base64 output when encrypting parameters") + void shouldProduceValidBase64Output_whenEncrypting() { + mockedProperties = mockStatic(OscarProperties.class); + OscarProperties properties = mock(OscarProperties.class); + mockedProperties.when(OscarProperties::getInstance).thenReturn(properties); + + when(properties.getProperty("shared_outcomes_dashboard_url")) + .thenReturn("https://test.dashboard.example.com"); + when(properties.getProperty("shared_outcomes_dashboard_key")) + .thenReturn("test-password"); + when(properties.getProperty("shared_outcomes_dashboard_salt")) + .thenReturn("8f3c21ab56789def1234567890abcdef"); + when(properties.getProperty("shared_outcomes_dashboard_clinic_id")) + .thenReturn("TEST_CLINIC"); + + when(clinicDAO.getClinic()).thenReturn(testClinic); + + String url = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + + assertThat(url).isNotNull(); + + // Extract encoded params from URL + String encodedParams = url.substring(url.indexOf("encodedParams=") + 14, url.indexOf("&version")); + + // Verify it's valid Base64 + assertThat(encodedParams).isNotEmpty(); + assertThat(encodedParams).matches("^[A-Za-z0-9+/=]+$"); + + // Verify we can decode it + byte[] decoded = Base64.getDecoder().decode(encodedParams); + assertThat(decoded).isNotEmpty(); + } + + @Test + @DisplayName("Produce different output when called multiple times (random IV)") + void shouldProduceDifferentOutput_whenCalledMultipleTimes() { + mockedProperties = mockStatic(OscarProperties.class); + OscarProperties properties = mock(OscarProperties.class); + mockedProperties.when(OscarProperties::getInstance).thenReturn(properties); + + when(properties.getProperty("shared_outcomes_dashboard_url")) + .thenReturn("https://test.dashboard.example.com"); + when(properties.getProperty("shared_outcomes_dashboard_key")) + .thenReturn("test-password"); + when(properties.getProperty("shared_outcomes_dashboard_salt")) + .thenReturn("8f3c21ab56789def1234567890abcdef"); + when(properties.getProperty("shared_outcomes_dashboard_clinic_id")) + .thenReturn("TEST_CLINIC"); + + when(clinicDAO.getClinic()).thenReturn(testClinic); + + String url1 = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + String url2 = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + + assertThat(url1).isNotNull(); + assertThat(url2).isNotNull(); + + // URLs should be different due to random IV in encryption + assertThat(url1).isNotEqualTo(url2); + } + + @Test + @DisplayName("Return null when password configuration is missing") + void shouldReturnNull_whenMissingPassword() { + mockedProperties = mockStatic(OscarProperties.class); + OscarProperties properties = mock(OscarProperties.class); + mockedProperties.when(OscarProperties::getInstance).thenReturn(properties); + + when(properties.getProperty("shared_outcomes_dashboard_url")) + .thenReturn("https://test.dashboard.example.com"); + when(properties.getProperty("shared_outcomes_dashboard_key")) + .thenReturn(null); // Missing password + when(properties.getProperty("shared_outcomes_dashboard_salt")) + .thenReturn("8f3c21ab56789def1234567890abcdef"); + + when(clinicDAO.getClinic()).thenReturn(testClinic); + + String url = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + + // Should return null when encryption fails + assertThat(url).isNull(); + } + + @Test + @DisplayName("Return null when salt configuration is missing") + void shouldReturnNull_whenMissingSalt() { + mockedProperties = mockStatic(OscarProperties.class); + OscarProperties properties = mock(OscarProperties.class); + mockedProperties.when(OscarProperties::getInstance).thenReturn(properties); + + when(properties.getProperty("shared_outcomes_dashboard_url")) + .thenReturn("https://test.dashboard.example.com"); + when(properties.getProperty("shared_outcomes_dashboard_key")) + .thenReturn("test-password"); + when(properties.getProperty("shared_outcomes_dashboard_salt")) + .thenReturn(null); // Missing salt + + when(clinicDAO.getClinic()).thenReturn(testClinic); + + String url = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + + // Should return null when encryption fails + assertThat(url).isNull(); + } + + @Test + @DisplayName("Decrypt correctly using Spring Security Crypto (round-trip test)") + void shouldDecryptCorrectly_whenUsingSpringSecurityCrypto() { + String testJson = "{\"clinic\":{\"name\":\"Test Clinic\"},\"user\":{\"username\":\"test\"}}"; + String password = "test-password"; + String salt = "8f3c21ab56789def1234567890abcdef"; + + // Encrypt + BytesEncryptor encryptor = Encryptors.stronger(password, salt); + byte[] encrypted = encryptor.encrypt(testJson.getBytes(StandardCharsets.UTF_8)); + String base64Encoded = Base64.getEncoder().encodeToString(encrypted); + + // Decrypt + byte[] decoded = Base64.getDecoder().decode(base64Encoded); + byte[] decrypted = encryptor.decrypt(decoded); + String decryptedJson = new String(decrypted, StandardCharsets.UTF_8); + + // Verify round-trip + assertThat(decryptedJson).isEqualTo(testJson); + } + + @Test + @DisplayName("Return null when dashboard URL configuration is missing") + void shouldReturnNull_whenMissingDashboardURL() { + mockedProperties = mockStatic(OscarProperties.class); + OscarProperties properties = mock(OscarProperties.class); + mockedProperties.when(OscarProperties::getInstance).thenReturn(properties); + + when(properties.getProperty("shared_outcomes_dashboard_url")) + .thenReturn(null); // Missing URL + + String url = dashboardManager.getSharedOutcomesDashboardLaunchURL(loggedInInfo); + + assertThat(url).isNull(); + } +} diff --git a/src/test-modern/java/ca/openosp/openo/managers/DemographicManagerUnitTest.java b/src/test-modern/java/ca/openosp/openo/managers/DemographicManagerUnitTest.java new file mode 100644 index 00000000000..80338a56310 --- /dev/null +++ b/src/test-modern/java/ca/openosp/openo/managers/DemographicManagerUnitTest.java @@ -0,0 +1,2187 @@ +/** + * Copyright (c) 2026. Magenta Health. All Rights Reserved. + * This software is published under the GPL GNU General Public License. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + *

    + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

    + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *

    + * This software was written for + * Magenta Health + * Toronto, Ontario, Canada + */ +package ca.openosp.openo.managers; + +import ca.openosp.openo.commn.Gender; +import ca.openosp.openo.commn.dao.*; +import ca.openosp.openo.commn.model.*; +import ca.openosp.openo.log.LogAction; +import ca.openosp.openo.utility.DemographicContactCreator; +import ca.openosp.openo.webserv.rest.to.model.DemographicSearchRequest; +import ca.openosp.openo.webserv.rest.to.model.DemographicSearchResult; + +import org.junit.jupiter.api.*; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.MockedStatic; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; + +import java.util.*; + +import static org.assertj.core.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +/** + * Unit tests for DemographicManager business logic. + * + *

    This test class provides comprehensive coverage of the DemographicManagerImpl + * service layer, testing business logic, validation, security checks, and DAO + * interactions without requiring a database or Spring context.

    + * + *

    Key Patterns Demonstrated:

    + *
      + *
    • Validation logic testing
    • + *
    • Security privilege verification
    • + *
    • Business rule enforcement
    • + *
    • Archive-before-update patterns
    • + *
    • Manager-DAO interaction patterns
    • + *
    • MRP resolution chain testing
    • + *
    + * + * @since 2026-01-24 + * @see DemographicManagerImpl + * @see DemographicUnitTestBase + */ +@ExtendWith(MockitoExtension.class) +@MockitoSettings(strictness = Strictness.LENIENT) +@DisplayName("DemographicManager Unit Tests") +@Tag("unit") +@Tag("fast") +@Tag("manager") +@Tag("demographic") +public class DemographicManagerUnitTest extends DemographicUnitTestBase { + + // 17 Mock dependencies + @Mock private DemographicDao mockDemographicDao; + @Mock private DemographicExtDao mockDemographicExtDao; + @Mock private DemographicCustDao mockDemographicCustDao; + @Mock private DemographicContactDao mockDemographicContactDao; + @Mock private DemographicArchiveDao mockDemographicArchiveDao; + @Mock private DemographicExtArchiveDao mockDemographicExtArchiveDao; + @Mock private DemographicCustArchiveDao mockDemographicCustArchiveDao; + @Mock private DemographicMergedDao mockDemographicMergedDao; + @Mock private AdmissionDao mockAdmissionDao; + @Mock private AppManager mockAppManager; + @Mock private ContactSpecialtyDao mockContactSpecialtyDao; + @Mock private PatientConsentManager mockPatientConsentManager; + @Mock private ConsentDao mockConsentDao; + @Mock private ProgramManager2 mockProgramManager2; + @Mock private ProviderManager2 mockProviderManager; + @Mock private AppointmentManager mockAppointmentManager; + + /** The DemographicManagerImpl instance under test. */ + private DemographicManagerImpl manager; + + /** Static mock for LogAction to prevent actual logging during tests. */ + private MockedStatic logActionMock; + + /** Static mock for DemographicContactCreator to avoid static initialization issues. */ + private MockedStatic demographicContactCreatorMock; + + /** + * Sets up the test environment before each test method. + * + *

    This method performs the following setup:

    + *
      + *
    1. Registers mocks with SpringUtils for static bean lookups
    2. + *
    3. Mocks static classes (LogAction, DemographicContactCreator) to prevent side effects
    4. + *
    5. Configures default security behavior (privileges granted)
    6. + *
    7. Creates the manager instance and injects all 17 dependencies via reflection
    8. + *
    + * + *

    Important: Mock registration order matters - SpringUtils mocks must be + * registered BEFORE static class mocking to prevent NoClassDefFoundError during + * static initializer execution.

    + */ + @BeforeEach + void setUp() { + // Register mocks for SpringUtils BEFORE mocking any static classes + // This order is critical - static initializers may call SpringUtils.getBean() + registerMock(DemographicDao.class, mockDemographicDao); + registerMock(DemographicExtDao.class, mockDemographicExtDao); + registerMock(DemographicCustDao.class, mockDemographicCustDao); + registerMock(DemographicContactDao.class, mockDemographicContactDao); + registerMock(ProviderManager2.class, mockProviderManager); + + // Register OscarLogDao mock to satisfy LogAction static initialization + registerMock(ca.openosp.openo.commn.dao.OscarLogDao.class, + createAndRegisterMock(ca.openosp.openo.commn.dao.OscarLogDao.class)); + + // Register mocks for DemographicContactCreator static initialization + registerMock(ProfessionalSpecialistDao.class, createAndRegisterMock(ProfessionalSpecialistDao.class)); + + // Mock DemographicContactCreator to prevent static initialization issues + demographicContactCreatorMock = mockStatic(DemographicContactCreator.class); + demographicContactCreatorMock.when(() -> DemographicContactCreator.addContactDetailsToDemographicContact(anyList())) + .thenAnswer(invocation -> invocation.getArgument(0)); + demographicContactCreatorMock.when(() -> DemographicContactCreator.addContactDetailsToDemographicContact(any(DemographicContact.class))) + .thenAnswer(invocation -> invocation.getArgument(0)); + + // Now we can safely mock LogAction + logActionMock = mockStatic(LogAction.class); + + // Security manager returns true for all privilege checks by default + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), any())) + .thenReturn(true); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), anyInt())) + .thenReturn(true); + + // Create manager instance + manager = new DemographicManagerImpl(); + + // Inject all 17 dependencies using reflection + injectDependency(manager, "demographicDao", mockDemographicDao); + injectDependency(manager, "demographicExtDao", mockDemographicExtDao); + injectDependency(manager, "demographicCustDao", mockDemographicCustDao); + injectDependency(manager, "demographicContactDao", mockDemographicContactDao); + injectDependency(manager, "demographicArchiveDao", mockDemographicArchiveDao); + injectDependency(manager, "demographicExtArchiveDao", mockDemographicExtArchiveDao); + injectDependency(manager, "demographicCustArchiveDao", mockDemographicCustArchiveDao); + injectDependency(manager, "demographicMergedDao", mockDemographicMergedDao); + injectDependency(manager, "admissionDao", mockAdmissionDao); + injectDependency(manager, "securityInfoManager", mockSecurityInfoManager); + injectDependency(manager, "appManager", mockAppManager); + injectDependency(manager, "contactSpecialtyDao", mockContactSpecialtyDao); + injectDependency(manager, "patientConsentManager", mockPatientConsentManager); + injectDependency(manager, "consentDao", mockConsentDao); + injectDependency(manager, "programManager2", mockProgramManager2); + injectDependency(manager, "providerManager", mockProviderManager); + injectDependency(manager, "appointmentManager", mockAppointmentManager); + } + + /** + * Cleans up static mocks after each test to prevent test pollution. + * + *

    MockedStatic instances must be closed to release the static mock + * and restore original behavior. Failure to close can cause subsequent + * tests to fail or behave unexpectedly.

    + */ + @AfterEach + void tearDown() { + if (demographicContactCreatorMock != null) { + demographicContactCreatorMock.close(); + } + if (logActionMock != null) { + logActionMock.close(); + } + } + + // ==================== SECURITY TESTS ==================== + + /** + * Tests for security and privilege checking functionality. + * + *

    These tests verify that DemographicManager properly enforces security + * constraints via SecurityInfoManager. Each operation should check for + * appropriate privileges (read, write, update) before proceeding.

    + * + *

    Coverage includes:

    + *
      + *
    • Read privilege denial for getDemographic
    • + *
    • Write privilege denial for createDemographic, deleteDemographic
    • + *
    • Update privilege denial for updateDemographic
    • + *
    • Write privilege denial for createExtension, deleteExtension
    • + *
    • Update privilege denial for updateExtension
    • + *
    • Direct checkPrivilege method testing (both overloads)
    • + *
    + * + * @see SecurityInfoManager#hasPrivilege + */ + @Nested + @DisplayName("Security and Privilege Checks") + @Tag("security") + class SecurityTests { + + @Test + @DisplayName("should throw RuntimeException when read privilege denied for getDemographic") + void shouldThrowException_whenReadPrivilegeDeniedForGetDemographic() { + // Reset and re-configure to return false for this specific test + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), anyInt())) + .thenReturn(false); + + assertThatThrownBy(() -> manager.getDemographic(mockLoggedInInfo, TEST_DEMO_NO)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw RuntimeException when write privilege denied for createDemographic") + void shouldThrowException_whenWritePrivilegeDeniedForCreate() { + // Reset and re-configure to return false for this specific test + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + Demographic demographic = createTestDemographic(); + + assertThatThrownBy(() -> manager.createDemographic(mockLoggedInInfo, demographic, TEST_PROGRAM_ID)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw RuntimeException when update privilege denied for updateDemographic") + void shouldThrowException_whenUpdatePrivilegeDeniedForUpdate() { + // Reset and re-configure to return false for this specific test + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + Demographic demographic = createTestDemographicWithId(TEST_DEMO_NO); + + assertThatThrownBy(() -> manager.updateDemographic(mockLoggedInInfo, demographic)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should verify privilege check with demographicNo parameter") + void shouldVerifyPrivilegeCheck_withDemographicNoParameter() { + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(createTestDemographic()); + + manager.getDemographic(mockLoggedInInfo, TEST_DEMO_NO); + + verify(mockSecurityInfoManager).hasPrivilege(eq(mockLoggedInInfo), eq("_demographic"), eq("r"), anyInt()); + } + + @Test + @DisplayName("should throw exception from checkPrivilege when privilege denied") + void shouldThrowExceptionFromCheckPrivilege_whenPrivilegeDenied() { + // Test the public checkPrivilege(LoggedInInfo, String) method directly + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + // checkPrivilege with write privilege should throw when denied + assertThatThrownBy(() -> manager.checkPrivilege(mockLoggedInInfo, "w")) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw exception from checkPrivilege with demographicNo when privilege denied") + void shouldThrowExceptionFromCheckPrivilegeWithDemoNo_whenPrivilegeDenied() { + // Test the overloaded checkPrivilege(LoggedInInfo, String, Integer) method + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), anyInt())) + .thenReturn(false); + + // checkPrivilege with demographicNo parameter should throw when denied + assertThatThrownBy(() -> manager.checkPrivilege(mockLoggedInInfo, "r", TEST_DEMO_NO)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw RuntimeException when write privilege denied for deleteDemographic") + void shouldThrowException_whenWritePrivilegeDeniedForDelete() { + // deleteDemographic requires WRITE privilege (SecurityInfoManager.WRITE) + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + Demographic demographic = createTestDemographicWithId(TEST_DEMO_NO); + + // Should throw before any deletion logic executes + assertThatThrownBy(() -> manager.deleteDemographic(mockLoggedInInfo, demographic)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw RuntimeException when write privilege denied for createExtension") + void shouldThrowException_whenWritePrivilegeDeniedForCreateExtension() { + // createExtension requires WRITE privilege (SecurityInfoManager.WRITE) + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + DemographicExt ext = createTestDemographicExt(TEST_DEMO_NO, "testKey", "testValue"); + + // Should throw before any persistence occurs + assertThatThrownBy(() -> manager.createExtension(mockLoggedInInfo, ext)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw RuntimeException when update privilege denied for updateExtension") + void shouldThrowException_whenUpdatePrivilegeDeniedForUpdateExtension() { + // updateExtension requires UPDATE privilege (SecurityInfoManager.UPDATE) + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + DemographicExt ext = createTestDemographicExtWithId(1, TEST_DEMO_NO, "testKey", "testValue"); + + // Should throw before any archiving or update occurs + assertThatThrownBy(() -> manager.updateExtension(mockLoggedInInfo, ext)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + + @Test + @DisplayName("should throw RuntimeException when write privilege denied for deleteExtension") + void shouldThrowException_whenWritePrivilegeDeniedForDeleteExtension() { + // deleteExtension requires WRITE privilege (SecurityInfoManager.WRITE) + reset(mockSecurityInfoManager); + when(mockSecurityInfoManager.hasPrivilege(any(), anyString(), anyString(), isNull())) + .thenReturn(false); + + DemographicExt ext = createTestDemographicExtWithId(1, TEST_DEMO_NO, "testKey", "testValue"); + + // Should throw before any archiving or deletion occurs + assertThatThrownBy(() -> manager.deleteExtension(mockLoggedInInfo, ext)) + .isInstanceOf(RuntimeException.class) + .hasMessageContaining("missing required sec object"); + } + } + + // ==================== CORE GET OPERATIONS ==================== + + /** + * Tests for core demographic retrieval operations. + * + *

    These tests cover the fundamental get/retrieve operations including:

    + *
      + *
    • getDemographic by ID (Integer and String)
    • + *
    • getDemographicWithExt (demographic with extensions)
    • + *
    • getDemographicFormattedName
    • + *
    • getDemographicEmail
    • + *
    + */ + @Nested + @DisplayName("Core Get Operations") + @Tag("read") + class CoreGetOperationsTests { + + @Test + @DisplayName("should return demographic when valid ID provided") + void shouldReturnDemographic_whenValidIdProvided() { + Demographic expected = createTestDemographic(); + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(expected); + + Demographic result = manager.getDemographic(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + assertThat(result.getDemographicNo()).isEqualTo(TEST_DEMO_NO); + verify(mockDemographicDao).getDemographicById(TEST_DEMO_NO); + } + + @Test + @DisplayName("should return null when demographic not found") + void shouldReturnNull_whenDemographicNotFound() { + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(null); + + Demographic result = manager.getDemographic(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return demographic when valid string ID provided") + void shouldReturnDemographic_whenValidStringIdProvided() { + Demographic expected = createTestDemographic(); + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(expected); + + Demographic result = manager.getDemographic(mockLoggedInInfo, String.valueOf(TEST_DEMO_NO)); + + assertThat(result).isNotNull(); + assertThat(result.getDemographicNo()).isEqualTo(TEST_DEMO_NO); + } + + @Test + @DisplayName("should return null when non-numeric string ID provided") + void shouldReturnNull_whenNonNumericStringIdProvided() { + Demographic result = manager.getDemographic(mockLoggedInInfo, "invalid"); + + assertThat(result).isNull(); + verify(mockDemographicDao, never()).getDemographicById(any()); + } + + @Test + @DisplayName("should return demographic with extensions when requested") + void shouldReturnDemographicWithExtensions_whenRequested() { + Demographic expected = createTestDemographic(); + List extensions = List.of( + createTestDemographicExt(TEST_DEMO_NO, "key1", "value1"), + createTestDemographicExt(TEST_DEMO_NO, "key2", "value2") + ); + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(expected); + when(mockDemographicExtDao.getDemographicExtByDemographicNo(TEST_DEMO_NO)).thenReturn(extensions); + + Demographic result = manager.getDemographicWithExt(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + assertThat(result.getExtras()).hasSize(2); + } + + @Test + @DisplayName("should return formatted name when demographic exists") + void shouldReturnFormattedName_whenDemographicExists() { + Demographic expected = createTestDemographic(); + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(expected); + + String result = manager.getDemographicFormattedName(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEqualTo(TEST_LAST_NAME + ", " + TEST_FIRST_NAME); + } + + @Test + @DisplayName("should return null formatted name when demographic not found") + void shouldReturnNullFormattedName_whenDemographicNotFound() { + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(null); + + String result = manager.getDemographicFormattedName(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return email when demographic exists") + void shouldReturnEmail_whenDemographicExists() { + Demographic expected = createTestDemographic(); + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(expected); + + String result = manager.getDemographicEmail(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEqualTo(TEST_EMAIL); + } + + @Test + @DisplayName("should return null email when demographic not found") + void shouldReturnNullEmail_whenDemographicNotFound() { + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(null); + + String result = manager.getDemographicEmail(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNull(); + } + } + + // ==================== SEARCH OPERATIONS ==================== + + /** + * Tests for demographic search functionality. + * + *

    These tests cover various search operations including:

    + *
      + *
    • Search by name (partial matching)
    • + *
    • Search by health card number (HIN)
    • + *
    • Search by multiple attributes
    • + *
    • Search patients with pagination
    • + *
    • Search by chart number
    • + *
    + */ + @Nested + @DisplayName("Search Operations") + @Tag("search") + class SearchOperationsTests { + + @Test + @DisplayName("should return demographics when searching by name") + void shouldReturnDemographics_whenSearchingByName() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.searchDemographicByNameString("Doe", 0, 10)).thenReturn(expected); + + List result = manager.searchDemographicByName(mockLoggedInInfo, "Doe", 0, 10); + + assertThat(result).hasSize(1); + verify(mockDemographicDao).searchDemographicByNameString("Doe", 0, 10); + } + + @Test + @DisplayName("should return empty list when no matches found by name") + void shouldReturnEmptyList_whenNoMatchesFoundByName() { + when(mockDemographicDao.searchDemographicByNameString("NonExistent", 0, 10)) + .thenReturn(Collections.emptyList()); + + List result = manager.searchDemographicByName(mockLoggedInInfo, "NonExistent", 0, 10); + + assertThat(result).isEmpty(); + } + + @Test + @DisplayName("should return demographics by attributes with all parameters") + void shouldReturnDemographics_whenSearchingByAttributes() { + List expected = List.of(createTestDemographic()); + Calendar dob = Calendar.getInstance(); + dob.set(1980, Calendar.JANUARY, 15); + + when(mockDemographicDao.findByAttributes( + eq(TEST_HIN), eq(TEST_FIRST_NAME), eq(TEST_LAST_NAME), + eq(Gender.M), any(Calendar.class), eq("Toronto"), eq("ON"), + eq(TEST_PHONE), eq(TEST_EMAIL), isNull(), eq(0), eq(10) + )).thenReturn(expected); + + List result = manager.searchDemographicsByAttributes( + mockLoggedInInfo, TEST_HIN, TEST_FIRST_NAME, TEST_LAST_NAME, + Gender.M, dob, "Toronto", "ON", TEST_PHONE, TEST_EMAIL, null, 0, 10 + ); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return demographics when searching generic string") + void shouldReturnDemographics_whenSearchingGenericString() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.searchDemographic("John Doe")).thenReturn(expected); + + List result = manager.searchDemographic(mockLoggedInInfo, "John Doe"); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should throw SecurityException when searchDemographic called without login") + void shouldThrowSecurityException_whenSearchDemographicCalledWithoutLogin() { + assertThatThrownBy(() -> manager.searchDemographic(null, "test")) + .isInstanceOf(SecurityException.class) + .hasMessageContaining("user not logged in"); + } + + @Test + @DisplayName("should return demographics by health card number") + void shouldReturnDemographics_whenSearchingByHealthCard() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.searchByHealthCard(TEST_HIN)).thenReturn(expected); + + List result = manager.searchByHealthCard(mockLoggedInInfo, TEST_HIN); + + assertThat(result).hasSize(1); + verify(mockDemographicDao).searchByHealthCard(TEST_HIN); + } + + @Test + @DisplayName("should return active demographics by health card and type") + void shouldReturnActiveDemographics_whenSearchingByHealthCardAndType() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.getActiveDemosByHealthCardNo(TEST_HIN, "ON")).thenReturn(expected); + + List result = manager.getActiveDemosByHealthCardNo(mockLoggedInInfo, TEST_HIN, "ON"); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return demographics by chart number") + void shouldReturnDemographics_whenSearchingByChartNo() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.getClientsByChartNo("CHART001")).thenReturn(expected); + + List result = manager.getDemosByChartNo(mockLoggedInInfo, "CHART001"); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return demographic by name phone and email") + void shouldReturnDemographic_whenSearchingByNamePhoneEmail() { + Demographic expected = createTestDemographic(); + when(mockDemographicDao.getDemographicByNamePhoneEmail( + TEST_FIRST_NAME, TEST_LAST_NAME, TEST_PHONE, null, TEST_EMAIL + )).thenReturn(expected); + + Demographic result = manager.getDemographicByNamePhoneEmail( + mockLoggedInInfo, TEST_FIRST_NAME, TEST_LAST_NAME, TEST_PHONE, null, TEST_EMAIL + ); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return demographics by last first and DOB") + void shouldReturnDemographics_whenSearchingByLastFirstDOB() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.getDemographicWithLastFirstDOB( + TEST_LAST_NAME, TEST_FIRST_NAME, "1980", "01", "15" + )).thenReturn(expected); + + List result = manager.getDemographicWithLastFirstDOB( + mockLoggedInInfo, TEST_LAST_NAME, TEST_FIRST_NAME, "1980", "01", "15" + ); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return search results from searchPatients") + void shouldReturnSearchResults_fromSearchPatients() { + DemographicSearchRequest request = new DemographicSearchRequest(); + DemographicSearchResult searchResult = new DemographicSearchResult(); + searchResult.setDemographicNo(TEST_DEMO_NO); + List expected = List.of(searchResult); + + when(mockDemographicDao.searchPatients(mockLoggedInInfo, request, 0, 10)).thenReturn(expected); + + List result = manager.searchPatients(mockLoggedInInfo, request, 0, 10); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return count from searchPatientsCount") + void shouldReturnCount_fromSearchPatientsCount() { + DemographicSearchRequest request = new DemographicSearchRequest(); + when(mockDemographicDao.searchPatientCount(mockLoggedInInfo, request)).thenReturn(42); + + int result = manager.searchPatientsCount(mockLoggedInInfo, request); + + assertThat(result).isEqualTo(42); + } + } + + // ==================== EXTENSION OPERATIONS ==================== + + /** + * Tests for DemographicExt (extension) operations. + * + *

    DemographicExt stores additional key-value pairs associated with demographics. + * These tests cover:

    + *
      + *
    • Retrieving extensions by demographic number
    • + *
    • Getting specific extension by key
    • + *
    • Creating new extensions
    • + *
    • Updating extensions (with archive-before-update pattern)
    • + *
    • Deleting extensions
    • + *
    • Direct archiving of extensions
    • + *
    + */ + @Nested + @DisplayName("Demographic Extension Operations") + @Tag("extension") + class ExtensionOperationsTests { + + @Test + @DisplayName("should return all extensions for demographic") + void shouldReturnAllExtensions_forDemographic() { + List expected = List.of( + createTestDemographicExt(TEST_DEMO_NO, "key1", "value1"), + createTestDemographicExt(TEST_DEMO_NO, "key2", "value2") + ); + when(mockDemographicExtDao.getDemographicExtByDemographicNo(TEST_DEMO_NO)).thenReturn(expected); + + List result = manager.getDemographicExts(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(2); + } + + @Test + @DisplayName("should return specific extension by key string") + void shouldReturnSpecificExtension_byKeyString() { + DemographicExt expected = createTestDemographicExt(TEST_DEMO_NO, "wPhoneExt", "123"); + when(mockDemographicExtDao.getDemographicExt(TEST_DEMO_NO, "wPhoneExt")).thenReturn(expected); + + DemographicExt result = manager.getDemographicExt(mockLoggedInInfo, TEST_DEMO_NO, "wPhoneExt"); + + assertThat(result).isNotNull(); + assertThat(result.getKey()).isEqualTo("wPhoneExt"); + } + + @Test + @DisplayName("should return specific extension by enum key") + void shouldReturnSpecificExtension_byEnumKey() { + DemographicExt expected = createTestDemographicExt(TEST_DEMO_NO, "wPhoneExt", "456"); + when(mockDemographicExtDao.getDemographicExt(TEST_DEMO_NO, "wPhoneExt")).thenReturn(expected); + + DemographicExt result = manager.getDemographicExt( + mockLoggedInInfo, TEST_DEMO_NO, DemographicExt.DemographicProperty.wPhoneExt + ); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should create extension and persist") + void shouldCreateExtension_andPersist() { + DemographicExt ext = createTestDemographicExt(TEST_DEMO_NO, "newKey", "newValue"); + + manager.createExtension(mockLoggedInInfo, ext); + + verify(mockDemographicExtDao).saveEntity(ext); + } + + @Test + @DisplayName("should update extension with archiving previous value") + void shouldUpdateExtension_withArchivingPreviousValue() { + DemographicExt existing = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "oldValue"); + DemographicExt updated = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "newValue"); + + // Use any() matcher since find() can take Object or int + when(mockDemographicExtDao.find(any())).thenReturn(existing); + + manager.updateExtension(mockLoggedInInfo, updated); + + verify(mockDemographicExtArchiveDao).archiveDemographicExt(existing); + verify(mockDemographicExtDao).saveEntity(updated); + } + + @Test + @DisplayName("should not archive when extension value unchanged") + void shouldNotArchive_whenExtensionValueUnchanged() { + DemographicExt existing = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "sameValue"); + DemographicExt updated = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "sameValue"); + + // Use any() matcher since find() can take Object or int + when(mockDemographicExtDao.find(any())).thenReturn(existing); + + manager.updateExtension(mockLoggedInInfo, updated); + + verify(mockDemographicExtArchiveDao, never()).archiveDemographicExt(any()); + verify(mockDemographicExtDao).saveEntity(updated); + } + + @Test + @DisplayName("should delete extension with archiving") + void shouldDeleteExtension_withArchiving() { + // Create the ext to delete (with a different value than what's in DB) + DemographicExt extToDelete = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "newValue"); + // Create the existing ext in DB with original value (different to trigger archiving) + DemographicExt existingExt = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "originalValue"); + + // Use any() matcher since find() can take Object or int + when(mockDemographicExtDao.find(any())).thenReturn(existingExt); + + manager.deleteExtension(mockLoggedInInfo, extToDelete); + + verify(mockDemographicExtArchiveDao).archiveDemographicExt(existingExt); + verify(mockDemographicExtDao).removeDemographicExt(1); + } + + @Test + @DisplayName("should archive extension directly when values differ") + void shouldArchiveExtension_directly() { + // Extension to archive with new value + DemographicExt ext = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "newValue"); + // Previous extension in DB with old value + DemographicExt prevExt = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "oldValue"); + + when(mockDemographicExtDao.find(any())).thenReturn(prevExt); + + manager.archiveExtension(ext); + + verify(mockDemographicExtArchiveDao).archiveDemographicExt(prevExt); + } + } + + // ==================== CREATE/UPDATE/DELETE OPERATIONS ==================== + + /** + * Tests for demographic CRUD (Create, Read, Update, Delete) operations. + * + *

    These tests verify the core lifecycle operations for demographics:

    + *
      + *
    • Creating demographics with automatic admission creation
    • + *
    • Setting default patient status on creation
    • + *
    • Updating demographics with archive-before-update pattern
    • + *
    • Deleting demographics (soft delete via status change)
    • + *
    • Adding demographics without admission
    • + *
    + * + *

    Archive Pattern: The manager archives the previous record before + * updates to maintain audit history for regulatory compliance.

    + */ + @Nested + @DisplayName("Create, Update, and Delete Operations") + @Tag("crud") + class CrudOperationsTests { + + @Test + @DisplayName("should create demographic with admission") + void shouldCreateDemographic_withAdmission() { + Demographic demographic = createTestDemographic(); + demographic.setDemographicNo(null); + + manager.createDemographic(mockLoggedInInfo, demographic, TEST_PROGRAM_ID); + + verify(mockDemographicDao).save(demographic); + verify(mockAdmissionDao).saveAdmission(any(Admission.class)); + } + + @Test + @DisplayName("should set patient status to AC when creating") + void shouldSetPatientStatusToAC_whenCreating() { + Demographic demographic = createTestDemographic(); + demographic.setPatientStatus(null); + + manager.createDemographic(mockLoggedInInfo, demographic, TEST_PROGRAM_ID); + + assertThat(demographic.getPatientStatus()).isEqualTo(Demographic.PatientStatus.AC.name()); + } + + @Test + @DisplayName("should set family doctor default when creating") + void shouldSetFamilyDoctorDefault_whenCreating() { + Demographic demographic = createTestDemographic(); + + manager.createDemographic(mockLoggedInInfo, demographic, TEST_PROGRAM_ID); + + assertThat(demographic.getFamilyDoctor()).isEqualTo(""); + } + + @Test + @DisplayName("should create extensions when demographic has extras") + void shouldCreateExtensions_whenDemographicHasExtras() { + Demographic demographic = createTestDemographic(); + DemographicExt[] extras = { + createTestDemographicExt(null, "key1", "value1"), + createTestDemographicExt(null, "key2", "value2") + }; + demographic.setExtras(extras); + + manager.createDemographic(mockLoggedInInfo, demographic, TEST_PROGRAM_ID); + + verify(mockDemographicExtDao, times(2)).saveEntity(any(DemographicExt.class)); + } + + @Test + @DisplayName("should throw exception when birth date invalid") + void shouldThrowException_whenBirthDateInvalid() { + Demographic demographic = createTestDemographic(); + demographic.setYearOfBirth("invalid"); + demographic.setMonthOfBirth("00"); + demographic.setDateOfBirth("00"); + + assertThatThrownBy(() -> manager.createDemographic(mockLoggedInInfo, demographic, TEST_PROGRAM_ID)) + .isInstanceOf(IllegalArgumentException.class); + } + + @Test + @DisplayName("should update demographic with archiving previous record") + void shouldUpdateDemographic_withArchivingPreviousRecord() { + Demographic previous = createTestDemographicWithId(TEST_DEMO_NO); + Demographic updated = createTestDemographicWithId(TEST_DEMO_NO); + updated.setFirstName("UpdatedName"); + + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(previous); + + manager.updateDemographic(mockLoggedInInfo, updated); + + verify(mockDemographicArchiveDao).archiveRecord(previous); + verify(mockDemographicDao).save(updated); + } + + @Test + @DisplayName("should retain subRecord when updating demographic") + void shouldRetainSubRecord_whenUpdatingDemographic() { + Demographic previous = createTestDemographicWithId(TEST_DEMO_NO); + Set subRecords = new HashSet<>(Set.of(100, 101)); + previous.setSubRecord(subRecords); + + Demographic updated = createTestDemographicWithId(TEST_DEMO_NO); + + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(previous); + + manager.updateDemographic(mockLoggedInInfo, updated); + + assertThat(updated.getSubRecord()).isEqualTo(subRecords); + } + + @Test + @DisplayName("should set lastUpdateUser when updating demographic") + void shouldSetLastUpdateUser_whenUpdatingDemographic() { + Demographic previous = createTestDemographicWithId(TEST_DEMO_NO); + Demographic updated = createTestDemographicWithId(TEST_DEMO_NO); + + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(previous); + + manager.updateDemographic(mockLoggedInInfo, updated); + + assertThat(updated.getLastUpdateUser()).isEqualTo(TEST_PROVIDER); + } + + @Test + @DisplayName("should add demographic without admission") + void shouldAddDemographic_withoutAdmission() { + Demographic demographic = createTestDemographic(); + + manager.addDemographic(mockLoggedInInfo, demographic); + + verify(mockDemographicDao).save(demographic); + verify(mockAdmissionDao, never()).saveAdmission(any()); + } + + @Test + @DisplayName("should delete demographic by setting status to DE") + void shouldDeleteDemographic_bySettingStatusToDE() { + Demographic demographic = createTestDemographicWithId(TEST_DEMO_NO); + when(mockDemographicExtDao.getDemographicExtByDemographicNo(TEST_DEMO_NO)) + .thenReturn(Collections.emptyList()); + + manager.deleteDemographic(mockLoggedInInfo, demographic); + + verify(mockDemographicArchiveDao).archiveRecord(demographic); + assertThat(demographic.getPatientStatus()).isEqualTo(Demographic.PatientStatus.DE.name()); + verify(mockDemographicDao).save(demographic); + } + + @Test + @DisplayName("should delete all extensions when deleting demographic") + void shouldDeleteAllExtensions_whenDeletingDemographic() { + Demographic demographic = createTestDemographicWithId(TEST_DEMO_NO); + DemographicExt ext1 = createTestDemographicExtWithId(1, TEST_DEMO_NO, "key1", "value1"); + DemographicExt ext2 = createTestDemographicExtWithId(2, TEST_DEMO_NO, "key2", "value2"); + List extensions = List.of(ext1, ext2); + + when(mockDemographicExtDao.getDemographicExtByDemographicNo(TEST_DEMO_NO)).thenReturn(extensions); + // Use any() matcher since find() can take Object or int + when(mockDemographicExtDao.find(any())) + .thenAnswer(invocation -> { + Object id = invocation.getArgument(0); + if (Integer.valueOf(1).equals(id)) return ext1; + if (Integer.valueOf(2).equals(id)) return ext2; + return null; + }); + + manager.deleteDemographic(mockLoggedInInfo, demographic); + + verify(mockDemographicExtDao, times(2)).removeDemographicExt(anyInt()); + } + + @Test + @DisplayName("should throw NullPointerException when updating non-existent demographic") + void shouldThrowNullPointerException_whenUpdatingNonExistentDemographic() { + Demographic demographic = createTestDemographicWithId(TEST_DEMO_NO); + + // Return null to simulate demographic not found + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(null); + + // The implementation calls prevDemo.getSubRecord() which will NPE if prevDemo is null + assertThatThrownBy(() -> manager.updateDemographic(mockLoggedInInfo, demographic)) + .isInstanceOf(NullPointerException.class); + } + } + + // ==================== DEMOGRAPHIC CUST OPERATIONS ==================== + + /** + * Tests for DemographicCust operations. + * + *

    DemographicCust stores additional custom fields for a demographic such as + * nurse, resident, midwife assignments, alerts, and notes. These tests cover:

    + *
      + *
    • Retrieving DemographicCust by demographic number
    • + *
    • Creating new DemographicCust records
    • + *
    • Updating with archive-before-update pattern
    • + *
    • Handling cases where no changes are made (no archiving)
    • + *
    + */ + @Nested + @DisplayName("Demographic Cust Operations") + @Tag("cust") + class DemographicCustOperationsTests { + + @Test + @DisplayName("should return DemographicCust when found") + void shouldReturnDemographicCust_whenFound() { + DemographicCust expected = createTestDemographicCust(TEST_DEMO_NO); + when(mockDemographicCustDao.find(TEST_DEMO_NO)).thenReturn(expected); + + DemographicCust result = manager.getDemographicCust(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return null when DemographicCust not found") + void shouldReturnNull_whenDemographicCustNotFound() { + when(mockDemographicCustDao.find(TEST_DEMO_NO)).thenReturn(null); + + DemographicCust result = manager.getDemographicCust(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should create new DemographicCust when none exists") + void shouldCreateNewDemographicCust_whenNoneExists() { + DemographicCust newCust = createTestDemographicCust(TEST_DEMO_NO); + when(mockDemographicCustDao.find(TEST_DEMO_NO)).thenReturn(null); + + manager.createUpdateDemographicCust(mockLoggedInInfo, newCust); + + verify(mockDemographicCustDao).merge(newCust); + verify(mockDemographicCustArchiveDao, never()).archiveDemographicCust(any()); + } + + @Test + @DisplayName("should archive previous DemographicCust when updating with changes") + void shouldArchivePreviousDemographicCust_whenUpdatingWithChanges() { + DemographicCust existing = createTestDemographicCust(TEST_DEMO_NO); + DemographicCust updated = createTestDemographicCust(TEST_DEMO_NO); + updated.setAlert("new alert"); + + when(mockDemographicCustDao.find(TEST_DEMO_NO)).thenReturn(existing); + + manager.createUpdateDemographicCust(mockLoggedInInfo, updated); + + verify(mockDemographicCustArchiveDao).archiveDemographicCust(existing); + verify(mockDemographicCustDao).merge(updated); + } + + @Test + @DisplayName("should not archive when DemographicCust unchanged") + void shouldNotArchive_whenDemographicCustUnchanged() { + DemographicCust existing = createTestDemographicCust(TEST_DEMO_NO); + DemographicCust updated = createTestDemographicCust(TEST_DEMO_NO); + + when(mockDemographicCustDao.find(TEST_DEMO_NO)).thenReturn(existing); + + manager.createUpdateDemographicCust(mockLoggedInInfo, updated); + + verify(mockDemographicCustArchiveDao, never()).archiveDemographicCust(any()); + } + } + + // ==================== CONTACT OPERATIONS ==================== + + /** + * Tests for DemographicContact operations. + * + *

    DemographicContact represents relationships between demographics and various + * contact types (providers, other demographics, specialists). Tests cover:

    + *
      + *
    • Retrieving contacts by category (personal, professional)
    • + *
    • Finding active contacts
    • + *
    • Creating and updating contacts
    • + *
    • Finding Substitute Decision Makers (SDM)
    • + *
    • Emergency contact retrieval
    • + *
    + */ + @Nested + @DisplayName("Demographic Contact Operations") + @Tag("contact") + class ContactOperationsTests { + + @Test + @DisplayName("should return contacts by demographic and category") + void shouldReturnContacts_byDemographicAndCategory() { + List expected = List.of( + createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0) + ); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(expected); + + List result = manager.getDemographicContacts( + mockLoggedInInfo, TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL + ); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return active contacts by demographic only") + void shouldReturnActiveContacts_byDemographicOnly() { + List expected = List.of( + createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0) + ); + when(mockDemographicContactDao.findActiveByDemographicNo(TEST_DEMO_NO)).thenReturn(expected); + + List result = manager.getDemographicContacts(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should create or update demographic contact") + void shouldCreateOrUpdateDemographicContact() { + DemographicContact contact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + + manager.createUpdateDemographicContact(mockLoggedInInfo, contact); + + verify(mockDemographicContactDao).merge(contact); + } + + @Test + @DisplayName("should return SDM contacts by demographic") + void shouldReturnSDMContacts_byDemographic() { + DemographicContact sdmContact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL, 1); + sdmContact.setSdm("true"); + List expected = List.of(sdmContact); + + when(mockDemographicContactDao.findSDMByDemographicNo(TEST_DEMO_NO)).thenReturn(expected); + + List result = manager.findSDMByDemographicNo(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return null when demographicNo is null for getHealthCareTeam") + void shouldReturnNull_whenDemographicNoIsNullForGetHealthCareTeam() { + List result = manager.getHealthCareTeam(mockLoggedInInfo, null); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return health care team contacts") + void shouldReturnHealthCareTeamContacts() { + List expected = List.of( + createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0) + ); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(expected); + + List result = manager.getHealthCareTeam(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return null when demographicNo is null for getPersonalEmergencyContacts") + void shouldReturnNull_whenDemographicNoIsNullForGetPersonalEmergencyContacts() { + List result = manager.getPersonalEmergencyContacts(mockLoggedInInfo, null); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return personal emergency contacts") + void shouldReturnPersonalEmergencyContacts() { + List expected = List.of( + createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL, 1) + ); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL)) + .thenReturn(expected); + + List result = manager.getPersonalEmergencyContacts(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return emergency contacts only when marked as EC") + void shouldReturnEmergencyContacts_onlyWhenMarkedAsEC() { + DemographicContact ecContact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL, 1); + ecContact.setEc("true"); + DemographicContact nonEcContact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL, 1); + nonEcContact.setEc("false"); + + List contacts = List.of(ecContact, nonEcContact); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL)) + .thenReturn(contacts); + + List result = manager.getEmergencyContacts(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + } + + // ==================== PROVIDER/MRP OPERATIONS ==================== + + /** + * Tests for Provider and Most Responsible Provider (MRP) operations. + * + *

    The MRP is the primary healthcare provider responsible for a patient. + * The resolution chain for finding MRP is:

    + *
      + *
    1. demographic.providerNo (primary)
    2. + *
    3. Health care team contact marked as MRP
    4. + *
    5. Most responsible provider from health care team
    6. + *
    + * + *

    Tests also cover listing providers for a demographic and provider caseload queries.

    + */ + @Nested + @DisplayName("Provider and MRP Operations") + @Tag("provider") + class ProviderMrpOperationsTests { + + @Test + @DisplayName("should return MRP from demographic providerNo") + void shouldReturnMRP_fromDemographicProviderNo() { + Demographic demographic = createTestDemographic(); + Provider expectedMrp = createTestProvider(); + + when(mockProviderManager.getProvider(mockLoggedInInfo, TEST_PROVIDER)).thenReturn(expectedMrp); + + Provider result = manager.getMRP(mockLoggedInInfo, demographic); + + assertThat(result).isNotNull(); + assertThat(result.getProviderNo()).isEqualTo(TEST_PROVIDER); + assertThat(demographic.getMrp()).isEqualTo(expectedMrp); + } + + @Test + @DisplayName("should fallback to health care team when providerNo is null") + void shouldFallbackToHealthCareTeam_whenProviderNoIsNull() { + Demographic demographic = createTestDemographic(); + demographic.setProviderNo(null); + + DemographicContact contact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + contact.setMrp(true); + contact.setContactId("999991"); + List contacts = List.of(contact); + + Provider expectedMrp = createTestProviderWithNo("999991"); + + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(contacts); + when(mockProviderManager.getProvider(mockLoggedInInfo, "999991")).thenReturn(expectedMrp); + + Provider result = manager.getMRP(mockLoggedInInfo, demographic); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return MRP by demographic ID") + void shouldReturnMRP_byDemographicId() { + Demographic demographic = createTestDemographic(); + Provider expectedMrp = createTestProvider(); + + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(demographic); + when(mockProviderManager.getProvider(mockLoggedInInfo, TEST_PROVIDER)).thenReturn(expectedMrp); + + Provider result = manager.getMRP(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return most responsible providers from health care team") + void shouldReturnMostResponsibleProviders_fromHealthCareTeam() { + DemographicContact contact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + contact.setContactId(TEST_PROVIDER); + List contacts = List.of(contact); + + Provider provider = createTestProvider(); + + when(mockDemographicContactDao.findAllByDemographicNoAndCategoryAndType(TEST_DEMO_NO, "professional", 0)) + .thenReturn(contacts); + when(mockProviderManager.getProvider(mockLoggedInInfo, TEST_PROVIDER)).thenReturn(provider); + + List result = manager.getDemographicMostResponsibleProviders(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return empty list when no providers found") + void shouldReturnEmptyList_whenNoProvidersFound() { + when(mockDemographicContactDao.findAllByDemographicNoAndCategoryAndType(TEST_DEMO_NO, "professional", 0)) + .thenReturn(Collections.emptyList()); + + List result = manager.getDemographicMostResponsibleProviders(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEmpty(); + } + + @Test + @DisplayName("should return demographics by provider") + void shouldReturnDemographics_byProvider() { + Provider provider = createTestProvider(); + List expected = List.of(createTestDemographic()); + + when(mockDemographicDao.getDemographicByProvider(TEST_PROVIDER, true)).thenReturn(expected); + + List result = manager.getDemographicsByProvider(mockLoggedInInfo, provider); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return empty list when provider is null for getDemographicsNameRangeByProvider") + void shouldReturnEmptyList_whenProviderIsNull() { + List result = manager.getDemographicsNameRangeByProvider(mockLoggedInInfo, null, "^[A-M]"); + + assertThat(result).isEmpty(); + } + + @Test + @DisplayName("should filter demographics by lastname regex") + void shouldFilterDemographics_byLastnameRegex() { + Provider provider = createTestProvider(); + Demographic matchingDemo = createTestDemographic(); + matchingDemo.setLastName("ADAMS"); + Demographic nonMatchingDemo = createTestDemographic(); + nonMatchingDemo.setLastName("SMITH"); + + List allDemos = List.of(matchingDemo, nonMatchingDemo); + when(mockDemographicDao.getDemographicByProvider(TEST_PROVIDER)).thenReturn(allDemos); + + List result = manager.getDemographicsNameRangeByProvider(mockLoggedInInfo, provider, "^[A-M]"); + + assertThat(result).hasSize(1); + assertThat(result.get(0).getLastName()).isEqualTo("ADAMS"); + } + } + + // ==================== MERGE OPERATIONS ==================== + + /** + * Tests for demographic merge and unmerge operations. + * + *

    Merging allows combining duplicate patient records while maintaining + * data integrity. The parent record becomes the primary, and children + * are marked as merged (soft-linked). Tests cover:

    + *
      + *
    • Merging multiple children to a parent
    • + *
    • Unmerging (restoring) children from parent
    • + *
    • Retrieving merged demographic information
    • + *
    • Getting merged demographic IDs
    • + *
    + */ + @Nested + @DisplayName("Merge Operations") + @Tag("merge") + class MergeOperationsTests { + + @Test + @DisplayName("should merge multiple children to parent") + void shouldMergeMultipleChildren_toParent() { + Integer parentId = 1000; + List children = List.of(1001, 1002, 1003); + + manager.mergeDemographics(mockLoggedInInfo, parentId, children); + + verify(mockDemographicMergedDao, times(3)).persist(any(DemographicMerged.class)); + } + + @Test + @DisplayName("should unmerge children from parent") + void shouldUnmergeChildren_fromParent() { + Integer parentId = 1000; + Integer childId = 1001; + List children = List.of(childId); + + DemographicMerged mergeRecord = createTestDemographicMergedWithId(1, childId, parentId); + when(mockDemographicMergedDao.findByParentAndChildIds(parentId, childId)) + .thenReturn(List.of(mergeRecord)); + + manager.unmergeDemographics(mockLoggedInInfo, parentId, children); + + assertThat(mergeRecord.getDeleted()).isEqualTo(1); + verify(mockDemographicMergedDao).merge(mergeRecord); + } + + @Test + @DisplayName("should throw exception when unmerging non-existent merge") + void shouldThrowException_whenUnmergingNonExistentMerge() { + Integer parentId = 1000; + List children = List.of(1001); + + when(mockDemographicMergedDao.findByParentAndChildIds(parentId, 1001)) + .thenReturn(Collections.emptyList()); + + assertThatThrownBy(() -> manager.unmergeDemographics(mockLoggedInInfo, parentId, children)) + .isInstanceOf(IllegalArgumentException.class) + .hasMessageContaining("Unable to find merge record"); + } + + @Test + @DisplayName("should return merged demographics for parent") + void shouldReturnMergedDemographics_forParent() { + int parentId = 1000; + List expected = List.of( + createTestDemographicMerged(1001, parentId), + createTestDemographicMerged(1002, parentId) + ); + + when(mockDemographicMergedDao.findCurrentByMergedTo(parentId)).thenReturn(expected); + + List result = manager.getMergedDemographics(mockLoggedInInfo, parentId); + + assertThat(result).hasSize(2); + } + + @Test + @DisplayName("should return merged demographic IDs") + void shouldReturnMergedDemographicIds() { + List expected = List.of(1001, 1002); + when(mockDemographicDao.getMergedDemographics(TEST_DEMO_NO)).thenReturn(expected); + + List result = manager.getMergedDemographicIds(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(2); + } + + @Test + @DisplayName("should do nothing when merging with empty children list") + void shouldDoNothing_whenMergingWithEmptyChildrenList() { + // Edge case: empty children list should be handled gracefully + Integer parentId = 1000; + List emptyChildren = Collections.emptyList(); + + // The implementation iterates over children, so empty list means no iterations + manager.mergeDemographics(mockLoggedInInfo, parentId, emptyChildren); + + // Verify no merge records were persisted and no exceptions thrown + verify(mockDemographicMergedDao, never()).persist(any(DemographicMerged.class)); + } + } + + // ==================== CONSENT OPERATIONS ==================== + + /** + * Tests for patient consent management. + * + *

    Consent tracking is required for privacy compliance and data sharing. + * Tests cover:

    + *
      + *
    • Updating patient consent status
    • + *
    • Checking if a patient has consented to a specific consent type
    • + *
    + */ + @Nested + @DisplayName("Consent Operations") + @Tag("consent") + class ConsentOperationsTests { + + @Test + @DisplayName("should update patient consent") + void shouldUpdatePatientConsent() { + ConsentType consentType = new ConsentType(); + consentType.setId(1); + + when(mockPatientConsentManager.getConsentType("INTEGRATOR_PATIENT_CONSENT")).thenReturn(consentType); + + manager.updatePatientConsent(mockLoggedInInfo, TEST_DEMO_NO, "INTEGRATOR_PATIENT_CONSENT", true); + + verify(mockPatientConsentManager).setConsent(mockLoggedInInfo, TEST_DEMO_NO, 1, true); + } + + @Test + @DisplayName("should check if patient is consented") + void shouldCheckIfPatientIsConsented() { + ConsentType consentType = new ConsentType(); + consentType.setId(1); + + when(mockPatientConsentManager.getConsentType("INTEGRATOR_PATIENT_CONSENT")).thenReturn(consentType); + when(mockPatientConsentManager.hasPatientConsented(TEST_DEMO_NO, consentType)).thenReturn(true); + + boolean result = manager.isPatientConsented(mockLoggedInInfo, TEST_DEMO_NO, "INTEGRATOR_PATIENT_CONSENT"); + + assertThat(result).isTrue(); + } + } + + // ==================== UTILITY METHODS ==================== + + /** + * Tests for utility methods and simple queries. + * + *

    These tests cover miscellaneous helper methods:

    + *
      + *
    • Getting patient status list (AC, IN, DE, etc.)
    • + *
    • Getting roster status list
    • + *
    • Getting work phone and extension
    • + *
    • Getting next appointment date
    • + *
    • Retrieving archive metadata
    • + *
    + */ + @Nested + @DisplayName("Utility Methods") + @Tag("utility") + class UtilityMethodsTests { + + @Test + @DisplayName("should return patient status list") + void shouldReturnPatientStatusList() { + List expected = List.of("AC", "IN", "DE"); + when(mockDemographicDao.search_ptstatus()).thenReturn(expected); + + List result = manager.getPatientStatusList(); + + assertThat(result).hasSize(3); + } + + @Test + @DisplayName("should return roster status list") + void shouldReturnRosterStatusList() { + List expected = List.of("RO", "NR", "TE"); + when(mockDemographicDao.getRosterStatuses()).thenReturn(expected); + + List result = manager.getRosterStatusList(); + + assertThat(result).hasSize(3); + } + + @Test + @DisplayName("should return work phone with extension") + void shouldReturnWorkPhoneWithExtension() { + Demographic demographic = createTestDemographic(); + demographic.setPhone2("416-555-9999"); + + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(demographic); + when(mockDemographicExtDao.getValueForDemoKey(TEST_DEMO_NO, "wPhoneExt")).thenReturn("123"); + + String result = manager.getDemographicWorkPhoneAndExtension(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEqualTo("416-555-9999x123"); + } + + @Test + @DisplayName("should return work phone without extension when none exists") + void shouldReturnWorkPhoneWithoutExtension_whenNoneExists() { + Demographic demographic = createTestDemographic(); + demographic.setPhone2("416-555-9999"); + + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(demographic); + when(mockDemographicExtDao.getValueForDemoKey(TEST_DEMO_NO, "wPhoneExt")).thenReturn(null); + + String result = manager.getDemographicWorkPhoneAndExtension(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEqualTo("416-555-9999"); + } + + @Test + @DisplayName("should return archive meta for demographic") + void shouldReturnArchiveMeta_forDemographic() { + List expected = List.of(new Object[]{"data1"}, new Object[]{"data2"}); + when(mockDemographicArchiveDao.findMetaByDemographicNo(TEST_DEMO_NO)).thenReturn(expected); + + List result = manager.getArchiveMeta(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(2); + } + + @Test + @DisplayName("should return next appointment date") + void shouldReturnNextAppointmentDate() { + when(mockAppointmentManager.getNextAppointmentDate(TEST_DEMO_NO)).thenReturn("2025-02-15 10:00"); + + String result = manager.getNextAppointmentDate(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEqualTo("2025-02-15 10:00"); + } + + @Test + @DisplayName("should set next appointment on demographic object") + void shouldSetNextAppointment_onDemographicObject() { + Demographic demographic = createTestDemographic(); + when(mockAppointmentManager.getNextAppointmentDate(TEST_DEMO_NO)).thenReturn("2025-02-15 10:00"); + + String result = manager.getNextAppointmentDate(mockLoggedInInfo, demographic); + + assertThat(result).isEqualTo("2025-02-15 10:00"); + assertThat(demographic.getNextAppointment()).isEqualTo("2025-02-15 10:00"); + } + } + + // ==================== ACTIVE DEMOGRAPHICS ==================== + + /** + * Tests for active demographics queries. + * + *

    Active demographics are patients with status 'AC' (Active). + * These tests cover counting and listing active patients for + * reporting and administrative purposes.

    + */ + @Nested + @DisplayName("Active Demographics Operations") + @Tag("active") + class ActiveDemographicsTests { + + @Test + @DisplayName("should return active demographic count") + void shouldReturnActiveDemographicCount() { + when(mockDemographicDao.getActiveDemographicCount()).thenReturn(1000L); + + Long result = manager.getActiveDemographicCount(mockLoggedInInfo); + + assertThat(result).isEqualTo(1000L); + } + + @Test + @DisplayName("should return active demographics with pagination") + void shouldReturnActiveDemographics_withPagination() { + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.getActiveDemographics(0, 10)).thenReturn(expected); + + List result = manager.getActiveDemographics(mockLoggedInInfo, 0, 10); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return active demographics after date") + void shouldReturnActiveDemographics_afterDate() { + Date afterDate = new Date(); + List expected = List.of(createTestDemographic()); + when(mockDemographicDao.getActiveDemographicAfter(afterDate)).thenReturn(expected); + + List result = manager.getActiveDemographicAfter(mockLoggedInInfo, afterDate); + + assertThat(result).hasSize(1); + } + } + + // ==================== PROVIDER CASELOAD OPERATIONS ==================== + + /** + * Tests for provider caseload queries. + * + *

    Caseload queries support filtering demographics assigned to specific + * provider types (midwife, nurse, resident) with optional lastname regex + * filtering for alphabetical navigation.

    + */ + @Nested + @DisplayName("Provider Caseload Operations") + @Tag("caseload") + class ProviderCaseloadOperationsTests { + + @Test + @DisplayName("should return demographic numbers by midwife and lastname regex") + void shouldReturnDemographicNumbers_byMidwifeAndLastnameRegex() { + List expected = List.of(1001, 1002); + when(mockDemographicExtDao.getDemographicNumbersByDemographicExtKeyAndProviderNumberAndDemographicLastNameRegex( + any(), eq("MW001"), eq("^[A-M]") + )).thenReturn(expected); + + List result = manager.getDemographicNumbersByMidwifeNumberAndDemographicLastNameRegex( + mockLoggedInInfo, "MW001", "^[A-M]" + ); + + assertThat(result).hasSize(2); + } + + @Test + @DisplayName("should return demographic numbers by nurse and lastname regex") + void shouldReturnDemographicNumbers_byNurseAndLastnameRegex() { + List expected = List.of(1003, 1004); + when(mockDemographicExtDao.getDemographicNumbersByDemographicExtKeyAndProviderNumberAndDemographicLastNameRegex( + any(), eq("NR001"), eq("^[N-Z]") + )).thenReturn(expected); + + List result = manager.getDemographicNumbersByNurseNumberAndDemographicLastNameRegex( + mockLoggedInInfo, "NR001", "^[N-Z]" + ); + + assertThat(result).hasSize(2); + } + + @Test + @DisplayName("should return demographic numbers by resident and lastname regex") + void shouldReturnDemographicNumbers_byResidentAndLastnameRegex() { + List expected = List.of(1005); + when(mockDemographicExtDao.getDemographicNumbersByDemographicExtKeyAndProviderNumberAndDemographicLastNameRegex( + any(), eq("RS001"), eq("^DOE") + )).thenReturn(expected); + + List result = manager.getDemographicNumbersByResidentNumberAndDemographicLastNameRegex( + mockLoggedInInfo, "RS001", "^DOE" + ); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return multiple midwife extensions for demographic numbers") + void shouldReturnMultipleMidwifeExtensions_forDemographicNumbers() { + Collection demoNos = List.of(1001, 1002); + List expected = List.of( + createTestDemographicExt(1001, "midwife", "MW001") + ); + when(mockDemographicExtDao.getMultipleDemographicExtKeyForDemographicNumbersByProviderNumber( + any(), eq(demoNos), eq("MW001") + )).thenReturn(expected); + + List result = manager.getMultipleMidwifeForDemographicNumbersByProviderNumber( + mockLoggedInInfo, demoNos, "MW001" + ); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return multiple nurse extensions for demographic numbers") + void shouldReturnMultipleNurseExtensions_forDemographicNumbers() { + Collection demoNos = List.of(1001, 1002); + List expected = List.of( + createTestDemographicExt(1001, "nurse", "NR001") + ); + when(mockDemographicExtDao.getMultipleDemographicExtKeyForDemographicNumbersByProviderNumber( + any(), eq(demoNos), eq("NR001") + )).thenReturn(expected); + + List result = manager.getMultipleNurseForDemographicNumbersByProviderNumber( + mockLoggedInInfo, demoNos, "NR001" + ); + + assertThat(result).hasSize(1); + } + + @Test + @DisplayName("should return multiple resident extensions for demographic numbers") + void shouldReturnMultipleResidentExtensions_forDemographicNumbers() { + Collection demoNos = List.of(1001, 1002); + List expected = List.of( + createTestDemographicExt(1002, "resident", "RS001") + ); + when(mockDemographicExtDao.getMultipleDemographicExtKeyForDemographicNumbersByProviderNumber( + any(), eq(demoNos), eq("RS001") + )).thenReturn(expected); + + List result = manager.getMultipleResidentForDemographicNumbersByProviderNumber( + mockLoggedInInfo, demoNos, "RS001" + ); + + assertThat(result).hasSize(1); + } + } + + // ==================== PROGRAM AND ADMISSION OPERATIONS ==================== + + /** + * Tests for program admission related operations. + * + *

    Program admissions link demographics to specific programs (e.g., mental health, + * chronic disease management). Tests cover querying admitted demographics by + * program and provider.

    + */ + @Nested + @DisplayName("Program and Admission Operations") + @Tag("admission") + class ProgramAdmissionOperationsTests { + + @Test + @DisplayName("should throw SecurityException when loggedInInfo is null for getAdmittedDemographicIds") + void shouldThrowSecurityException_whenLoggedInInfoIsNullForAdmittedDemos() { + assertThatThrownBy(() -> + manager.getAdmittedDemographicIdsByProgramAndProvider(null, TEST_PROGRAM_ID, TEST_PROVIDER) + ).isInstanceOf(SecurityException.class) + .hasMessageContaining("user not logged in"); + } + + @Test + @DisplayName("should return admitted demographic IDs by program and provider") + void shouldReturnAdmittedDemographicIds_byProgramAndProvider() { + List expected = List.of(1001, 1002, 1003); + when(mockAdmissionDao.getAdmittedDemographicIdByProgramAndProvider(TEST_PROGRAM_ID, TEST_PROVIDER)) + .thenReturn(expected); + + List result = manager.getAdmittedDemographicIdsByProgramAndProvider( + mockLoggedInInfo, TEST_PROGRAM_ID, TEST_PROVIDER + ); + + assertThat(result).hasSize(3); + } + + @Test + @DisplayName("should return demographics by list of IDs") + void shouldReturnDemographics_byListOfIds() { + List ids = List.of(1001, 1002); + List expected = List.of( + createTestDemographicWithId(1001), + createTestDemographicWithId(1002) + ); + when(mockDemographicDao.getDemographics(ids)).thenReturn(expected); + + List result = manager.getDemographics(mockLoggedInInfo, ids); + + assertThat(result).hasSize(2); + } + } + + // ==================== MATCHING OPERATIONS ==================== + + /** + * Tests for demographic matching and duplicate detection. + * + *

    Matching operations help identify potential duplicate patient records. + * Two types of matching are supported:

    + *
      + *
    • Exact match: Returns single demographic if exactly one match found
    • + *
    • Fuzzy match: Returns list of potential matches for review
    • + *
    + */ + @Nested + @DisplayName("Demographic Matching Operations") + @Tag("matching") + class MatchingOperationsTests { + + @Test + @DisplayName("should return exact match when one match found") + void shouldReturnExactMatch_whenOneMatchFound() { + Demographic searchDemo = createTestDemographic(); + List matches = List.of(searchDemo); + + when(mockDemographicDao.findByAttributes( + eq(TEST_HIN), eq(TEST_FIRST_NAME), eq(TEST_LAST_NAME), + any(Gender.class), any(Calendar.class), isNull(), isNull(), + isNull(), isNull(), isNull(), eq(0), eq(2) + )).thenReturn(matches); + + Demographic result = manager.findExactMatchToDemographic(mockLoggedInInfo, searchDemo); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return null when multiple matches found") + void shouldReturnNull_whenMultipleMatchesFound() { + Demographic searchDemo = createTestDemographic(); + List matches = List.of( + createTestDemographicWithId(1001), + createTestDemographicWithId(1002) + ); + + when(mockDemographicDao.findByAttributes( + any(), any(), any(), any(), any(), any(), any(), any(), any(), any(), anyInt(), anyInt() + )).thenReturn(matches); + + Demographic result = manager.findExactMatchToDemographic(mockLoggedInInfo, searchDemo); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return null when no matches found") + void shouldReturnNull_whenNoMatchesFound() { + Demographic searchDemo = createTestDemographic(); + + when(mockDemographicDao.findByAttributes( + any(), any(), any(), any(), any(), any(), any(), any(), any(), any(), anyInt(), anyInt() + )).thenReturn(Collections.emptyList()); + + Demographic result = manager.findExactMatchToDemographic(mockLoggedInInfo, searchDemo); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return fuzzy matches by lastname and DOB") + void shouldReturnFuzzyMatches_byLastnameAndDOB() { + Demographic searchDemo = createTestDemographic(); + List expected = List.of( + createTestDemographicWithId(1001), + createTestDemographicWithId(1002) + ); + + when(mockDemographicDao.getDemographicWithLastFirstDOB( + TEST_LAST_NAME, TEST_FIRST_NAME, "1980", "01", "15" + )).thenReturn(expected); + + List result = manager.findFuzzyMatchToDemographic(mockLoggedInInfo, searchDemo); + + assertThat(result).hasSize(2); + } + } + + // ==================== HEALTH CARE MEMBER OPERATIONS ==================== + + /** + * Tests for health care member retrieval operations. + * + *

    Health care members are providers or specialists associated with a patient + * through the health care team. Tests cover:

    + *
      + *
    • Finding MRP (Most Responsible Provider) from health care team
    • + *
    • Finding health care members by role (numeric or string)
    • + *
    • Finding health care members by ID
    • + *
    • Finding personal emergency contacts by ID
    • + *
    + */ + @Nested + @DisplayName("Health Care Member Operations") + @Tag("healthcare") + class HealthCareMemberOperationsTests { + + @Test + @DisplayName("should return null when demographicNo is null for getMostResponsibleProvider") + void shouldReturnNull_whenDemographicNoIsNullForMRP() { + DemographicContact result = manager.getMostResponsibleProviderFromHealthCareTeam(mockLoggedInInfo, null); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return MRP from health care team when marked as MRP") + void shouldReturnMRP_fromHealthCareTeamWhenMarkedAsMRP() { + DemographicContact mrpContact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + mrpContact.setMrp(true); + + List contacts = List.of(mrpContact); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(contacts); + + DemographicContact result = manager.getMostResponsibleProviderFromHealthCareTeam(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + assertThat(result.isMrp()).isTrue(); + } + + @Test + @DisplayName("should fallback to first internal provider when no MRP marked") + void shouldFallbackToFirstInternalProvider_whenNoMRPMarked() { + DemographicContact providerContact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + providerContact.setMrp(false); + + List contacts = List.of(providerContact); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(contacts); + + DemographicContact result = manager.getMostResponsibleProviderFromHealthCareTeam(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return null when demographicNo is null for getHealthCareMemberbyRole") + void shouldReturnNull_whenDemographicNoIsNullForGetHealthCareMemberbyRole() { + DemographicContact result = manager.getHealthCareMemberbyRole(mockLoggedInInfo, null, "1"); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should find health care member by numeric role") + void shouldFindHealthCareMember_byNumericRole() { + ContactSpecialty specialty = new ContactSpecialty(); + specialty.setId(1); + specialty.setSpecialty("Cardiologist"); + + DemographicContact contact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + // The implementation converts numeric role ID to specialty name, then compares + // So contact's role should be the specialty name ("Cardiologist") not the ID ("1") + contact.setRole("Cardiologist"); + + // Use any() matcher since find() can take Object or int + when(mockContactSpecialtyDao.find(anyInt())).thenReturn(specialty); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(List.of(contact)); + + DemographicContact result = manager.getHealthCareMemberbyRole(mockLoggedInInfo, TEST_DEMO_NO, "1"); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should find health care member by string role") + void shouldFindHealthCareMember_byStringRole() { + ContactSpecialty specialty = new ContactSpecialty(); + specialty.setId(1); + specialty.setSpecialty("Cardiologist"); + + DemographicContact contact = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + contact.setRole("Cardiologist"); + + when(mockContactSpecialtyDao.findBySpecialty("Cardiologist")).thenReturn(specialty); + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(List.of(contact)); + + DemographicContact result = manager.getHealthCareMemberbyRole(mockLoggedInInfo, TEST_DEMO_NO, "Cardiologist"); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return null when demographicContactId is null for getHealthCareMemberbyId") + void shouldReturnNull_whenDemographicContactIdIsNull() { + DemographicContact result = manager.getHealthCareMemberbyId(mockLoggedInInfo, null); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return health care member by ID") + void shouldReturnHealthCareMember_byId() { + DemographicContact expected = createTestDemographicContactWithId(123, TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + // Use any() matcher since find() can take Object or int + when(mockDemographicContactDao.find(any())).thenReturn(expected); + + DemographicContact result = manager.getHealthCareMemberbyId(mockLoggedInInfo, 123); + + assertThat(result).isNotNull(); + } + + @Test + @DisplayName("should return null when demographicContactId is null for getPersonalEmergencyContactById") + void shouldReturnNull_whenDemographicContactIdIsNullForPersonalContact() { + DemographicContact result = manager.getPersonalEmergencyContactById(mockLoggedInInfo, null); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return personal emergency contact by ID") + void shouldReturnPersonalEmergencyContact_byId() { + DemographicContact expected = createTestDemographicContactWithId(456, TEST_DEMO_NO, DemographicContact.CATEGORY_PERSONAL, 1); + // Use any() matcher since find() can take Object or int + when(mockDemographicContactDao.find(any())).thenReturn(expected); + + DemographicContact result = manager.getPersonalEmergencyContactById(mockLoggedInInfo, 456); + + assertThat(result).isNotNull(); + } + } + + // ==================== INTEGRATOR OPERATIONS ==================== + + /** + * Tests for CAISI Integrator operations. + * + *

    The Integrator allows data sharing between multiple EMR installations. + * These tests verify behavior when integrator is disabled (the default in + * unit tests). Integration-enabled scenarios require more complex setup + * and are covered separately.

    + * + *

    Methods tested:

    + *
      + *
    • getRemoteDemographic - fetching demographics from remote facilities
    • + *
    • linkDemographicToRemoteDemographic - linking local to remote records
    • + *
    • getLinkedDemographics - retrieving linked demographic pairs
    • + *
    • getLinkedDemographicIds - retrieving IDs of linked demographics
    • + *
    + */ + @Nested + @DisplayName("Integrator Operations") + @Tag("integrator") + class IntegratorOperationsTests { + + @Test + @DisplayName("should return null when integrator disabled for getRemoteDemographic") + void shouldReturnNull_whenIntegratorDisabledForGetRemoteDemographic() { + when(mockFacility.isIntegratorEnabled()).thenReturn(false); + + Demographic result = manager.getRemoteDemographic(mockLoggedInInfo, 1, 1001); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should return false when integrator disabled for linkDemographicToRemoteDemographic") + void shouldReturnFalse_whenIntegratorDisabledForLinkDemographic() { + when(mockFacility.isIntegratorEnabled()).thenReturn(false); + + boolean result = manager.linkDemographicToRemoteDemographic(mockLoggedInInfo, 1001, 2, 2001); + + assertThat(result).isFalse(); + } + + @Test + @DisplayName("should return empty list when integrator disabled for getLinkedDemographics") + void shouldReturnEmptyList_whenIntegratorDisabledForGetLinkedDemographics() { + when(mockFacility.isIntegratorEnabled()).thenReturn(false); + + var result = manager.getLinkedDemographics(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isEmpty(); + } + + @Test + @DisplayName("should return empty list when integrator disabled for getLinkedDemographicIds") + void shouldReturnEmptyList_whenIntegratorDisabledForGetLinkedDemographicIds() { + when(mockFacility.isIntegratorEnabled()).thenReturn(false); + + List result = manager.getLinkedDemographicIds(mockLoggedInInfo, TEST_DEMO_NO, 1); + + assertThat(result).isEmpty(); + } + } + + // ==================== EDGE CASES AND NULL HANDLING ==================== + + /** + * Tests for edge cases and null input handling. + * + *

    These tests verify defensive programming practices and graceful + * degradation when encountering unexpected inputs:

    + *
      + *
    • Null list parameters returning null or empty collections
    • + *
    • Empty extension lists resulting in null extras on demographic
    • + *
    • Missing demographics returning null
    • + *
    • Null role parameters in health care member searches
    • + *
    • Skipping null providers when building provider lists
    • + *
    + * + *

    These tests ensure the manager layer doesn't throw unexpected exceptions + * and provides predictable behavior for edge cases.

    + */ + @Nested + @DisplayName("Edge Cases and Null Handling") + @Tag("edge-cases") + class EdgeCasesTests { + + @Test + @DisplayName("should handle null list gracefully for getDemographics") + void shouldHandleNullListGracefully_forGetDemographics() { + when(mockDemographicDao.getDemographics(anyList())).thenReturn(null); + + List result = manager.getDemographics(mockLoggedInInfo, List.of(1, 2, 3)); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should handle empty extension list when getDemographicWithExt returns demographic") + void shouldHandleEmptyExtensionList_whenGetDemographicWithExtReturnsDemographic() { + Demographic demographic = createTestDemographic(); + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(demographic); + when(mockDemographicExtDao.getDemographicExtByDemographicNo(TEST_DEMO_NO)) + .thenReturn(Collections.emptyList()); + + Demographic result = manager.getDemographicWithExt(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNotNull(); + assertThat(result.getExtras()).isNull(); + } + + @Test + @DisplayName("should return null when getDemographicWithExt finds no demographic") + void shouldReturnNull_whenGetDemographicWithExtFindsNoDemographic() { + when(mockDemographicDao.getDemographicById(TEST_DEMO_NO)).thenReturn(null); + + Demographic result = manager.getDemographicWithExt(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should handle null role gracefully for getHealthCareMemberbyRole") + void shouldHandleNullRoleGracefully_forGetHealthCareMemberbyRole() { + when(mockDemographicContactDao.findByDemographicNoAndCategory(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL)) + .thenReturn(Collections.emptyList()); + + DemographicContact result = manager.getHealthCareMemberbyRole(mockLoggedInInfo, TEST_DEMO_NO, null); + + assertThat(result).isNull(); + } + + @Test + @DisplayName("should skip null provider when building most responsible providers list") + void shouldSkipNullProvider_whenBuildingMostResponsibleProvidersList() { + DemographicContact contact1 = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + contact1.setContactId("999990"); + DemographicContact contact2 = createTestDemographicContact(TEST_DEMO_NO, DemographicContact.CATEGORY_PROFESSIONAL, 0); + contact2.setContactId("999991"); + + List contacts = List.of(contact1, contact2); + + when(mockDemographicContactDao.findAllByDemographicNoAndCategoryAndType(TEST_DEMO_NO, "professional", 0)) + .thenReturn(contacts); + when(mockProviderManager.getProvider(mockLoggedInInfo, "999990")).thenReturn(createTestProvider()); + when(mockProviderManager.getProvider(mockLoggedInInfo, "999991")).thenReturn(null); + + List result = manager.getDemographicMostResponsibleProviders(mockLoggedInInfo, TEST_DEMO_NO); + + assertThat(result).hasSize(1); + } + } +} diff --git a/src/test-modern/java/ca/openosp/openo/managers/DemographicUnitTestBase.java b/src/test-modern/java/ca/openosp/openo/managers/DemographicUnitTestBase.java new file mode 100644 index 00000000000..2c5b3bbcdd4 --- /dev/null +++ b/src/test-modern/java/ca/openosp/openo/managers/DemographicUnitTestBase.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2026. Magenta Health. All Rights Reserved. + * This software is published under the GPL GNU General Public License. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + *

    + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

    + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *

    + * This software was written for + * Magenta Health + * Toronto, Ontario, Canada + */ +package ca.openosp.openo.managers; + +import ca.openosp.openo.commn.model.Admission; +import ca.openosp.openo.commn.model.Demographic; +import ca.openosp.openo.commn.model.DemographicContact; +import ca.openosp.openo.commn.model.DemographicCust; +import ca.openosp.openo.commn.model.DemographicExt; +import ca.openosp.openo.commn.model.DemographicMerged; +import ca.openosp.openo.commn.model.Facility; +import ca.openosp.openo.commn.model.Provider; +import ca.openosp.openo.test.unit.OpenOUnitTestBase; +import ca.openosp.openo.utility.LoggedInInfo; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Tag; +import org.mockito.Mockito; + +import java.util.Date; + +/** + * Base class for Demographic-related unit tests providing common mocks and utilities. + * + *

    This class extends OpenOUnitTestBase and adds Demographic-specific test infrastructure + * including commonly used mocks, helper methods, and test data builders. It serves as + * the foundation for all Demographic unit tests, enabling consistent test patterns across + * DAO, Manager, and validation layers.

    + * + *

    Scalability Strategy:

    + *
      + *
    • All Demographic unit tests extend this base class
    • + *
    • Tests are organized by component and concern (Query, Logic, Validation, etc.)
    • + *
    • Common mocks and helpers are centralized here
    • + *
    • Test data builders provide consistent test objects
    • + *
    + * + * @since 2026-01-24 + * @see OpenOUnitTestBase + */ +@Tag("unit") +@Tag("fast") +@Tag("demographic") +public abstract class DemographicUnitTestBase extends OpenOUnitTestBase { + + // Common mocks that most Demographic tests will need + protected SecurityInfoManager mockSecurityInfoManager; + protected LoggedInInfo mockLoggedInInfo; + protected Facility mockFacility; + + // Test data constants + protected static final Integer TEST_DEMO_NO = 12345; + protected static final String TEST_PROVIDER = "999990"; + protected static final String TEST_FIRST_NAME = "John"; + protected static final String TEST_LAST_NAME = "Doe"; + protected static final String TEST_HIN = "1234567890"; + protected static final String TEST_EMAIL = "john.doe@example.com"; + protected static final String TEST_PHONE = "416-555-1234"; + protected static final Integer TEST_PROGRAM_ID = 100; + + /** + * Sets up common Demographic-related mocks before each test. + * + *

    This method is called automatically by JUnit before each test method + * and performs the following setup:

    + *
      + *
    1. Creates mock instances for SecurityInfoManager, LoggedInInfo, and Facility
    2. + *
    3. Configures default behavior for facility (integrator disabled)
    4. + *
    5. Configures LoggedInInfo to return test provider number
    6. + *
    7. Registers SecurityInfoManager with SpringUtils for static lookups
    8. + *
    + * + *

    Note: Subclasses should call additional mock registrations in their + * own {@code @BeforeEach} methods, which run after this base method.

    + */ + @BeforeEach + void setUpDemographicMocks() { + // Create mocks manually to avoid mockito-inline issues with interfaces + mockSecurityInfoManager = Mockito.mock(SecurityInfoManager.class); + mockLoggedInInfo = Mockito.mock(LoggedInInfo.class); + mockFacility = Mockito.mock(Facility.class); + + // Configure facility mock to return false for integrator by default + Mockito.lenient().when(mockLoggedInInfo.getCurrentFacility()).thenReturn(mockFacility); + Mockito.lenient().when(mockFacility.isIntegratorEnabled()).thenReturn(false); + Mockito.lenient().when(mockLoggedInInfo.getLoggedInProviderNo()).thenReturn(TEST_PROVIDER); + + // Register common mocks with SpringUtils + registerMock(SecurityInfoManager.class, mockSecurityInfoManager); + } + + /** + * Creates a valid test Demographic with sensible defaults. + * Can be customized after creation for specific test needs. + * + * @return A valid Demographic instance for testing + */ + protected Demographic createTestDemographic() { + Demographic demographic = new Demographic(); + demographic.setDemographicNo(TEST_DEMO_NO); + demographic.setFirstName(TEST_FIRST_NAME); + demographic.setLastName(TEST_LAST_NAME); + demographic.setHin(TEST_HIN); + demographic.setEmail(TEST_EMAIL); + demographic.setPhone(TEST_PHONE); + demographic.setProviderNo(TEST_PROVIDER); + demographic.setPatientStatus(Demographic.PatientStatus.AC.name()); + demographic.setYearOfBirth("1980"); + demographic.setMonthOfBirth("01"); + demographic.setDateOfBirth("15"); + demographic.setSex("M"); + demographic.setLastUpdateUser(TEST_PROVIDER); + demographic.setLastUpdateDate(new Date()); + return demographic; + } + + /** + * Creates a test Demographic with a specific ID. + * + * @param id The ID to set on the demographic + * @return A Demographic instance with the specified ID + */ + protected Demographic createTestDemographicWithId(Integer id) { + Demographic demographic = createTestDemographic(); + demographic.setDemographicNo(id); + return demographic; + } + + /** + * Creates a test Demographic with specific patient status. + * + * @param status The patient status to set + * @return A Demographic instance with the specified status + */ + protected Demographic createTestDemographicWithStatus(Demographic.PatientStatus status) { + Demographic demographic = createTestDemographic(); + demographic.setPatientStatus(status.name()); + return demographic; + } + + /** + * Creates a test DemographicExt with specified values. + * + * @param demoNo The demographic number + * @param key The extension key + * @param value The extension value + * @return A DemographicExt instance + */ + protected DemographicExt createTestDemographicExt(Integer demoNo, String key, String value) { + DemographicExt ext = new DemographicExt(); + ext.setDemographicNo(demoNo); + ext.setKey(key); + ext.setValue(value); + ext.setProviderNo(TEST_PROVIDER); + ext.setDateCreated(new Date()); + return ext; + } + + /** + * Creates a test DemographicExt with an ID. + * + * @param id The extension ID + * @param demoNo The demographic number + * @param key The extension key + * @param value The extension value + * @return A DemographicExt instance with the specified ID + */ + protected DemographicExt createTestDemographicExtWithId(Integer id, Integer demoNo, String key, String value) { + DemographicExt ext = createTestDemographicExt(demoNo, key, value); + ext.setId(id); + return ext; + } + + /** + * Creates a test DemographicContact with specified values. + * + * @param demoNo The demographic number + * @param category The contact category (personal/professional) + * @param type The contact type (0=provider, 1=demographic, 2=contact, 3=specialist) + * @return A DemographicContact instance + */ + protected DemographicContact createTestDemographicContact(Integer demoNo, String category, int type) { + DemographicContact contact = new DemographicContact(); + contact.setDemographicNo(demoNo); + contact.setCategory(category); + contact.setType(type); + contact.setContactId(TEST_PROVIDER); + contact.setCreated(new Date()); + contact.setActive(true); + contact.setDeleted(false); + return contact; + } + + /** + * Creates a test DemographicContact with an ID. + * + * @param id The contact ID + * @param demoNo The demographic number + * @param category The contact category + * @param type The contact type + * @return A DemographicContact instance with the specified ID + */ + protected DemographicContact createTestDemographicContactWithId(Integer id, Integer demoNo, String category, int type) { + DemographicContact contact = createTestDemographicContact(demoNo, category, type); + try { + java.lang.reflect.Field idField = DemographicContact.class.getDeclaredField("id"); + idField.setAccessible(true); + idField.set(contact, id); + } catch (Exception e) { + throw new RuntimeException("Failed to set contact ID", e); + } + return contact; + } + + /** + * Creates a test DemographicCust with specified values. + * + * @param id The demographic number (which is the ID for DemographicCust) + * @return A DemographicCust instance + */ + protected DemographicCust createTestDemographicCust(Integer id) { + DemographicCust cust = new DemographicCust(); + cust.setId(id); + cust.setNurse("nurse1"); + cust.setResident("resident1"); + cust.setMidwife("midwife1"); + cust.setAlert("alert notes"); + cust.setNotes("general notes"); + return cust; + } + + /** + * Creates a test DemographicMerged with specified values. + * + * @param childId The child demographic number (the one being merged) + * @param parentId The parent demographic number (the one receiving the merge) + * @return A DemographicMerged instance + */ + protected DemographicMerged createTestDemographicMerged(Integer childId, Integer parentId) { + DemographicMerged merged = new DemographicMerged(); + merged.setDemographicNo(childId); + merged.setMergedTo(parentId); + merged.setDeleted(0); + merged.setLastUpdateUser(TEST_PROVIDER); + merged.setLastUpdateDate(new Date()); + return merged; + } + + /** + * Creates a test DemographicMerged with an ID. + * + * @param id The merge record ID + * @param childId The child demographic number + * @param parentId The parent demographic number + * @return A DemographicMerged instance with the specified ID + */ + protected DemographicMerged createTestDemographicMergedWithId(Integer id, Integer childId, Integer parentId) { + DemographicMerged merged = createTestDemographicMerged(childId, parentId); + merged.setId(id); + return merged; + } + + /** + * Creates a test Provider with sensible defaults. + * + * @return A Provider instance for testing + */ + protected Provider createTestProvider() { + Provider provider = new Provider(); + provider.setProviderNo(TEST_PROVIDER); + provider.setFirstName("Test"); + provider.setLastName("Provider"); + return provider; + } + + /** + * Creates a test Provider with specified provider number. + * + * @param providerNo The provider number + * @return A Provider instance with the specified provider number + */ + protected Provider createTestProviderWithNo(String providerNo) { + Provider provider = createTestProvider(); + provider.setProviderNo(providerNo); + return provider; + } + + /** + * Creates a test Admission with sensible defaults. + * + * @param demographicNo The demographic number + * @param programId The program ID + * @return An Admission instance for testing + */ + protected Admission createTestAdmission(Integer demographicNo, Integer programId) { + Admission admission = new Admission(); + admission.setClientId(demographicNo); + admission.setProgramId(programId); + admission.setProviderNo(TEST_PROVIDER); + admission.setAdmissionDate(new Date()); + admission.setAdmissionStatus(Admission.STATUS_CURRENT); + admission.setAdmissionNotes(""); + return admission; + } + + /** + * Helper method to inject dependencies into manager using reflection. + * + * @param target The target object to inject into + * @param fieldName The field name to inject + * @param dependency The dependency object to inject + */ + protected void injectDependency(Object target, String fieldName, Object dependency) { + try { + java.lang.reflect.Field field = target.getClass().getDeclaredField(fieldName); + field.setAccessible(true); + field.set(target, dependency); + } catch (Exception e) { + throw new RuntimeException("Failed to inject " + fieldName, e); + } + } +} diff --git a/src/test-modern/java/ca/openosp/openo/test/examples/DemographicDaoModernTest.java b/src/test-modern/java/ca/openosp/openo/test/examples/DemographicDaoModernTest.java index 141d2dad3f6..fbe42825db2 100644 --- a/src/test-modern/java/ca/openosp/openo/test/examples/DemographicDaoModernTest.java +++ b/src/test-modern/java/ca/openosp/openo/test/examples/DemographicDaoModernTest.java @@ -32,6 +32,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import org.junit.jupiter.params.provider.CsvSource; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.Rollback; import org.springframework.transaction.annotation.Transactional; @@ -52,17 +53,9 @@ @Rollback class DemographicDaoModernTest extends OpenODaoTestBase { + @Autowired private DemographicDao demographicDao; - @BeforeEach - void setUp() { - // Get DAO using SpringUtils to ensure compatibility - demographicDao = SpringUtils.getBean(DemographicDao.class); - - // Verify SpringUtils integration - verifyDaoSpringUtilsIntegration(DemographicDao.class); - } - @Test @DisplayName("Should create and retrieve demographic") @Order(1) diff --git a/src/test-modern/java/ca/openosp/openo/util/Doc2PDFIntegrationTest.java b/src/test-modern/java/ca/openosp/openo/util/Doc2PDFIntegrationTest.java new file mode 100644 index 00000000000..cedab470425 --- /dev/null +++ b/src/test-modern/java/ca/openosp/openo/util/Doc2PDFIntegrationTest.java @@ -0,0 +1,227 @@ +//CHECKSTYLE:OFF +/** + * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. + * This software is published under the GPL GNU General Public License. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + *

    + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

    + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *

    + * This software was written for the + * Department of Family Medicine + * McMaster University + * Hamilton + * Ontario, Canada + */ + +package ca.openosp.openo.util; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletResponse; + +import ca.openosp.openo.test.integration.OpenOTestBase; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Integration tests for Doc2PDF utility class. + * Tests HTML to PDF conversion using Jsoup for HTML cleaning. + * + * @since 2026-01-29 + */ +@Tag("integration") +@Tag("util") +@DisplayName("Doc2PDF Integration Tests") +class Doc2PDFIntegrationTest extends OpenOTestBase { + + private MockHttpServletRequest request; + private MockHttpServletResponse response; + + @BeforeEach + void setUp() { + request = new MockHttpServletRequest(); + request.setProtocol("HTTP/1.1"); + request.setRemoteHost("localhost"); + request.setServerPort(8080); + request.setContextPath("/openo"); + + response = new MockHttpServletResponse(); + } + + @Test + @Tag("parse") + @DisplayName("should produce PDF when simple HTML is provided") + void shouldProducePdf_whenSimpleHtmlProvided() { + // Given + String simpleHtml = "

    Hello World

    "; + + // When + Doc2PDF.parseString2PDF(request, response, simpleHtml); + + // Then + assertThat(response.getContentType()).isEqualTo("application/pdf"); + assertThat(response.getContentAsByteArray()).isNotEmpty(); + } + + @Test + @Tag("parse") + @DisplayName("should produce PDF when malformed HTML is provided") + void shouldProducePdf_whenMalformedHtmlProvided() { + // Given + String malformedHtml = "

    Unclosed paragraph

    Nested"; + + // When + Doc2PDF.parseString2PDF(request, response, malformedHtml); + + // Then - Jsoup should fix the HTML and still produce a PDF + assertThat(response.getContentType()).isEqualTo("application/pdf"); + assertThat(response.getContentAsByteArray()).isNotEmpty(); + } + + @Test + @Tag("parse") + @Tag("encoding") + @DisplayName("should preserve encoding when French Canadian characters are present") + void shouldPreserveEncoding_whenFrenchCanadianCharactersPresent() { + // Given + // Test with French Canadian patient names + String htmlWithFrench = "" + + "

    Patient: François Côté

    " + + "

    Doctor: Hélène Bélanger

    " + + "

    Résumé: naïve café

    " + + ""; + + // When + Doc2PDF.parseString2PDF(request, response, htmlWithFrench); + + // Then + assertThat(response.getContentType()).isEqualTo("application/pdf"); + assertThat(response.getContentAsByteArray()).isNotEmpty(); + } + + @Test + @Tag("parse") + @Tag("encoding") + @DisplayName("should preserve symbols when medical characters are present") + void shouldPreserveSymbols_whenMedicalCharactersPresent() { + // Given + // Test with medical symbols + String htmlWithSymbols = "" + + "

    Dosage: 500μg (micrograms)

    " + + "

    Temperature: ≥37°C but ≤40°C

    " + + "

    Range: ±2 units

    " + + "

    Medication: Advil® and Tylenol™

    " + + ""; + + // When + Doc2PDF.parseString2PDF(request, response, htmlWithSymbols); + + // Then + assertThat(response.getContentType()).isEqualTo("application/pdf"); + assertThat(response.getContentAsByteArray()).isNotEmpty(); + } + + @Test + @Tag("parse") + @DisplayName("should produce PDF when empty HTML is provided") + void shouldProducePdf_whenEmptyHtmlProvided() { + // Given + String emptyHtml = ""; + + // When + Doc2PDF.parseString2PDF(request, response, emptyHtml); + + // Then - Should still produce a PDF (even if empty) + assertThat(response.getContentType()).isEqualTo("application/pdf"); + } + + @Test + @Tag("parse") + @Tag("binary") + @DisplayName("should return Base64 when converting to binary") + void shouldReturnBase64_whenConvertingToBinary() { + // Given + String html = "

    Test Document

    Test content

    "; + + // When + String binaryPdf = Doc2PDF.parseString2Bin(request, response, html); + + // Then + assertThat(binaryPdf).isNotNull(); + assertThat(binaryPdf).isNotEmpty(); + // Binary PDF should be Base64 encoded + assertThat(binaryPdf).matches("^[A-Za-z0-9+/]+=*$"); + } + + @Test + @Tag("parse") + @Tag("medical") + @DisplayName("should produce PDF when realistic medical content is provided") + void shouldProducePdf_whenRealisticMedicalContentProvided() { + // Given + // Realistic medical note + String medicalHtml = "" + + "

    Clinical Note

    " + + "" + + "" + + "" + + "" + + "
    Patient:François Côté
    DOB:1980-05-15
    HIN:1234567890
    " + + "

    Chief Complaint

    " + + "

    Patient presents with fever ≥38.5°C

    " + + "

    Medications

    " + + "
      " + + "
    • Acetaminophen 500mg - take 2 tablets q4h prn
    • " + + "
    • Amoxicillin 250mg - 1 tablet TID × 7 days
    • " + + "
    " + + "

    Vitals

    " + + "

    BP: 120/80, HR: 72, Temp: 38.7°C, O₂ sat: 98%

    " + + ""; + + // When + Doc2PDF.parseString2PDF(request, response, medicalHtml); + + // Then + assertThat(response.getContentType()).isEqualTo("application/pdf"); + assertThat(response.getContentAsByteArray()).isNotEmpty(); + assertThat(response.getContentAsByteArray().length).isGreaterThan(100); + } + + @Test + @Tag("parse") + @DisplayName("should produce PDF when complex HTML structure is provided") + void shouldProducePdf_whenComplexHtmlStructureProvided() { + // Given + String complexHtml = "" + + "" + + "" + + "" + + "" + + "
    MedicationDoseFrequency
    Aspirin81mgDaily
    Metformin500mgBID
    " + + "
      " + + "
    • No known allergies
    • " + + "
    • Non-smoker
    • " + + "
    " + + ""; + + // When + Doc2PDF.parseString2PDF(request, response, complexHtml); + + // Then + assertThat(response.getContentType()).isEqualTo("application/pdf"); + assertThat(response.getContentAsByteArray()).isNotEmpty(); + } +} diff --git a/src/test-modern/resources/test-applicationContext-h2.xml b/src/test-modern/resources/test-applicationContext-h2.xml index a9e98e7bf51..8db466702bf 100644 --- a/src/test-modern/resources/test-applicationContext-h2.xml +++ b/src/test-modern/resources/test-applicationContext-h2.xml @@ -11,13 +11,13 @@ - + - + diff --git a/src/test-modern/resources/test-applicationContext-minimal.xml b/src/test-modern/resources/test-applicationContext-minimal.xml index 588d9f13438..98f127e03e4 100644 --- a/src/test-modern/resources/test-applicationContext-minimal.xml +++ b/src/test-modern/resources/test-applicationContext-minimal.xml @@ -11,7 +11,7 @@ - + diff --git a/src/test-modern/resources/test-applicationContext-working.xml b/src/test-modern/resources/test-applicationContext-working.xml index 2e84ac8f07f..7425af97590 100644 --- a/src/test-modern/resources/test-applicationContext-working.xml +++ b/src/test-modern/resources/test-applicationContext-working.xml @@ -34,15 +34,15 @@ - + - + - + diff --git a/src/test-modern/resources/test-context-complete.xml b/src/test-modern/resources/test-context-complete.xml index c0767a91c3c..22fdf4818f4 100644 --- a/src/test-modern/resources/test-context-complete.xml +++ b/src/test-modern/resources/test-context-complete.xml @@ -38,15 +38,15 @@ - + - + - + diff --git a/src/test-modern/resources/test-context-full.xml b/src/test-modern/resources/test-context-full.xml index 174ab18034c..7e593cebccb 100644 --- a/src/test-modern/resources/test-context-full.xml +++ b/src/test-modern/resources/test-context-full.xml @@ -73,15 +73,15 @@ - + - + - + diff --git a/src/test-modern/resources/test-spring_jpa.xml b/src/test-modern/resources/test-spring_jpa.xml index 5a20118ca9e..f6792916031 100644 --- a/src/test-modern/resources/test-spring_jpa.xml +++ b/src/test-modern/resources/test-spring_jpa.xml @@ -15,15 +15,15 @@ - + - + - + diff --git a/src/test/java/ca/openosp/openo/commn/dao/DrugDaoTest.java b/src/test/java/ca/openosp/openo/commn/dao/DrugDaoTest.java index 5480a8e68f4..7bc87b2b853 100644 --- a/src/test/java/ca/openosp/openo/commn/dao/DrugDaoTest.java +++ b/src/test/java/ca/openosp/openo/commn/dao/DrugDaoTest.java @@ -74,7 +74,7 @@ public void testAll() { drugs = dao.findByDemographicIdAndDrugId(999, 0); assertNotNull(drugs); - dao.findByEverything(null, 0, null, null, null, null, 0, null, 0, 0, null, null, null, null, null, 0, null, false, false, null, null, null, false, false, false, false, null, null, null, false); + dao.findByEverything(null, 0, null, null, null, null, "0", null, 0, 0, null, null, null, null, null, 0, null, false, false, null, null, null, false, false, false, false, null, null, null, false); dao.getMaxPosition(999); } diff --git a/src/test/java/tests/AddAppointmentTest.java b/src/test/java/tests/AddAppointmentTest.java index 4936a45738b..b73a40ad819 100644 --- a/src/test/java/tests/AddAppointmentTest.java +++ b/src/test/java/tests/AddAppointmentTest.java @@ -6,93 +6,75 @@ import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.Select; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; -import java.util.List; -public class AddAppointmentTest { - +public class AddAppointmentTest extends BaseTest { + // Test the add appointment successful scenario @Test - public void testAddAppointmentSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click the "08:00" button to open the add appointment window - WebElement appointmentButton = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("08:00"))); - appointmentButton.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the add appointment window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String addAppointmentWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - addAppointmentWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; + public void testAddAppointmentSuccessful() { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); + + try { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + + // Click the "08:00" button to open the add appointment window + WebElement appointmentButton = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("08:00"))); + appointmentButton.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the add appointment window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } - // Ensure the URL of the add appointment window is correct - wait.until(ExpectedConditions.urlContains("oscar/appointment/addappointment.jsp")); - - // Locate the search field, type patient's first name, and click the patient suggestion - WebElement searchField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("keyword"))); - searchField.sendKeys("Alex"); - Thread.sleep(1000); - List suggestions = driver.findElements(By.tagName("li")); - for (WebElement suggestion : suggestions) { - if (suggestion.getText().contains("ALEX, JOHN")) { - suggestion.click(); - break; - } + // Ensure the URL of the add appointment window is correct + wait.until(ExpectedConditions.urlContains("oscar/appointment/addappointment.jsp")); + + // Locate the search field, type patient's first name, and click the patient suggestion + WebElement searchField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("keyword"))); + searchField.sendKeys("Alex"); + WebElement suggestion = wait.until(ExpectedConditions.visibilityOfElementLocated( + By.xpath("//li[contains(text(), 'ALEX, JOHN')]") + )); + suggestion.click(); + + // Select reason + Select reasonSelect = new Select(driver.findElement(By.name("reasonCode"))); + reasonSelect.selectByVisibleText("Testing"); + + // Scroll to the bottom of the page + JavascriptExecutor js = (JavascriptExecutor) driver; + js.executeScript("window.scrollTo(0, document.body.scrollHeight)"); + + // Click the "Add Appointment" button + WebElement addAppointmentButton = wait.until(ExpectedConditions.elementToBeClickable(By.id("addButton"))); + addAppointmentButton.click(); + + // Wait for the appointment window to close and return to main window + wait.until(ExpectedConditions.numberOfWindowsToBe(1)); + driver.switchTo().window(mainWindowHandle); + + // Verify appointment was created (check for patient name in schedule) + WebElement createdAppointment = wait.until(ExpectedConditions.visibilityOfElementLocated( + By.xpath("//a[contains(text(), 'ALEX, JOHN')]") + )); + Assert.assertNotNull(createdAppointment, "Appointment should appear in the schedule"); + } finally { + driver.quit(); } - - // Select reason - Select reasonSelect = new Select(driver.findElement(By.name("reasonCode"))); - reasonSelect.selectByVisibleText("Testing"); - - // Scroll to the bottom of the page - JavascriptExecutor js = (JavascriptExecutor) driver; - js.executeScript("window.scrollTo(0, document.body.scrollHeight)"); - - // Click the "Add Appointment" button - WebElement addAppointmentButton = wait.until(ExpectedConditions.elementToBeClickable(By.id("addButton"))); - addAppointmentButton.click(); - - // Display the main page for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } } diff --git a/src/test/java/tests/BaseTest.java b/src/test/java/tests/BaseTest.java new file mode 100644 index 00000000000..0dc203917ab --- /dev/null +++ b/src/test/java/tests/BaseTest.java @@ -0,0 +1,97 @@ +package tests; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; +import java.time.Duration; + +/** + * Base test class with common setup and helper methods for Selenium tests. + */ +public class BaseTest { + + // Test credentials - can be overridden via environment variables + protected static final String USERNAME = getEnvOrDefault("TEST_USERNAME", "openodoc"); + protected static final String PASSWORD = getEnvOrDefault("TEST_PASSWORD", "OpenO2025"); + protected static final String PIN = getEnvOrDefault("TEST_PIN", "2025"); + + // Application URL - can be overridden via environment variable + protected static final String BASE_URL = getEnvOrDefault("TEST_BASE_URL", "http://localhost:8080/"); + + // Default wait timeout in seconds + protected static final int DEFAULT_TIMEOUT = 10; + + private static String getEnvOrDefault(String envVar, String defaultValue) { + String value = System.getenv(envVar); + return (value != null && !value.isEmpty()) ? value : defaultValue; + } + + /** + * Creates a headless Chrome WebDriver instance. + * @return configured WebDriver + */ + protected WebDriver createHeadlessDriver() { + ChromeOptions options = new ChromeOptions(); + options.addArguments("--headless", "--no-sandbox", "--disable-dev-shm-usage"); + return new ChromeDriver(options); + } + + /** + * Creates a WebDriverWait with default timeout. + * @param driver the WebDriver instance + * @return configured WebDriverWait + */ + protected WebDriverWait createWait(WebDriver driver) { + return new WebDriverWait(driver, Duration.ofSeconds(DEFAULT_TIMEOUT)); + } + + /** + * Performs login with default credentials. + * @param driver the WebDriver instance + * @param wait the WebDriverWait instance + */ + protected void login(WebDriver driver, WebDriverWait wait) { + login(driver, wait, USERNAME, PASSWORD, PIN); + } + + /** + * Performs login with specified credentials. + * @param driver the WebDriver instance + * @param wait the WebDriverWait instance + * @param username the username + * @param password the password + * @param pin the PIN + */ + protected void login(WebDriver driver, WebDriverWait wait, String username, String password, String pin) { + driver.get(BASE_URL); + + // Locate and fill username field + WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); + usernameField.sendKeys(username); + + // Locate and fill password field + WebElement passwordField = driver.findElement(By.name("password")); + passwordField.sendKeys(password); + + // Locate and fill PIN field + WebElement pinField = driver.findElement(By.name("pin")); + pinField.sendKeys(pin); + + // Click login button + WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); + loginButton.click(); + } + + /** + * Checks if login was successful by verifying URL contains provider control page. + * @param driver the WebDriver instance + * @return true if login successful + */ + protected boolean isLoginSuccessful(WebDriver driver) { + return driver.getCurrentUrl().contains("provider/providercontrol.jsp"); + } +} diff --git a/src/test/java/tests/CreateDemographicRecordTest.java b/src/test/java/tests/CreateDemographicRecordTest.java index 00941158d45..4eb7efd1c3b 100644 --- a/src/test/java/tests/CreateDemographicRecordTest.java +++ b/src/test/java/tests/CreateDemographicRecordTest.java @@ -6,141 +6,122 @@ import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.Select; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; -public class CreateDemographicRecordTest { +public class CreateDemographicRecordTest extends BaseTest { // Test the create demographic record successful scenario @Test public void createDemographicRecordSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful."); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Click the "All" button to get the patients listed - WebElement allButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@type='button' and @value='All']"))); - allButton.click(); - - // Click the "Create Demographic" button to open the create new demographic record window - WebElement createDemographicButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".createNew a[title]"))); - createDemographicButton.click(); - Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographicaddarecordhtm.jsp")); - System.out.println("Create demographic window opened successfully, the current URL is: " + driver.getCurrentUrl()); - - // Fill out the form fields to create a new demographic record - WebElement firstNameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("first_name"))); - WebElement lastNameField = driver.findElement(By.name("last_name")); - WebElement dobYearField = driver.findElement(By.name("year_of_birth")); - - // Select dropdown options - Select titleSelect = new Select(driver.findElement(By.name("title"))); - titleSelect.selectByVisibleText("Ms"); - Select genderSelect = new Select(driver.findElement(By.name("sex"))); - genderSelect.selectByVisibleText("Female"); - - firstNameField.sendKeys("Sophia"); - lastNameField.sendKeys("White"); - dobYearField.sendKeys("1999"); - - // Submit the form to create the demographic record - WebElement saveButton = driver.findElement(By.cssSelector("input[type='submit'][value='Add Record']")); - saveButton.click(); - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while saving master record."); - Assert.fail("500 error encountered while saving master record."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Search' tab on the menu bar + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + searchTab.click(); + System.out.println("Search demographic page open successful."); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the search demographic window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographicaddarecord.jsp")); - System.out.println("Demographic record created successfully."); - } + // Ensure the URL of the search demographic window is correct + wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); + + // Click the "All" button to get the patients listed + WebElement allButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@type='button' and @value='All']"))); + allButton.click(); + + // Click the "Create Demographic" button to open the create new demographic record window + WebElement createDemographicButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".createNew a[title]"))); + createDemographicButton.click(); + Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographicaddarecordhtm.jsp")); + System.out.println("Create demographic window opened successfully, the current URL is: " + driver.getCurrentUrl()); + + // Fill out the form fields to create a new demographic record + WebElement firstNameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("first_name"))); + WebElement lastNameField = driver.findElement(By.name("last_name")); + WebElement dobYearField = driver.findElement(By.name("year_of_birth")); + + // Select dropdown options + Select titleSelect = new Select(driver.findElement(By.name("title"))); + titleSelect.selectByVisibleText("Ms"); + Select genderSelect = new Select(driver.findElement(By.name("sex"))); + genderSelect.selectByVisibleText("Female"); + + firstNameField.sendKeys("Sophia"); + lastNameField.sendKeys("White"); + dobYearField.sendKeys("1999"); + + // Submit the form to create the demographic record + WebElement saveButton = driver.findElement(By.cssSelector("input[type='submit'][value='Add Record']")); + saveButton.click(); + + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while saving master record."); + Assert.fail("500 error encountered while saving master record."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Display the confirmation page for 2 sec - Thread.sleep(2000); + if (!is500Error) { + Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographicaddarecord.jsp")); + System.out.println("Demographic record created successfully."); + } - // Locate and click the "Go to Record" button - WebElement goToRecordButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@href, 'demographiccontrol.jsp?demographic_no=')]"))); - goToRecordButton.click(); + // Display the confirmation page for 2 sec + Thread.sleep(2000); + + // Locate and click the "Go to Record" button + WebElement goToRecordButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@href, 'demographiccontrol.jsp?demographic_no=')]"))); + goToRecordButton.click(); + + // Check for encountering 500 error + is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while returning to master record."); + Assert.fail("500 error encountered while returning to master record."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Check for encountering 500 error - is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while returning to master record."); - Assert.fail("500 error encountered while returning to master record."); + if (!is500Error) { + Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographiccontrol.jsp")); + System.out.println("Navigated to the demographic record successfully."); } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographiccontrol.jsp")); - System.out.println("Navigated to the demographic record successfully."); + // Display the master record for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); } - - // Display the master record for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } } diff --git a/src/test/java/tests/GoogleTest.java b/src/test/java/tests/GoogleTest.java index 6653c1aa0f3..d56ee1d9951 100644 --- a/src/test/java/tests/GoogleTest.java +++ b/src/test/java/tests/GoogleTest.java @@ -1,27 +1,22 @@ package tests; import org.testng.annotations.Test; - import org.testng.Assert; import org.openqa.selenium.WebDriver; -import org.openqa.selenium.chrome.ChromeDriver; -public class GoogleTest { - +public class GoogleTest extends BaseTest { + @Test public void testGooglePage() { + WebDriver driver = createHeadlessDriver(); - // Open Google - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); - WebDriver driver = new ChromeDriver(); - driver.get("https://www.google.com"); - - // Verify the title - Assert.assertEquals("Google", driver.getTitle()); - System.out.println("The title is: " + driver.getTitle()); + try { + driver.get("https://www.google.com"); - // Close the browser - driver.quit(); + Assert.assertEquals(driver.getTitle(), "Google"); + System.out.println("The title is: " + driver.getTitle()); + } finally { + driver.quit(); + } } - -} \ No newline at end of file +} diff --git a/src/test/java/tests/LoginTest.java b/src/test/java/tests/LoginTest.java index b7cd4b23f6c..8beda87e02f 100644 --- a/src/test/java/tests/LoginTest.java +++ b/src/test/java/tests/LoginTest.java @@ -2,141 +2,72 @@ import org.testng.annotations.Test; import org.testng.Assert; -import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; -public class LoginTest { - +public class LoginTest extends BaseTest { + // Test the login successful scenario @Test public void testLoginSuccessful() { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the login page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Close the browser - driver.quit(); + try { + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + } finally { + driver.quit(); + } } // Test the login failed scenario - invalid username @Test public void testLoginFailedWithInvalidUsername() { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the login page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the invalid username and password - usernameField.sendKeys("oscardoctor"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login failed - String currentUrl = driver.getCurrentUrl(); - Assert.assertFalse(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login failed with invalid username."); - - // Close the browser - driver.quit(); + try { + login(driver, wait, "invaliduser", PASSWORD, PIN); + Assert.assertFalse(isLoginSuccessful(driver)); + System.out.println("Login failed with invalid username."); + } finally { + driver.quit(); + } } // Test the login failed scenario - invalid password @Test public void testLoginFailedWithInvalidPassword() { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the login page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and invalid password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login failed - String currentUrl = driver.getCurrentUrl(); - Assert.assertFalse(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login failed with invalid passowrd."); - - // Close the browser - driver.quit(); + try { + login(driver, wait, USERNAME, "wrongpassword", PIN); + Assert.assertFalse(isLoginSuccessful(driver)); + System.out.println("Login failed with invalid password."); + } finally { + driver.quit(); + } } // Test the login failed scenario - invalid username and password @Test public void testLoginFailedWithInvalidUsernameAndPassword() { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the login page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the invalid username and invalid password - usernameField.sendKeys("oscardoctor"); - passwordField.sendKeys("mac2002"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login failed - String currentUrl = driver.getCurrentUrl(); - Assert.assertFalse(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login failed with invalid username and passowrd."); - - // Close the browser - driver.quit(); + try { + login(driver, wait, "invaliduser", "wrongpassword", "0000"); + Assert.assertFalse(isLoginSuccessful(driver)); + System.out.println("Login failed with invalid username and password."); + } finally { + driver.quit(); + } } - -} \ No newline at end of file +} diff --git a/src/test/java/tests/OpenAdminPanelTest.java b/src/test/java/tests/OpenAdminPanelTest.java index 4417418f219..bf6e4ada164 100644 --- a/src/test/java/tests/OpenAdminPanelTest.java +++ b/src/test/java/tests/OpenAdminPanelTest.java @@ -6,39 +6,21 @@ import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; -public class OpenAdminPanelTest { - - // Test the open admin panel successful scenario - @Test - public void openAdminPanelSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); +public class OpenAdminPanelTest extends BaseTest { - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); + /** + * Helper method to login and open the admin panel. + * Returns the admin window handle for further navigation. + */ + private String openAdminPanel(WebDriver driver, WebDriverWait wait) { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); // Click on the 'Administration' tab on the menu bar WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); @@ -59,639 +41,252 @@ public void openAdminPanelSuccessful() throws InterruptedException { } } - // Check for encountering 500 error - boolean is500Error = false; + return adminWindowHandle; + } + + /** + * Helper method to check for 500 error. + */ + private void check500Error(WebDriver driver, String context) { try { WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening administration panel."); - Assert.fail("500 error encountered while opening administration panel."); + System.out.println("500 error encountered while " + context + "."); + Assert.fail("500 error encountered while " + context + "."); } } catch (NoSuchElementException e) { System.out.println("No 500 error encountered."); } + } + + // Test the open admin panel successful scenario + @Test + public void openAdminPanelSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); + + try { + openAdminPanel(driver, wait); + + check500Error(driver, "opening administration panel"); - if (!is500Error) { wait.until(ExpectedConditions.urlContains("/administration/")); Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("Administration panel opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open unlock account window successful scenario @Test public void testOpenUnlockAccountWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Unlock Account" tab - WebElement unlockAccountTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='unLock.jsp']"))); - unlockAccountTab.click(); + // Click on the "Unlock Account" tab + WebElement unlockAccountTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='unLock.jsp']"))); + unlockAccountTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening unlock account window."); - Assert.fail("500 error encountered while opening unlock account window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening unlock account window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Unlock Account' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open add providers window successful scenario @Test public void testOpenAddProviderWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Add a Provider" tab - WebElement addProviderTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='provideraddarecordhtm.jsp']"))); - addProviderTab.click(); + // Click on the "Add a Provider" tab + WebElement addProviderTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='provideraddarecordhtm.jsp']"))); + addProviderTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening add providers window."); - Assert.fail("500 error encountered while opening add providers window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening add providers window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Add a Provider' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open add login record window successful scenario @Test public void testOpenAddLoginRecordWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Add a Login Record" tab - WebElement addLoginRecordTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='securityaddarecord.jsp']"))); - addLoginRecordTab.click(); + // Click on the "Add a Login Record" tab + WebElement addLoginRecordTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='securityaddarecord.jsp']"))); + addLoginRecordTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening add login record window."); - Assert.fail("500 error encountered while opening add login record window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening add login record window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Add a Login Record' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open manage eforms window successful scenario @Test public void testOpenManageEformsWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Manage eForms" tab - WebElement manageEformsTab = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@class='well quick-links']//a[contains(@href, '/eform/efmformmanager.jsp')]"))); - manageEformsTab.click(); + // Click on the "Manage eForms" tab + WebElement manageEformsTab = wait.until(ExpectedConditions.elementToBeClickable( + By.xpath("//div[@class='well quick-links']//a[contains(@href, '/eform/efmformmanager.jsp')]"))); + manageEformsTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening manage eforms window."); - Assert.fail("500 error encountered while opening manage eforms window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening manage eforms window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Manage eForms' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open schedule setting window successful scenario @Test public void testOpenScheduleSettingWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Schedule Setting" tab - WebElement scheduleSettingTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='scheduletemplatesetting.jsp']"))); - scheduleSettingTab.click(); + // Click on the "Schedule Setting" tab + WebElement scheduleSettingTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='scheduletemplatesetting.jsp']"))); + scheduleSettingTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening schedule setting window."); - Assert.fail("500 error encountered while opening schedule setting window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening schedule setting window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Schedule Setting' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open search groups window window successful scenario @Test public void testOpenSearchGroupsWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); + try { + openAdminPanel(driver, wait); - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); + // Click on the "Search/Edit/Delete Groups" tab + WebElement searchGroupsTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='admindisplaymygroup.jsp']"))); + searchGroupsTab.click(); - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); + check500Error(driver, "opening search groups window"); - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Click on the "Search/Edit/Delete Groups" tab - WebElement searchGroupsTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='admindisplaymygroup.jsp']"))); - searchGroupsTab.click(); - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening search groups window."); - Assert.fail("500 error encountered while opening search groups window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Search/Edit/Delete Groups' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } - + // Test the open insert template window successful scenario @Test public void testOpenInsertTemplateWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Insert a Template" tab - WebElement insertTemplateTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='providertemplate.jsp']"))); - insertTemplateTab.click(); + // Click on the "Insert a Template" tab + WebElement insertTemplateTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='providertemplate.jsp']"))); + insertTemplateTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening insert template window."); - Assert.fail("500 error encountered while opening insert template window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening insert template window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Insert a Template' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open assign role window successful scenario @Test public void testAssignRoleWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Administration' tab on the menu bar - WebElement adminTab = wait.until(ExpectedConditions.elementToBeClickable(By.id("admin-panel"))); - adminTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String adminWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - adminWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } + try { + openAdminPanel(driver, wait); - // Click on the "Assign Role/Rights to Object" tab - WebElement assignRoleTab = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div.well.quick-links a[rel$='providerPrivilege.jsp']"))); - assignRoleTab.click(); + // Click on the "Assign Role/Rights to Object" tab + WebElement assignRoleTab = wait.until(ExpectedConditions.elementToBeClickable( + By.cssSelector("div.well.quick-links a[rel$='providerPrivilege.jsp']"))); + assignRoleTab.click(); - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening assign role window."); - Assert.fail("500 error encountered while opening assign role window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } + check500Error(driver, "opening assign role window"); - if (!is500Error) { Assert.assertTrue(driver.getCurrentUrl().contains("/administration/")); System.out.println("'Assign Role/Rights to Object' window opened successfully."); - } - - // Display the admin panel for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); + // Display the admin panel for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } } diff --git a/src/test/java/tests/OpenEchartSubSectionsTest.java b/src/test/java/tests/OpenEchartSubSectionsTest.java index c70b041db48..1a182a5587a 100644 --- a/src/test/java/tests/OpenEchartSubSectionsTest.java +++ b/src/test/java/tests/OpenEchartSubSectionsTest.java @@ -10,45 +10,51 @@ import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; import java.util.List; -public class OpenEchartSubSectionsTest { - - // Test the open preventions window successful scenario - @Test - public void testOpenPreventionsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); +public class OpenEchartSubSectionsTest extends BaseTest { + + /** + * Helper class to hold window handles during echart navigation. + */ + private static class EchartContext { + final WebDriver driver; + final WebDriverWait wait; + final String mainWindowHandle; + final String demographicSearchWindowHandle; + final String eChartWindowHandle; + + EchartContext(WebDriver driver, WebDriverWait wait, String mainWindowHandle, + String demographicSearchWindowHandle, String eChartWindowHandle) { + this.driver = driver; + this.wait = wait; + this.mainWindowHandle = mainWindowHandle; + this.demographicSearchWindowHandle = demographicSearchWindowHandle; + this.eChartWindowHandle = eChartWindowHandle; + } + } - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); + /** + * Helper method to navigate to echart for patient with demographic number 7. + * Returns context with all window handles for further navigation. + */ + private EchartContext navigateToEchartForPatient7() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated( + By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); + System.out.println("Search demographic page open successful."); // Store the current window handle String mainWindowHandle = driver.getWindowHandle(); @@ -77,12 +83,12 @@ public void testOpenPreventionsWindowSuccessful() throws InterruptedException { WebElement patientResultsTable = driver.findElement(By.id("patientResults")); List rows = patientResultsTable.findElements(By.tagName("tr")); - // Find the patient with indicated demographic number - 7 and open the echart + // Find the patient with demographic number 7 and open the echart for (WebElement row : rows) { List cells = row.findElements(By.tagName("td")); if (cells.size() > 0) { String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { + if (demographicNo.equals("7")) { WebElement eChartButton = row.findElement(By.className("encounterBtn")); eChartButton.click(); break; @@ -116,21 +122,29 @@ public void testOpenPreventionsWindowSuccessful() throws InterruptedException { Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); System.out.println("E-Chart opened successfully of patient with id 7."); - // Scroll to the top to reveal the 'Preventions' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); + return new EchartContext(driver, wait, mainWindowHandle, demographicSearchWindowHandle, eChartWindowHandle); + } + + /** + * Helper method to click a tab in the echart and verify the new window opens correctly. + */ + private void clickEchartTabAndVerify(EchartContext ctx, String linkText, String expectedUrlPattern, + String tabName) throws InterruptedException { + // Scroll to the top to reveal the tab + ((JavascriptExecutor) ctx.driver).executeScript("window.scrollTo(0, 0);"); - WebElement preventionsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Preventions"))); - preventionsTab.click(); + WebElement tab = ctx.wait.until(ExpectedConditions.elementToBeClickable(By.linkText(linkText))); + tab.click(); - // Wait for the preventions window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String preventionsWindowHandle = null; + // Wait for the new window to open + ctx.wait.until(ExpectedConditions.numberOfWindowsToBe(4)); + Set allWindowHandles = ctx.driver.getWindowHandles(); for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - preventionsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscarPrevention/index.jsp")) { + if (!windowHandle.equals(ctx.mainWindowHandle) && + !windowHandle.equals(ctx.demographicSearchWindowHandle) && + !windowHandle.equals(ctx.eChartWindowHandle)) { + ctx.driver.switchTo().window(windowHandle); + if (ctx.driver.getCurrentUrl().contains(expectedUrlPattern)) { break; } } @@ -139,3496 +153,304 @@ public void testOpenPreventionsWindowSuccessful() throws InterruptedException { // Check for encountering 500 error boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + WebElement errorElement = ctx.driver.findElement( + By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); if (errorElement.isDisplayed()) { is500Error = true; - System.out.println("500 error encountered while opening preventions window."); - Assert.fail("500 error encountered while opening preventions window."); + System.out.println("500 error encountered while opening " + tabName + " window."); + Assert.fail("500 error encountered while opening " + tabName + " window."); } } catch (NoSuchElementException e) { System.out.println("No 500 error encountered."); } if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarPrevention/index.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarPrevention/index.jsp")); - System.out.println("Preventions window opened successfully."); + ctx.wait.until(ExpectedConditions.urlContains(expectedUrlPattern)); + Assert.assertTrue(ctx.driver.getCurrentUrl().contains(expectedUrlPattern)); + System.out.println(tabName + " window opened successfully."); } - // Display the preventions window for 2 sec + // Display the window for 2 sec Thread.sleep(2000); + } - // Close the browser - driver.quit(); - + // Test the open preventions window successful scenario + @Test + public void testOpenPreventionsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Preventions", "oscarPrevention/index.jsp", "Preventions"); + } finally { + ctx.driver.quit(); + } } // Test the open tickler window successful scenario @Test public void testOpenTicklerWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Tickler", "tickler/ticklerMain.jsp", "Tickler"); + } finally { + ctx.driver.quit(); } + } - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } + // Test the open disease registry window successful scenario + @Test + public void testOpenDiseaseRegistryWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Disease Registry", "dxresearch/setupDxResearch.do", "Disease Registry"); + } finally { + ctx.driver.quit(); } + } - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } + // Test the open forms window successful scenario + @Test + public void testOpenFormsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Forms", "oscarEncounter/formlist.jsp", "Forms"); + } finally { + ctx.driver.quit(); } + } - // Handle the popup asking to keep editing + // Test the open eforms window successful scenario + @Test + public void testOpenEformsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); + clickEchartTabAndVerify(ctx, "eForms", "eform/efmpatientformlist.jsp", "eForms"); + } finally { + ctx.driver.quit(); } + } - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Tickler' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement ticklerTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Tickler"))); - ticklerTab.click(); - - // Wait for the tickler window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String ticklerWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - ticklerWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("tickler/ticklerMain.jsp")) { - break; - } - } + // Test the open documents window successful scenario + @Test + public void testOpenDocumentsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Documents", "documentManager/documentReport.jsp", "Documents"); + } finally { + ctx.driver.quit(); } + } - // Check for encountering 500 error - boolean is500Error = false; + // Test the open lab result window successful scenario + @Test + public void testOpenLabResultWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening tickler window."); - Assert.fail("500 error encountered while opening tickler window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); + clickEchartTabAndVerify(ctx, "Lab Result", "lab/DemographicLab.jsp", "Lab Result"); + } finally { + ctx.driver.quit(); } + } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("tickler/ticklerMain.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("tickler/ticklerMain.jsp")); - System.out.println("Tickler window opened successfully."); + // Test the open messenger window successful scenario + @Test + public void testOpenMessengerWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Messenger", "messenger/DisplayDemographicMessages.do", "Messenger"); + } finally { + ctx.driver.quit(); } - - // Display the tickler window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } - // Test the open disease registry window successful scenario + // Test the open measurements window successful scenario @Test - public void testOpenDiseaseRegistryWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } + public void testOpenMeasurementsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Measurements", "oscarMeasurements/SetupHistoryIndex.do", "Measurements"); + } finally { + ctx.driver.quit(); } + } - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } + // Test the open consultations window successful scenario + @Test + public void testOpenConsultationsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Consultations", + "oscarConsultationRequest/DisplayDemographicConsultationRequests.jsp", "Consultations"); + } finally { + ctx.driver.quit(); } + } - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } + // Test the open HRM documents window successful scenario + @Test + public void testOpenHRMDocumentsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "HRM Documents", + "hospitalReportManager/displayHRMDocList.jsp", "HRM Documents"); + } finally { + ctx.driver.quit(); } + } - // Handle the popup asking to keep editing + // Test the open social history window successful scenario + @Test + public void testOpenSocialHistoryWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); + clickEchartTabAndVerify(ctx, "Social History", "oscar/CaseManagementEntry.do", "Social History"); + } finally { + ctx.driver.quit(); } + } - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Disease Registry' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement diseaseRegistryTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Disease Registry"))); - diseaseRegistryTab.click(); - - // Wait for the disease registry window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String diseaseRegistryWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - diseaseRegistryWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("dxresearch/setupDxResearch.do")) { - break; - } - } + // Test the open medical history window successful scenario + @Test + public void testOpenMedicalHistoryWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Medical History", "oscar/CaseManagementEntry.do", "Medical History"); + } finally { + ctx.driver.quit(); } + } - // Check for encountering 500 error - boolean is500Error = false; + // Test the open ongoing concerns window successful scenario + @Test + public void testOpenOngoingConcernsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening disease registry window."); - Assert.fail("500 error encountered while opening disease registry window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); + clickEchartTabAndVerify(ctx, "Ongoing Concerns", "oscar/CaseManagementEntry.do", "Ongoing Concerns"); + } finally { + ctx.driver.quit(); } + } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("dxresearch/setupDxResearch.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("dxresearch/setupDxResearch.do")); - System.out.println("Disease registry window opened successfully."); + // Test the open reminders window successful scenario + @Test + public void testOpenRemindersWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Reminders", "oscar/CaseManagementEntry.do", "Reminders"); + } finally { + ctx.driver.quit(); } - - // Display the disease registry window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } - // Test the open forms window successful scenario + // Test the open allergies window successful scenario @Test - public void testOpenFormsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); + public void testOpenAllergiesWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Allergies", "oscarRx/showAllergy.do", "Allergies"); + } finally { + ctx.driver.quit(); + } + } - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Forms' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement formsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Forms"))); - formsTab.click(); - - // Wait for the forms window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String formsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - formsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscarEncounter/formlist.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening forms window."); - Assert.fail("500 error encountered while opening forms window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarEncounter/formlist.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarEncounter/formlist.jsp")); - System.out.println("Forms window opened successfully."); - } - - // Display the forms window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open eforms window successful scenario - @Test - public void testOpenEformsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'eForms' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement eformsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("eForms"))); - eformsTab.click(); - - // Wait for the eforms window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String eformsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - eformsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("eform/efmpatientformlist.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening eforms window."); - Assert.fail("500 error encountered while opening eforms window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("eform/efmpatientformlist.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("eform/efmpatientformlist.jsp")); - System.out.println("eForms window opened successfully."); - } - - // Display the eforms window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open documents window successful scenario - @Test - public void testOpenDocumentsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Documents' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement documentsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Documents"))); - documentsTab.click(); - - // Wait for the documents window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String documentsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - documentsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("documentManager/documentReport.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening documents window."); - Assert.fail("500 error encountered while opening documents window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("documentManager/documentReport.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("documentManager/documentReport.jsp")); - System.out.println("Documents window opened successfully."); - } - - // Display the documents window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open lab result window successful scenario - @Test - public void testOpenLabResultWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Lab Result' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement labResultTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Lab Result"))); - labResultTab.click(); - - // Wait for the lab result window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String labResultWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - labResultWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("lab/DemographicLab.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening lab result window."); - Assert.fail("500 error encountered while opening lab result window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("lab/DemographicLab.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("lab/DemographicLab.jsp")); - System.out.println("Lab result window opened successfully."); - } - - // Display the lab result window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open messenger window successful scenario - @Test - public void testOpenMessengerWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Messenger' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement messengerTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Messenger"))); - messengerTab.click(); - - // Wait for the messenger window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String messengerWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - messengerWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("messenger/DisplayDemographicMessages.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening messenger window."); - Assert.fail("500 error encountered while opening messenger window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("messenger/DisplayDemographicMessages.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("messenger/DisplayDemographicMessages.do")); - System.out.println("Messenger window opened successfully."); - } - - // Display the messenger window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open measurements window successful scenario - @Test - public void testOpenMeasurementsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Measurements' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement measurementsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Measurements"))); - measurementsTab.click(); - - // Wait for the measurements window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String measurementsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - measurementsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscarMeasurements/SetupHistoryIndex.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening measurements window."); - Assert.fail("500 error encountered while opening measurements window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarMeasurements/SetupHistoryIndex.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarMeasurements/SetupHistoryIndex.do")); - System.out.println("Measurements window opened successfully."); - } - - // Display the measurements window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open consultations window successful scenario - @Test - public void testOpenConsultationsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Consultations' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement consultationsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Consultations"))); - consultationsTab.click(); - - // Wait for the consultations window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String consultationsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - consultationsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscarConsultationRequest/DisplayDemographicConsultationRequests.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening consultations window."); - Assert.fail("500 error encountered while opening consultations window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarConsultationRequest/DisplayDemographicConsultationRequests.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarConsultationRequest/DisplayDemographicConsultationRequests.jsp")); - System.out.println("Consultations window opened successfully."); - } - - // Display the consultations window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open hrm documents window successful scenario - @Test - public void testOpenHRMDocumentsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'HRM Documents' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement hrmDocumentsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("HRM Documents"))); - hrmDocumentsTab.click(); - - // Wait for the hrm documents window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String hrmDocumentsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - hrmDocumentsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("hospitalReportManager/displayHRMDocList.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening hrm documents window."); - Assert.fail("500 error encountered while opening hrm documents window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("hospitalReportManager/displayHRMDocList.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("hospitalReportManager/displayHRMDocList.jsp")); - System.out.println("HRM documents window opened successfully."); - } - - // Display the hrm documents window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open social history window successful scenario - @Test - public void testOpenSocialHistoryWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Social History' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement socialHistoryTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Social History"))); - socialHistoryTab.click(); - - // Wait for the social history window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String socialHistoryWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - socialHistoryWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening social history window."); - Assert.fail("500 error encountered while opening social history window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Social history window opened successfully."); - } - - // Display the social history window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open medical history window successful scenario - @Test - public void testOpenMedicalHistoryWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Medical History' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement medicalHistoryTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Medical History"))); - medicalHistoryTab.click(); - - // Wait for the medical history window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String medicalHistoryWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - medicalHistoryWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening medical history window."); - Assert.fail("500 error encountered while opening medical history window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Medical history window opened successfully."); - } - - // Display the medical history window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open ongoing concerns window successful scenario - @Test - public void testOpenOngoingConcernsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Ongoing Concerns' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement ongoingConcernsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Ongoing Concerns"))); - ongoingConcernsTab.click(); - - // Wait for the ongoing concerns window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String ongoingConcernsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - ongoingConcernsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening ongoing concerns window."); - Assert.fail("500 error encountered while opening ongoing concerns window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Ongoing concerns window opened successfully."); - } - - // Display the ongoing concerns window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open reminders window successful scenario - @Test - public void testOpenRemindersWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Reminders' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement remindersTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Reminders"))); - remindersTab.click(); - - // Wait for the reminders window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String remindersWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - remindersWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening reminders window."); - Assert.fail("500 error encountered while opening reminders window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Reminders window opened successfully."); - } - - // Display the reminders window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open allergies window successful scenario - @Test - public void testOpenAllergiesWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Allergies' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement allergiesTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Allergies"))); - allergiesTab.click(); - - // Wait for the allergies window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String allergiesWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - allergiesWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscarRx/showAllergy.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening allergies window."); - Assert.fail("500 error encountered while opening allergies window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarRx/showAllergy.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarRx/showAllergy.do")); - System.out.println("Allergies window opened successfully."); - } - - // Display the allergies window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open medications window successful scenario - @Test - public void testOpenMedicationsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Medications' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement medicationsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Medications"))); - medicationsTab.click(); - - // Wait for the medications window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String medicationsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - medicationsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscarRx/choosePatient.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening medications window."); - Assert.fail("500 error encountered while opening medications window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarRx/choosePatient.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarRx/choosePatient.do")); - System.out.println("Medications window opened successfully."); - } - - // Display the medications window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open other meds window successful scenario - @Test - public void testOpenOtherMedsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Other Meds' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement otherMedsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Other Meds"))); - otherMedsTab.click(); - - // Wait for the other meds window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String otherMedsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - otherMedsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening other meds window."); - Assert.fail("500 error encountered while opening other meds window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Other meds window opened successfully."); - } - - // Display the other meds window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open risk factors window successful scenario - @Test - public void testOpenRiskFactorsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Risk Factors' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement riskFactorsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Risk Factors"))); - riskFactorsTab.click(); - - // Wait for the risk factors window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String riskFactorsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - riskFactorsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening risk factors window."); - Assert.fail("500 error encountered while opening risk factors window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Risk factors window opened successfully."); - } - - // Display the risk factors window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open family history window successful scenario - @Test - public void testOpenFamilyHistoryWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Family History' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement familyHistoryTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Family History"))); - familyHistoryTab.click(); - - // Wait for the family history window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String familyHistoryWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - familyHistoryWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening family history window."); - Assert.fail("500 error encountered while opening family history window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementEntry.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementEntry.do")); - System.out.println("Family history window opened successfully."); - } - - // Display the family history window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open unresolved issues page successful scenario - @Test - public void testOpenUnresolvedIssuesPageSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Unresolved Issues' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement unresolvedIssuesTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Unresolved Issues"))); - unresolvedIssuesTab.click(); - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening unresolved issues page."); - Assert.fail("500 error encountered while opening unresolved issues page."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementView.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementView.do")); - System.out.println("Unresolved issues page opened successfully."); - } - - // Display the unresolved issues page for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open resolved issues page successful scenario - @Test - public void testOpenResolvedIssuesPageSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Resolved Issues' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement resolvedIssuesTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Resolved Issues"))); - resolvedIssuesTab.click(); - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening resolved issues page."); - Assert.fail("500 error encountered while opening resolved issues page."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/CaseManagementView.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/CaseManagementView.do")); - System.out.println("Resolved issues page opened successfully."); - } - - // Display the unresolved issues page for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - - } - - // Test the open decision support alerts window successful scenario - @Test - public void testOpenDecisionSupportAlertsWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing + // Test the open medications window successful scenario + @Test + public void testOpenMedicationsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Decision Support Alerts' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement decisionSupportAlertsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Decision Support Alerts"))); - decisionSupportAlertsTab.click(); - - // Wait for the decision support alerts window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String decisionSupportAlertsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - decisionSupportAlertsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("decisionSupport/guidelineAction.do")) { - break; - } - } + clickEchartTabAndVerify(ctx, "Medications", "oscarRx/choosePatient.do", "Medications"); + } finally { + ctx.driver.quit(); } + } - // Check for encountering 500 error - boolean is500Error = false; + // Test the open other meds window successful scenario + @Test + public void testOpenOtherMedsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening decision support alerts window."); - Assert.fail("500 error encountered while opening decision support alerts window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); + clickEchartTabAndVerify(ctx, "Other Meds", "oscar/CaseManagementEntry.do", "Other Meds"); + } finally { + ctx.driver.quit(); } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("decisionSupport/guidelineAction.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("decisionSupport/guidelineAction.do")); - System.out.println("Decision support alerts window opened successfully."); - } - - // Display the decision support alerts window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } - // Test the open episodes window successful scenario + // Test the open risk factors window successful scenario @Test - public void testOpenEpisodesWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } + public void testOpenRiskFactorsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Risk Factors", "oscar/CaseManagementEntry.do", "Risk Factors"); + } finally { + ctx.driver.quit(); } + } - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } + // Test the open family history window successful scenario + @Test + public void testOpenFamilyHistoryWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Family History", "oscar/CaseManagementEntry.do", "Family History"); + } finally { + ctx.driver.quit(); } + } - // Handle the popup asking to keep editing + // Test the open unresolved issues page successful scenario + @Test + public void testOpenUnresolvedIssuesPageSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); + clickEchartTabAndVerify(ctx, "Unresolved Issues", "oscar/CaseManagementView.do", "Unresolved Issues"); + } finally { + ctx.driver.quit(); } + } - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Episodes' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement episodesTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Episodes"))); - episodesTab.click(); - - // Wait for the episodes window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String episodesWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - episodesWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("oscar/Episode.do")) { - break; - } - } + // Test the open resolved issues page successful scenario + @Test + public void testOpenResolvedIssuesPageSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Resolved Issues", "oscar/CaseManagementView.do", "Resolved Issues"); + } finally { + ctx.driver.quit(); } + } - // Check for encountering 500 error - boolean is500Error = false; + // Test the open decision support alerts window successful scenario + @Test + public void testOpenDecisionSupportAlertsWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening episodes window."); - Assert.fail("500 error encountered while opening episodes window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); + clickEchartTabAndVerify(ctx, "Decision Support Alerts", + "decisionSupport/guidelineAction.do", "Decision Support Alerts"); + } finally { + ctx.driver.quit(); } + } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscar/Episode.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscar/Episode.do")); - System.out.println("Episodes window opened successfully."); + // Test the open episodes window successful scenario + @Test + public void testOpenEpisodesWindowSuccessful() throws InterruptedException { + EchartContext ctx = navigateToEchartForPatient7(); + try { + clickEchartTabAndVerify(ctx, "Episodes", "oscar/Episode.do", "Episodes"); + } finally { + ctx.driver.quit(); } - - // Display the episodes window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } // Test the open health care team window successful scenario @Test public void testOpenHealthCareTeamWindowSuccessful() throws InterruptedException { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful, the current URL is: " + driver.getCurrentUrl()); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Find the patient with indicated demographic number - 7 and open the echart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - String demographicNo = cells.get(0).getText(); - if (demographicNo.equals("7")) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - break; - } - } - } - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; - } - } - } - - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } - - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("E-Chart opened successfully of patient with id 7."); - - // Scroll to the top to reveal the 'Health Care Team' tab - ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, 0);"); - - WebElement healthCareTeamTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Health Care Team"))); - healthCareTeamTab.click(); - - // Wait for the health care team window to open - wait.until(ExpectedConditions.numberOfWindowsToBe(4)); - allWindowHandles = driver.getWindowHandles(); - String healthCareTeamWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle) && !windowHandle.equals(eChartWindowHandle)) { - healthCareTeamWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("demographic/displayHealthCareTeam.jsp")) { - break; - } - } - } - - // Check for encountering 500 error - boolean is500Error = false; + EchartContext ctx = navigateToEchartForPatient7(); try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening health care team window."); - Assert.fail("500 error encountered while opening health care team window."); - } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("demographic/displayHealthCareTeam.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("demographic/displayHealthCareTeam.jsp")); - System.out.println("Health care team window opened successfully."); + clickEchartTabAndVerify(ctx, "Health Care Team", + "demographic/displayHealthCareTeam.jsp", "Health Care Team"); + } finally { + ctx.driver.quit(); } - - // Display the health care team window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } } diff --git a/src/test/java/tests/OpenEchartTest.java b/src/test/java/tests/OpenEchartTest.java index fe04d42433e..4aba13edc45 100644 --- a/src/test/java/tests/OpenEchartTest.java +++ b/src/test/java/tests/OpenEchartTest.java @@ -6,70 +6,53 @@ import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; -public class OpenEchartTest { +public class OpenEchartTest extends BaseTest { // Test the login successful scenario @Test public void testOpenEchartSuccessful() { - - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("http://localhost:8080/oscar/provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful."); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - driver.switchTo().window(windowHandle); - break; + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); + + try { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Search' tab on the menu bar + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + searchTab.click(); + System.out.println("Search demographic page open successful."); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the search demographic window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("http://localhost:8080/oscar/demographic/search.jsp")); - System.out.println("Location of the search demographic window is: " + driver.getCurrentUrl()); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - System.out.println("Patients are listed on page " + driver.getCurrentUrl()); - - // Close the browser - // driver.quit(); + // Ensure the URL of the search demographic window is correct + wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); + System.out.println("Location of the search demographic window is: " + driver.getCurrentUrl()); + + // Enter "%" in the search bar and press Enter to get all patients + WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); + searchBar.sendKeys("%"); + searchBar.sendKeys(Keys.RETURN); + System.out.println("Patients are listed on page " + driver.getCurrentUrl()); + } finally { + driver.quit(); + } } } diff --git a/src/test/java/tests/OpenWindowsFromMainMenuTest.java b/src/test/java/tests/OpenWindowsFromMainMenuTest.java index fcc172ed04f..5899527c289 100644 --- a/src/test/java/tests/OpenWindowsFromMainMenuTest.java +++ b/src/test/java/tests/OpenWindowsFromMainMenuTest.java @@ -6,7 +6,6 @@ import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; @@ -15,575 +14,433 @@ // No need to test the open admin panel scenario as it is already tested in the OpenAdminPanelTest.java file // No need to test the open schedule page scenario as it is already opened after login // No need to test the open resources and help windows scenarios as they are not available -public class OpenWindowsFromMainMenuTest { +public class OpenWindowsFromMainMenuTest extends BaseTest { // Test the open caseload page successful scenario @Test public void openCaseloadPageSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Caseload' tab on the menu bar - WebElement caseloadTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Caseload"))); - caseloadTab.click(); - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening caseload page."); - Assert.fail("500 error encountered while opening caseload page."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Caseload' tab on the menu bar + WebElement caseloadTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Caseload"))); + caseloadTab.click(); + + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening caseload page."); + Assert.fail("500 error encountered while opening caseload page."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("provider/providercontrol.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("provider/providercontrol.jsp")); - System.out.println("Caseload page opened successfully."); - } - - // Display the caseload page for 2 sec - Thread.sleep(2000); - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("provider/providercontrol.jsp")); + Assert.assertTrue(driver.getCurrentUrl().contains("provider/providercontrol.jsp")); + System.out.println("Caseload page opened successfully."); + } + // Display the caseload page for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open report window successful scenario @Test public void openReportWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Report' tab on the menu bar - WebElement reportTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Report"))); - reportTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String reportWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - reportWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening report window."); - Assert.fail("500 error encountered while opening report window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Report' tab on the menu bar + WebElement reportTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Report"))); + reportTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("report/reportindex.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("report/reportindex.jsp")); - System.out.println("Report window opened successfully."); - } - // Display the report window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening report window."); + Assert.fail("500 error encountered while opening report window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("report/reportindex.jsp")); + Assert.assertTrue(driver.getCurrentUrl().contains("report/reportindex.jsp")); + System.out.println("Report window opened successfully."); + } + // Display the report window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } - + // Test the open billing window successful scenario @Test public void openBillingWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Billing' tab on the menu bar - WebElement billingTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Billing"))); - billingTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String billingWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - billingWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening billing window."); - Assert.fail("500 error encountered while opening billing window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Billing' tab on the menu bar + WebElement billingTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Billing"))); + billingTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("billing/CA/ON/billingONReport.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("billing/CA/ON/billingONReport.jsp")); - System.out.println("Billing window opened successfully."); - } - - // Display the billing window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening billing window."); + Assert.fail("500 error encountered while opening billing window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("billing/CA/ON/billingONReport.jsp")); + Assert.assertTrue(driver.getCurrentUrl().contains("billing/CA/ON/billingONReport.jsp")); + System.out.println("Billing window opened successfully."); + } + // Display the billing window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open inbox window successful scenario @Test public void openInboxWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Inbox' tab on the menu bar - WebElement inboxTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Inbox"))); - inboxTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String inboxWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - inboxWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening inbox window."); - Assert.fail("500 error encountered while opening inbox window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Inbox' tab on the menu bar + WebElement inboxTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Inbox"))); + inboxTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("documentManager/inboxManage.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("documentManager/inboxManage.do")); - System.out.println("Inbox window opened successfully."); - } - // Display the inbox window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening inbox window."); + Assert.fail("500 error encountered while opening inbox window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("documentManager/inboxManage.do")); + Assert.assertTrue(driver.getCurrentUrl().contains("documentManager/inboxManage.do")); + System.out.println("Inbox window opened successfully."); + } + // Display the inbox window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open msg window successful scenario @Test public void openMsgWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Msg' tab on the menu bar - WebElement msgTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Msg"))); - msgTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String msgWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - msgWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening msg window."); - Assert.fail("500 error encountered while opening msg window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Msg' tab on the menu bar + WebElement msgTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Msg"))); + msgTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("messenger/DisplayMessages.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("messenger/DisplayMessages.do")); - System.out.println("Msg window opened successfully."); - } - // Display the msg window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening msg window."); + Assert.fail("500 error encountered while opening msg window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("messenger/DisplayMessages.do")); + Assert.assertTrue(driver.getCurrentUrl().contains("messenger/DisplayMessages.do")); + System.out.println("Msg window opened successfully."); + } + // Display the msg window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open consultations window successful scenario @Test public void openConsultationsWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Consultations' tab on the menu bar - WebElement consultationsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Consultations"))); - consultationsTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String consultationsWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - consultationsWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening consultations window."); - Assert.fail("500 error encountered while opening consultations window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Consultations' tab on the menu bar + WebElement consultationsTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Consultations"))); + consultationsTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("oscarEncounter/IncomingConsultation.do")); - Assert.assertTrue(driver.getCurrentUrl().contains("oscarEncounter/IncomingConsultation.do")); - System.out.println("Consultations window opened successfully."); - } - - // Display the consultations window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening consultations window."); + Assert.fail("500 error encountered while opening consultations window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("oscarEncounter/IncomingConsultation.do")); + Assert.assertTrue(driver.getCurrentUrl().contains("oscarEncounter/IncomingConsultation.do")); + System.out.println("Consultations window opened successfully."); + } + // Display the consultations window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open edoc window successful scenario @Test public void openEdocWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'eDoc' tab on the menu bar - WebElement edocTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("eDoc"))); - edocTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String edocWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - edocWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening edoc window."); - Assert.fail("500 error encountered while opening edoc window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'eDoc' tab on the menu bar + WebElement edocTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("eDoc"))); + edocTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("documentManager/documentReport.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("documentManager/documentReport.jsp")); - System.out.println("eDoc window opened successfully."); - } - - // Display the edoc window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening edoc window."); + Assert.fail("500 error encountered while opening edoc window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("documentManager/documentReport.jsp")); + Assert.assertTrue(driver.getCurrentUrl().contains("documentManager/documentReport.jsp")); + System.out.println("eDoc window opened successfully."); + } + // Display the edoc window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } // Test the open tickler window successful scenario @Test public void openTicklerWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Tickler' tab on the menu bar - WebElement ticklerTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Tickler"))); - ticklerTab.click(); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Wait for the new window to open and switch to it - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String ticklerWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - ticklerWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; - } - } - - // Check for encountering 500 error - boolean is500Error = false; try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening tickler window."); - Assert.fail("500 error encountered while opening tickler window."); + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Tickler' tab on the menu bar + WebElement ticklerTab = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Tickler"))); + ticklerTab.click(); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Wait for the new window to open and switch to it + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - wait.until(ExpectedConditions.urlContains("tickler/ticklerMain.jsp")); - Assert.assertTrue(driver.getCurrentUrl().contains("tickler/ticklerMain.jsp")); - System.out.println("Tickler window opened successfully."); - } - - // Display the tickler window for 2 sec - Thread.sleep(2000); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening tickler window."); + Assert.fail("500 error encountered while opening tickler window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Close the browser - driver.quit(); + if (!is500Error) { + wait.until(ExpectedConditions.urlContains("tickler/ticklerMain.jsp")); + Assert.assertTrue(driver.getCurrentUrl().contains("tickler/ticklerMain.jsp")); + System.out.println("Tickler window opened successfully."); + } + // Display the tickler window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); + } } } diff --git a/src/test/java/tests/SearchPatientTest.java b/src/test/java/tests/SearchPatientTest.java index 09a5169800b..92636932d3c 100644 --- a/src/test/java/tests/SearchPatientTest.java +++ b/src/test/java/tests/SearchPatientTest.java @@ -9,454 +9,381 @@ import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.Set; import java.util.List; -public class SearchPatientTest { +public class SearchPatientTest extends BaseTest { // Test the open all echarts successful scenario @Test public void testOpenAllEchartsSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful."); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; + try { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Search' tab on the menu bar + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + searchTab.click(); + System.out.println("Search demographic page open successful."); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the search demographic window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + String demographicSearchWindowHandle = null; + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + demographicSearchWindowHandle = windowHandle; + driver.switchTo().window(windowHandle); + break; + } } - } - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - // Iterate through all pages and open each patient's e-chart - boolean hasNextPage = true; - while (hasNextPage) { - // Locate the patient results table - WebElement patientResultsTable = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("patientResults"))); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Iterate over each row and open the e-chart - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - WebElement eChartButton = row.findElement(By.className("encounterBtn")); - eChartButton.click(); - - // Switch to the eChart window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String eChartWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - eChartWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { - break; + // Ensure the URL of the search demographic window is correct + wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); + + // Enter "%" in the search bar and press Enter to get all patients + WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); + searchBar.sendKeys("%"); + searchBar.sendKeys(Keys.RETURN); + + // Iterate through all pages and open each patient's e-chart + boolean hasNextPage = true; + while (hasNextPage) { + // Locate the patient results table + WebElement patientResultsTable = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("patientResults"))); + List rows = patientResultsTable.findElements(By.tagName("tr")); + + // Iterate over each row and open the e-chart + for (WebElement row : rows) { + List cells = row.findElements(By.tagName("td")); + if (cells.size() > 0) { + WebElement eChartButton = row.findElement(By.className("encounterBtn")); + eChartButton.click(); + + // Switch to the eChart window + wait.until(ExpectedConditions.numberOfWindowsToBe(3)); + allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { + driver.switchTo().window(windowHandle); + if (driver.getCurrentUrl().contains("casemgmt/forward.jsp")) { + break; + } } } - } - wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); - - // Check for encountering error page - boolean isErrorMsg = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'An Error has occurred in this application.')]")); - if (errorElement.isDisplayed()) { - isErrorMsg = true; - System.out.println("Error encountered while opening echart."); - Assert.fail("Error encountered while opening echart."); + wait.until(ExpectedConditions.urlContains("casemgmt/forward.jsp")); + + // Check for encountering error page + boolean isErrorMsg = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'An Error has occurred in this application.')]")); + if (errorElement.isDisplayed()) { + isErrorMsg = true; + System.out.println("Error encountered while opening echart."); + Assert.fail("Error encountered while opening echart."); + } + } catch (NoSuchElementException e) { + System.out.println("No error encountered."); } - } catch (NoSuchElementException e) { - System.out.println("No error encountered."); - } - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening echart."); - Assert.fail("500 error encountered while opening echart."); + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening echart."); + Assert.fail("500 error encountered while opening echart."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!isErrorMsg && !is500Error) { - Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); - System.out.println("Echart opened successfully for patient."); - } + if (!isErrorMsg && !is500Error) { + Assert.assertTrue(driver.getCurrentUrl().contains("casemgmt/forward.jsp")); + System.out.println("Echart opened successfully for patient."); + } - // Handle the popup asking to keep editing - try { - Alert alert = wait.until(ExpectedConditions.alertIsPresent()); - alert.accept(); - } catch (TimeoutException e) { - System.out.println("No alert present."); - } + // Handle the popup asking to keep editing + try { + Alert alert = wait.until(ExpectedConditions.alertIsPresent()); + alert.accept(); + } catch (TimeoutException e) { + System.out.println("No alert present."); + } - // Display the eChart for 2 sec - Thread.sleep(2000); + // Display the eChart for 2 sec + Thread.sleep(2000); - // Close the eChart window and switch back to the demographic search window - driver.close(); - driver.switchTo().window(demographicSearchWindowHandle); + // Close the eChart window and switch back to the demographic search window + driver.close(); + driver.switchTo().window(demographicSearchWindowHandle); + } } - } - // Check if there is a next page - List nextPageButtons = driver.findElements(By.xpath("//a[contains(text(), 'Next')]")); - if (nextPageButtons.size() > 0) { - nextPageButtons.get(0).click(); - wait.until(ExpectedConditions.stalenessOf(patientResultsTable)); - } else { - hasNextPage = false; + // Check if there is a next page + List nextPageButtons = driver.findElements(By.xpath("//a[contains(text(), 'Next')]")); + if (nextPageButtons.size() > 0) { + nextPageButtons.get(0).click(); + wait.until(ExpectedConditions.stalenessOf(patientResultsTable)); + } else { + hasNextPage = false; + } } + } finally { + driver.quit(); } - - // Close the browser - driver.quit(); - } // Test the open all master records successful scenario @Test public void testOpenAllMasterRecordsSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful."); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; + try { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Search' tab on the menu bar + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + searchTab.click(); + System.out.println("Search demographic page open successful."); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the search demographic window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + String demographicSearchWindowHandle = null; + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + demographicSearchWindowHandle = windowHandle; + driver.switchTo().window(windowHandle); + break; + } } - } - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Enter "%" in the search bar and press Enter to get all patients - WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); - searchBar.sendKeys("%"); - searchBar.sendKeys(Keys.RETURN); - - boolean hasNextPage = true; - - while (hasNextPage) { - // Locate the patient results table - WebElement patientResultsTable = driver.findElement(By.id("patientResults")); - List rows = patientResultsTable.findElements(By.tagName("tr")); - - // Iterate through each row to open the master record for each patient - for (WebElement row : rows) { - List cells = row.findElements(By.tagName("td")); - if (cells.size() > 0) { - WebElement masterRecordButton = row.findElement(By.cssSelector("a[title='Master Demographic File']")); - masterRecordButton.click(); - - // Switch to the master record window - wait.until(ExpectedConditions.numberOfWindowsToBe(3)); - allWindowHandles = driver.getWindowHandles(); - String masterRecordWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { - masterRecordWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - if (driver.getCurrentUrl().contains("search_detail")) { - break; + // Ensure the URL of the search demographic window is correct + wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); + + // Enter "%" in the search bar and press Enter to get all patients + WebElement searchBar = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("keyword"))); + searchBar.sendKeys("%"); + searchBar.sendKeys(Keys.RETURN); + + boolean hasNextPage = true; + + while (hasNextPage) { + // Locate the patient results table (use explicit wait to avoid race condition after pagination) + WebElement patientResultsTable = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("patientResults"))); + List rows = patientResultsTable.findElements(By.tagName("tr")); + + // Iterate through each row to open the master record for each patient + for (WebElement row : rows) { + List cells = row.findElements(By.tagName("td")); + if (cells.size() > 0) { + WebElement masterRecordButton = row.findElement(By.cssSelector("a[title='Master Demographic File']")); + masterRecordButton.click(); + + // Switch to the master record window + wait.until(ExpectedConditions.numberOfWindowsToBe(3)); + allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle) && !windowHandle.equals(demographicSearchWindowHandle)) { + driver.switchTo().window(windowHandle); + if (driver.getCurrentUrl().contains("search_detail")) { + break; + } } } - } - wait.until(ExpectedConditions.urlContains("search_detail")); - - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening master record."); - Assert.fail("500 error encountered while opening master record."); + wait.until(ExpectedConditions.urlContains("search_detail")); + + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening master record."); + Assert.fail("500 error encountered while opening master record."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - Assert.assertTrue(driver.getCurrentUrl().contains("search_detail")); - System.out.println("Master record opened successfully for patient."); - } + if (!is500Error) { + Assert.assertTrue(driver.getCurrentUrl().contains("search_detail")); + System.out.println("Master record opened successfully for patient."); + } - // Display the master record for 2 sec - Thread.sleep(2000); + // Display the master record for 2 sec + Thread.sleep(2000); - // Click the "Exit Master Record" button - WebElement exitButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("cancelButton"))); - exitButton.click(); + // Click the "Exit Master Record" button + WebElement exitButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("cancelButton"))); + exitButton.click(); - // Switch back to the demographic search window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - driver.switchTo().window(demographicSearchWindowHandle); + // Switch back to the demographic search window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + driver.switchTo().window(demographicSearchWindowHandle); + } } - } - // Check if there's a "Next" button for pagination - List nextButtons = driver.findElements(By.xpath("//a[contains(text(), 'Next')]")); - if (nextButtons.size() > 0) { - WebElement nextPageButton = nextButtons.get(0); - nextPageButton.click(); - wait.until(ExpectedConditions.stalenessOf(patientResultsTable)); - } else { - hasNextPage = false; + // Check if there's a "Next" button for pagination + List nextButtons = driver.findElements(By.xpath("//a[contains(text(), 'Next')]")); + if (nextButtons.size() > 0) { + WebElement nextPageButton = nextButtons.get(0); + nextPageButton.click(); + wait.until(ExpectedConditions.stalenessOf(patientResultsTable)); + } else { + hasNextPage = false; + } } + } finally { + driver.quit(); } - - // Close the browser - driver.quit(); - } // Test the search patient by clicking "All" button successful scenario @Test public void testSearchPatientByAllButtonSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful."); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; + try { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Search' tab on the menu bar + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + searchTab.click(); + System.out.println("Search demographic page open successful."); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the search demographic window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - // Click the "All" button to get the patients listed - WebElement allButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@type='button' and @value='All']"))); - allButton.click(); + // Ensure the URL of the search demographic window is correct + wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); + + // Click the "All" button to get the patients listed + WebElement allButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@type='button' and @value='All']"))); + allButton.click(); + + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while searching."); + Assert.fail("500 error encountered while searching."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while searching."); - Assert.fail("500 error encountered while searching."); + if (!is500Error) { + Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographiccontrol.jsp")); + System.out.println("Clicked the 'All' button to list most recent three patients."); } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographiccontrol.jsp")); - System.out.println("Clicked the 'All' button to list most recent three patients."); + // Display the patients search result for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); } - - // Display the patients search result for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } // Test the open create demographic window successful scenario @Test public void testOpenCreateDemographicWindowSuccessful() throws InterruptedException { + WebDriver driver = createHeadlessDriver(); + WebDriverWait wait = createWait(driver); - // Open the main page - System.setProperty("webdriver.chrome.driver", "/opt/homebrew/bin/chromedriver"); // Set the path to the chromedriver executable - WebDriver driver = new ChromeDriver(); - WebDriverWait wait = new WebDriverWait(driver, 10); - driver.get("http://localhost:8080/"); - - // Locate the username and password fields - WebElement usernameField = wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("username"))); - WebElement passwordField = driver.findElement(By.name("password")); - - // Enter the username and password - usernameField.sendKeys("oscardoc"); - passwordField.sendKeys("mac2002#"); - - // Locate and click the login button - WebElement loginButton = driver.findElement(By.cssSelector("input[type='submit'][value='Login']")); - loginButton.click(); - - // Verify the login was successful - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.contains("provider/providercontrol.jsp")); - System.out.println("Login successful, the current URL is: " + currentUrl); - - // Click on the 'Search' tab on the menu bar - WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); - searchTab.click(); - System.out.println("Search demographic page open successful."); - - // Store the current window handle - String mainWindowHandle = driver.getWindowHandle(); - - // Switch to the search demographic window - wait.until(ExpectedConditions.numberOfWindowsToBe(2)); - Set allWindowHandles = driver.getWindowHandles(); - String demographicSearchWindowHandle = null; - for (String windowHandle : allWindowHandles) { - if (!windowHandle.equals(mainWindowHandle)) { - demographicSearchWindowHandle = windowHandle; - driver.switchTo().window(windowHandle); - break; + try { + // Login + login(driver, wait); + Assert.assertTrue(isLoginSuccessful(driver)); + System.out.println("Login successful, the current URL is: " + driver.getCurrentUrl()); + + // Click on the 'Search' tab on the menu bar + WebElement searchTab = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//a[contains(@onclick, \"popupPage2('../demographic/search.jsp');\")]"))); + searchTab.click(); + System.out.println("Search demographic page open successful."); + + // Store the current window handle + String mainWindowHandle = driver.getWindowHandle(); + + // Switch to the search demographic window + wait.until(ExpectedConditions.numberOfWindowsToBe(2)); + Set allWindowHandles = driver.getWindowHandles(); + for (String windowHandle : allWindowHandles) { + if (!windowHandle.equals(mainWindowHandle)) { + driver.switchTo().window(windowHandle); + break; + } } - } - - // Ensure the URL of the search demographic window is correct - wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); - - // Click the "All" button to get the patients listed - WebElement allButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@type='button' and @value='All']"))); - allButton.click(); - // Click the "Create Demographic" button to open the create new demographic record window - WebElement createDemographicButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".createNew a[title]"))); - createDemographicButton.click(); + // Ensure the URL of the search demographic window is correct + wait.until(ExpectedConditions.urlContains("demographic/search.jsp")); + + // Click the "All" button to get the patients listed + WebElement allButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@type='button' and @value='All']"))); + allButton.click(); + + // Click the "Create Demographic" button to open the create new demographic record window + WebElement createDemographicButton = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".createNew a[title]"))); + createDemographicButton.click(); + + // Check for encountering 500 error + boolean is500Error = false; + try { + WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); + if (errorElement.isDisplayed()) { + is500Error = true; + System.out.println("500 error encountered while opening create demographic window."); + Assert.fail("500 error encountered while opening create demographic window."); + } + } catch (NoSuchElementException e) { + System.out.println("No 500 error encountered."); + } - // Check for encountering 500 error - boolean is500Error = false; - try { - WebElement errorElement = driver.findElement(By.xpath("//*[contains(text(), 'Looks like something went wrong...')]")); - if (errorElement.isDisplayed()) { - is500Error = true; - System.out.println("500 error encountered while opening create demographic window."); - Assert.fail("500 error encountered while opening create demographic window."); + if (!is500Error) { + Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographicaddarecordhtm.jsp")); + System.out.println("Create demographic window opened successfully, the current URL is: " + driver.getCurrentUrl()); } - } catch (NoSuchElementException e) { - System.out.println("No 500 error encountered."); - } - if (!is500Error) { - Assert.assertTrue(driver.getCurrentUrl().contains("demographic/demographicaddarecordhtm.jsp")); - System.out.println("Create demographic window opened successfully, the current URL is: " + driver.getCurrentUrl()); + // Display the create demographic window for 2 sec + Thread.sleep(2000); + } finally { + driver.quit(); } - - // Display the create demographic window for 2 sec - Thread.sleep(2000); - - // Close the browser - driver.quit(); - } -} \ No newline at end of file +} diff --git a/src/test/resources/spring_jpa_test.xml b/src/test/resources/spring_jpa_test.xml index 3b5559b15e1..69c2f6a1a8f 100755 --- a/src/test/resources/spring_jpa_test.xml +++ b/src/test/resources/spring_jpa_test.xml @@ -11,7 +11,7 @@ + --> @@ -32,9 +32,9 @@ - + - + @@ -42,13 +42,8 @@ - - - - - + +