Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ captcha.enable-captcha=@env.ENABLE_CAPTCHA@

cors.allowed-origins=@env.CORS_ALLOWED_ORIGINS@

# Jitsi configuration
video-call-url=@env.VIDEO_CALL_URL@
jibri.output.path=@env.JIBRI_OUTPUT_PATH@
video.recording.path=@env.VIDEO_RECORDING_PATH@
Comment on lines +186 to 188
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

🧩 Analysis chain

Verify downstream usage of the new key video-call-url.

Please ensure all Java / YAML code now reads video-call-url and no references to the removed jibri.output.path remain.


🏁 Script executed:

#!/bin/bash
# Search for the old property key and the new one.
rg --no-heading --line-number $'jibri.output.path|video-call-url'

Length of output: 797


Replace remaining Jibri path reference with the new video.recording.path

The code still pulls the old jibri.output.path key in VideoCallServiceImpl. Update it to use the new video.recording.path:

β€’ src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java:138

  • Change
    String jibriOutputDir = ConfigProperties.getPropertyByName("jibri.output.path");
  • To something like
    String recordingPath = ConfigProperties.getPropertyByName("video.recording.path");

(and rename jibriOutputDir accordingly)

πŸ€– Prompt for AI Agents
In src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java
around line 138, replace the usage of the old configuration key
"jibri.output.path" with the new key "video.recording.path". Update the variable
name from jibriOutputDir to recordingPath to reflect this change. Modify the
call to ConfigProperties.getPropertyByName accordingly to fetch
"video.recording.path" instead.

2 changes: 1 addition & 1 deletion src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ captcha.enable-captcha=${ENABLE_CAPTCHA}

cors.allowed-origins=${CORS_ALLOWED_ORIGINS}

# Jitsi configuration
video-call-url=${VIDEO_CALL_URL}
jibri.output.path={JIBRI_OUTPUT_PATH}
video.recording.path={VIDEO_RECORDING_PATH}
Comment on lines +188 to 190
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Placeholder typo will break property expansion.

${VIDEO_RECORDING_PATH} was accidentally changed to {VIDEO_RECORDING_PATH} – the Spring placeholder syntax requires the leading $.

-video.recording.path={VIDEO_RECORDING_PATH}
+video.recording.path=${VIDEO_RECORDING_PATH}
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Jitsi configuration
video-call-url=${VIDEO_CALL_URL}
jibri.output.path={JIBRI_OUTPUT_PATH}
video.recording.path={VIDEO_RECORDING_PATH}
# Jitsi configuration
video-call-url=${VIDEO_CALL_URL}
video.recording.path=${VIDEO_RECORDING_PATH}
πŸ€– Prompt for AI Agents
In src/main/environment/common_docker.properties around lines 188 to 190, the
placeholder for VIDEO_RECORDING_PATH is missing the leading '$' in the property
video.recording.path. Fix this by changing {VIDEO_RECORDING_PATH} to
${VIDEO_RECORDING_PATH} to ensure proper Spring property expansion.

2 changes: 1 addition & 1 deletion src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ grievanceAllocationRetryConfiguration=3
logging.path=logs/
logging.file.name=logs/common-api.log

# Jitsi configuration
video-call-url=https://vc.piramalswasthya.org/?
jibri.output.path=/srv/jibri/recordings
video.recording.path=/srv/recordings
Comment on lines +201 to 203
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

🧩 Analysis chain

Property naming is inconsistent with existing conventions – consider video.call.url instead.

Most keys in this file use dot-separated segments (video.recording.path, spring.datasource.url, etc.).
Using a dash (video-call-url) creates a one-off pattern and may complicate property binding in Spring (Environment#getProperty("video-call-url") will not map automatically to relaxed-binding POJOs).

- video-call-url=https://vc.piramalswasthya.org/?
+ video.call.url=https://vc.piramalswasthya.org/?

Before changing, verify whether other files (e.g. common_ci.properties, common_docker.properties, or Java @Value injections) already expect the dash form; align all of them to one style.


🏁 Script executed:

#!/bin/bash
# Search for occurrences of the dashed property key
rg --no-heading -n "video-call-url"

# Search for occurrences of the dotted variant
rg --no-heading -n "video.call.url"

# Check for Java @Value injections using the dashed key
rg --no-heading -n "@Value.*video-call-url"

# Check for Environment.getProperty calls using the dashed key
rg --no-heading -n "getProperty.*video-call-url"

Length of output: 1502


Ensure consistent dot-notation for the Jitsi URL property

The key video-call-url is currently used in three properties files and in VideoCallServiceImpl. Renaming it to video.call.url will require updating all references:

β€’ src/main/environment/common_example.properties:202
β€’ src/main/environment/common_ci.properties:187
β€’ src/main/environment/common_docker.properties:189
β€’ src/main/java/com/iemr/common/service/videocall/VideoCallServiceImpl.java:63 (and the commented ConfigProperties.getPropertyByName on line 67)

Suggested changes:

# in each .properties file
- video-call-url=https://vc.piramalswasthya.org/?
+ video.call.url=https://vc.piramalswasthya.org/?
# in VideoCallServiceImpl.java
- @Value("${video-call-url}")
+ @Value("${video.call.url}")
// And if you re-enable the ConfigProperties call:
//- this.jitsiLink = ConfigProperties.getPropertyByName("video-call-url");
//+ this.jitsiLink = ConfigProperties.getPropertyByName("video.call.url");

After applying, verify Spring’s relaxed binding still works and update any CI/docker environment variables (e.g. VIDEO_CALL_URL) to match.

πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Jitsi configuration
video-call-url=https://vc.piramalswasthya.org/?
jibri.output.path=/srv/jibri/recordings
video.recording.path=/srv/recordings
# Jitsi configuration
video.call.url=https://vc.piramalswasthya.org/?
video.recording.path=/srv/recordings
πŸ€– Prompt for AI Agents
In src/main/environment/common_example.properties around lines 201 to 203,
rename the property key from video-call-url to video.call.url to maintain
consistent dot-notation. Apply the same change in common_ci.properties line 187,
common_docker.properties line 189, and update all references in
VideoCallServiceImpl.java at line 63 and the commented
ConfigProperties.getPropertyByName at line 67. After renaming, verify that
Spring’s relaxed binding still functions correctly and update any related CI or
Docker environment variables such as VIDEO_CALL_URL accordingly.


captcha.secret-key= <Enter Cloudflare Secret Key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.controller.videocall;

import java.util.HashMap;
Expand All @@ -10,7 +32,6 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -19,7 +40,6 @@
import com.iemr.common.model.videocall.VideoCallRequest;
import com.iemr.common.service.videocall.VideoCallService;
import com.iemr.common.utils.response.OutputResponse;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.data.videocall;

import java.sql.Timestamp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.mapper.videocall;

import java.util.List;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.mapstruct.IterableMapping;
import org.mapstruct.factory.Mappers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.model.videocall;

import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.model.videocall;

import java.sql.Timestamp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.model.videocall;

import com.fasterxml.jackson.annotation.JsonFormat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.repository.videocall;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.service.videocall;
import com.iemr.common.utils.response.OutputResponse;

import com.iemr.common.model.videocall.UpdateCallRequest;
import com.iemr.common.model.videocall.VideoCallRequest;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* 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 3 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, see https://www.gnu.org/licenses/.
*/

package com.iemr.common.service.videocall;

import org.apache.commons.lang.RandomStringUtils;
Expand Down
Loading