Compare commits
3 Commits
master
...
1ef8af4d42
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ef8af4d42 | |||
| 1fd1b4a5ac | |||
| f557828cda |
6
.idea/copilot.data.migration.agent.xml
generated
Normal file
6
.idea/copilot.data.migration.agent.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AgentMigrationStateService">
|
||||
<option name="migrationStatus" value="COMPLETED" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/copilot.data.migration.ask.xml
generated
Normal file
6
.idea/copilot.data.migration.ask.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AskMigrationStateService">
|
||||
<option name="migrationStatus" value="COMPLETED" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/copilot.data.migration.ask2agent.xml
generated
Normal file
6
.idea/copilot.data.migration.ask2agent.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Ask2AgentMigrationStateService">
|
||||
<option name="migrationStatus" value="COMPLETED" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/copilot.data.migration.edit.xml
generated
Normal file
6
.idea/copilot.data.migration.edit.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EditMigrationStateService">
|
||||
<option name="migrationStatus" value="COMPLETED" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -27,10 +27,9 @@ public class ErhaAPI {
|
||||
private @Getter String API_USERNAME = "erha-pb-001";
|
||||
private @Getter String API_PASSWORD = "bM0tH!s";
|
||||
|
||||
|
||||
|
||||
private String auth;
|
||||
private String API_URL="";
|
||||
private boolean DermiesMode = false;
|
||||
|
||||
private final Gson gson = new Gson();
|
||||
|
||||
@@ -42,6 +41,16 @@ public class ErhaAPI {
|
||||
setProduction(isProduction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Erha API object
|
||||
* @param isProduction if true will use Production URL, if false will use Staging URL
|
||||
* @param dermiesMode if true will use Dermies Mode (for Dermies Clinic)
|
||||
*/
|
||||
public ErhaAPI(boolean isProduction, boolean dermiesMode){
|
||||
setProduction(isProduction);
|
||||
this.DermiesMode = dermiesMode;
|
||||
}
|
||||
|
||||
public void setProduction(boolean isProduction){
|
||||
final String API_URL_PROD = "https://connect-api.aryanoble.co.id/api";
|
||||
final String API_URL_STAGING = "https://connect-api-staging.aryanoble.web.id/api";
|
||||
@@ -99,7 +108,7 @@ public class ErhaAPI {
|
||||
try (HttpClient client = HttpClient.newHttpClient()) {
|
||||
int medical_record_detail_id = toInt(Barcode);
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(java.net.URI.create(API_URL+"/photobooth/photobooth/" + medical_record_detail_id))
|
||||
.uri(java.net.URI.create(API_URL+ (DermiesMode ? "/photobooth/dermies/":"/photobooth/photobooth/") + medical_record_detail_id))
|
||||
.header("Authorization", "Basic " + auth)
|
||||
.GET()
|
||||
.build();
|
||||
@@ -193,7 +202,7 @@ public class ErhaAPI {
|
||||
|
||||
System.out.println("Uploading file : " + filename + " to " + (config.isProduction()?"Production":"Staging")+" API ");
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(new URI(API_URL + "/photobooth/photobooth"))
|
||||
.uri(new URI(API_URL + (DermiesMode ?"/photobooth/dermies":"/photobooth/photobooth")))
|
||||
.header("Authorization", "Basic " + auth)
|
||||
.header("Content-Type", "multipart/form-data; boundary=" + boundary)
|
||||
.POST(HttpRequest.BodyPublishers.ofByteArray(multipartData))
|
||||
|
||||
@@ -7,7 +7,6 @@ import javafx.application.Platform;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.image.Image;
|
||||
|
||||
@@ -90,7 +90,8 @@ public class CaptureView {
|
||||
|
||||
private final AtomicBoolean isTakingPhoto = new AtomicBoolean(false);
|
||||
|
||||
private final ErhaAPI erhaAPI = new ErhaAPI(config.isProduction());
|
||||
// dermiesMode = true means for Dermies Clinic, false means for Erha Clinic
|
||||
private final ErhaAPI erhaAPI = new ErhaAPI(config.isProduction(), true);
|
||||
|
||||
// for timeout 180 detik
|
||||
private final int timeout = 180;
|
||||
|
||||
@@ -24,7 +24,7 @@ import static Config.SomeCodes.config;
|
||||
|
||||
public class MainApplication extends Application {
|
||||
|
||||
final String version = "27082025-PRODUCTION-1.0.7";
|
||||
final String version = "30092025-STAGING-1.0.7";
|
||||
PhotoCleaner photoCleaner;
|
||||
public static Map<Integer, Detectors> detectorsList = new HashMap<>();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class MainApplication extends Application {
|
||||
Screen screen = Screen.getPrimary();
|
||||
Rectangle2D screenbound = screen.getBounds();
|
||||
Scene scene = new Scene(fxmlLoader.load(), screenbound.getWidth(), screenbound.getHeight());
|
||||
stage.setTitle("MultiCam Capture App for ERHA "+version);
|
||||
stage.setTitle("MultiCam Capture App for Dermies "+version);
|
||||
stage.setScene(scene);
|
||||
stage.setResizable(true);
|
||||
stage.setMaximized(true);
|
||||
|
||||
Reference in New Issue
Block a user