Coder Social home page Coder Social logo

zdavatz / amiko-android Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 7.25 MB

AmiKo Desitin für Android

Home Page: https://play.google.com/store/apps/details?id=com.ywesee.amiko.de&hl=de_CH

License: GNU General Public License v3.0

CSS 3.38% JavaScript 0.58% Java 95.75% Makefile 0.08% Shell 0.20%
amiko fachinfo java android opensource swisspeddose prescriptions import amk print

amiko-android's Introduction

ypm

ywesee Pharma Monitor

Use Cases

  1. Monitor RSS Feeds in file rss_feeds.txt
  2. Monitor the RSS Feeds based on keywords in file keywords.txt
  3. Make Hash-Tags out of Keywords and make Hash-Tags clickable.
  4. Sort monitored articles by country.
  5. Show article count by country.
  6. Keywords and RSS-Feed-Links must be stored in a DB.

Running the App

meteor npm i
meteor

amiko-android's People

Contributors

b123400 avatar cybermax avatar lgtm-migrator avatar zdavatz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

amiko-android's Issues

Save doctor address

The doctor address has the following fields:
Title
Name
Surname
Street
City
ZIP
Phone
Email
Sign with Selfie
Sign with Foto

Create Prescription view

The prescription view is made up of four parts

  1. Date
  2. Doctors address #18
  3. Patient address #19
  4. Medicines #22

From the prescription view, the user should be able to select a patient.

  • Swiping from left to right should show the main view. From there you can longtap on a Search entry to select a package. #22
  • Swiping from right to left should show the saved prescriptions for the patient. #26

Longtapping on the Medicines bar should bring the camera view to scan a GTIN/2D Matrix code.

Bottom of the prescription view contains the following clickable items:
New | Interactions | Save | Send #27

Separate Settings from Navigation.

Settings behind the Pill Icon are:
Feedback
Share
Rate
Report
Update
Patients -> #19
Doctor -> #18

Navigation at the bottom of the App is:
Kompendium | Favorites | Interactions | Prescription #21

See AmiKo for iOS, first screen after starting the App.

Implement Interactions Buttons

The iOS version has an interactions button in the prescription view. The usage is a following:

  1. Add "Ponstan" to a prescription.
  2. Add "Marcoumar" to a prescription.
  3. Tap the Interactions button.
  4. The view jumps to the interactions Tab and shows the interactions for Ponstan and Marcoumar.

Validation Message does not go away after fields are filed.

  1. Open App
  2. Tap Settings
  3. New Patient
  4. Click Save.
  5. Fields are validated correctly. Mandatory fields become red.
  6. Choose address from Android Adress Book (swipe it in from the right).
  7. Fill in all the mandatory fields.
  8. Click Save again.
  9. Validation error is still there. But the fields are correctly filled in now.
  10. Actually validations errors should go away.

Clicking Update crashes the App

  1. Install Gradle generated App
  2. Click Update in the Menu.
  3. App Crashes with the following message in adb logcat | grep amiko:
12-10 09:06:47.737  8308  8308 D Utilities: File /storage/emulated/0/Download/amiko_db_full_idx_de.zip does not exists. No need to delete.
12-10 09:06:47.740  8308  8308 D Utilities: File /storage/emulated/0/Download/amiko_report_de.html does not exists. No need to delete.
12-10 09:06:47.766   532  3510 W DownloadManager: Path appears to be invalid: /storage/emulated/0/Download/amiko_db_full_idx_de.zip
12-10 09:06:47.770   532  3510 E DatabaseUtils: java.lang.SecurityException: No permission to write to /storage/emulated/0/Download/amiko_db_full_idx_de.zip: Neither user 10161 nor current process has android.permission.WRITE_EXTERNAL_STORAGE.
12-10 09:06:47.774  8308  8308 E AndroidRuntime: Process: com.ywesee.amiko.de, PID: 8308
12-10 09:06:47.774  8308  8308 E AndroidRuntime: java.lang.SecurityException: No permission to write to /storage/emulated/0/Download/amiko_db_full_idx_de.zip: Neither user 10161 nor current process has android.permission.WRITE_EXTERNAL_STORAGE.
12-10 09:06:47.774  8308  8308 E AndroidRuntime:        at com.ywesee.amiko.MainActivity.downloadUpdates(MainActivity.java:1750)
12-10 09:06:47.774  8308  8308 E AndroidRuntime:        at com.ywesee.amiko.MainActivity.onOptionsItemSelected(MainActivity.java:1542)
12-10 09:06:47.779  1580  2330 W ActivityManager:   Force finishing activity com.ywesee.amiko.de/com.ywesee.amiko.MainActivity
12-10 09:06:47.793  1580  1720 I ActivityManager: Showing crash dialog for package com.ywesee.amiko.de u0
12-10 09:06:48.286  1580  1719 W ActivityManager: Activity pause timeout for ActivityRecord{a380997 u0 com.ywesee.amiko.de/com.ywesee.amiko.MainActivity t554 f}
  1. Seems to be a scecurity issue with writing the downloaded Database file.

Clicking on chapter links does not always jump to the correct chapter

  1. Open App
  2. Search for Ponstan
  3. Swipe in the Chapters from the right.
  4. Select Kontraindikationen
  5. Jumping to the chapter works. 👍
  6. Swipe in Chapter from the right again.
  7. Select Kinetik.
  8. Now it does not jump to the correct chapter (anchor) anymore. 👎
  9. Compare with AmiKo on iPhone.

Clicking Send gives you the Sharing options

In the prescription view #21 you can click Send in the bottom right corner. Clicking that will give you the Sharing Options of Android.

a) Upload to OneDrive, Gdrive
b) Send .amk File via Email
c) Print/Save Prescription as PDF #29

Select Medicine from the Kompendium View

  1. Open App.
  2. Kompendium View is selected by Default.
  3. Search for Ponstan
  4. Long-Tap on the packge list in the Searchresult.
  5. Select a Package from the Package selector.
  6. Package is added to the prescription view.

If the user now clicks on the Prescription Icon in the bottom right corner, then the prescription will contain the added package in the medicines list.

import .amk File into AmiKo/CoMed for Android (open supported links)

The user should be able to import an .amk file into AmiKo/CoMed for Android.

  1. Open File via Gdrive.
  2. Select AmiKo/CoMed.
  3. Prescription opens in AmiKo/CoMed (same like on iOS).
  4. If the patient does not yet exist, then a new patient is created.
  5. The import of the prescription has to be checked via the Hash-Checksum.
  6. It should not be possible to import the same .amk file twice.
  7. Also see Generika for Android to see how the file-import works.

Only the full prescription view should be scrollable

Comments on commit: 1d3aaac

  1. Add patient.
  2. Add doctor.
  3. Add 5 packages to the prescription.
  4. Now the prescription view AND den the section containing the packages becomes scrollable.
  5. The section with the packages should not be scrollable.
  6. Only the full prescription view should be scrollable.

Database Update no longer works.

Since Version 1.4.3 - fd7068d - the update Function no longer works. Steps to reproduce are:

  1. Install latest version of the App from here: http://pillbox.oddb.org/AmiKo-Android-amiko-release.apk
  2. Click the Menu Button in the Top-Right corner.
  3. Click Update.
  4. Wait for the Update to finish.
  5. After the Update select any medication to show the Fachinfo.
  6. App crashes.
  7. Restart the App.
  8. There is no more data there. You can not search anything anymore.

Add Option to add new patient when selecting patient in prescription view

  1. Click Prescription.
  2. Long-Tap on Patient.
  3. Patient-Chooser shows up.
  4. In the top right corner there should be a "+".
  5. If the user clicks the "+" he/she should be taken to the "Create New Patient" view (the view you get when you start the App > Patient.
  6. Once the patient is selected and saved he/she should automatically selected for the prescription view.

Like this the user can easily add a patient from the patient view.

Select patient from local AmiKo address book.

Saving the credentials of a patient, saves the data in the local patientsdb sqlite database. Users that are not yet in the local patientsdb can not be added to the prescription.

how do I reset the Make command?

I ran make amiko once. But now I would like to run it again. When I run it a second time, I get the output:

amiko is already up-to-date

doing make clean did not help.

Boot Screen and Icon in top left corner wrong after gradle build

The gradle Build is working in Android Studio. 👍

  1. Boot Screen Image is not correct. It should be the Desitin Logo. See Video below.
  2. The Icon in the top left corner is not correct. Should be the Desitin Pill.
  3. See https://ywesee.slack.com/files/U27FC8WLA/FENU7CQU9/20181210_084403.mp4

The App can be build for two different flavors: a) Desitin (default, we want this one) b) Med-Drugs.

The Icon you are using at the moment in the top left corner is the Med-Drugs Icon for the med-drugs build.

Chapter links not working anymore.

  1. Open The App
  2. Search for "Ponstan" in the "Präparat" Tab.
  3. Select Ponstan
  4. Swipe from right to left to get the chapter links.
  5. Select any chapter
  6. Error shows up. See below [ This works on AmiKo for iPhone/iPad ]
    martinfries

Only show bottom tabbar when list view for search result is used.

  1. Open App.
  2. Search for Ponstan.
  3. Bottom tabbar is shown.
  4. Click on a result in the list view.
  5. Fachinfo is shown.
  6. Now the bottom tabbar should disappear so we have more room for the Fachinfo-Text to be shown. This is the same behavior like on iOS.
  7. Now swip Fachinfo from left-to-right. You are back in the search-result list-view. No the bottom tabbar should be shown again.
  8. Same behavior should happen in landscape mode.

Also please observe behavior on iOS when selecting interactions:

  1. Open App.
  2. Select Interactions. Now the bottom tabbar should disappear, like on iOS.
  3. If you swipe from left to right again, then the tabbar will reappear because you are back in the list view to search a drug, the tapped drug will then be added to the interactions basket.

running App in Android Studio gives strange simulator Error

I am starting AmiKo-Android in Android-Studio 3.2.1 for Mac with the the following simulators:

Nexus_5X_API_28_x86
Pixel_2_API_28

and I always get the following error:

12-12 11:59:45.972  2786  5310 I FontsPackageChangeOp: Package com.ywesee.amiko.de has no metadata
12-12 11:59:45.974  5429  5429 W ywesee.amiko.d: Unexpected CPU variant for X86 using defaults: x86
12-12 11:59:46.068  5429  5429 I ywesee.amiko.d: The ClassLoaderContext is a special shared library.
12-12 11:59:46.161  5429  5429 W ywesee.amiko.d: JIT profile information will not be recorded: profile file does not exits.
12-12 11:59:46.164  5429  5429 I chatty  : uid=10085(com.ywesee.amiko.de) identical 10 lines
12-12 11:59:46.164  5429  5429 W ywesee.amiko.d: JIT profile information will not be recorded: profile file does not exits.
12-12 11:59:46.418  5429  5460 D DataBaseHelper: Copying file amiko_db_full_idx_de.db to /data/user/0/com.ywesee.amiko.de/databases/
12-12 11:59:46.513  5429  5460 E AndroidRuntime: Process: com.ywesee.amiko.de, PID: 5429
12-12 11:59:46.513  5429  5460 E AndroidRuntime: 	at com.ywesee.amiko.DataBaseHelper.copyFilesFromNonPersistentFolder(DataBaseHelper.java:136)
12-12 11:59:46.513  5429  5460 E AndroidRuntime: 	at com.ywesee.amiko.DBAdapter.create(DBAdapter.java:193)
12-12 11:59:46.513  5429  5460 E AndroidRuntime: 	at com.ywesee.amiko.MainActivity$AsyncLoadDBTask.doInBackground(MainActivity.java:1085)
12-12 11:59:46.513  5429  5460 E AndroidRuntime: 	at com.ywesee.amiko.MainActivity$AsyncLoadDBTask.doInBackground(MainActivity.java:1061)
12-12 11:59:46.514  5429  5429 I System.out: Found application data folder is in /data/user/0/com.ywesee.amiko.de/files
12-12 11:59:46.539  1868  1918 W ActivityManager: Receiver with filter android.content.IntentFilter@80adc77 already registered for pid 5429, callerPackage is com.ywesee.amiko.de
12-12 11:59:46.552  1868  2639 W ActivityManager:   Force finishing activity com.ywesee.amiko.de/com.ywesee.amiko.MainActivity
12-12 11:59:46.572  1868  1883 I ActivityManager: Showing crash dialog for package com.ywesee.amiko.de u0
12-12 11:59:46.668  2644  4770 W ziparchive: Unable to open '/data/app/com.ywesee.amiko.de-4U8cXBJzSPZMF8IA_TRAyQ==/base.apk': No such file or directory
12-12 11:59:46.668  2644  4770 E s.nexuslaunche: Failed to open APK '/data/app/com.ywesee.amiko.de-4U8cXBJzSPZMF8IA_TRAyQ==/base.apk' I/O error
12-12 11:59:46.669  2644  4770 E ResourcesManager: failed to add asset path /data/app/com.ywesee.amiko.de-4U8cXBJzSPZMF8IA_TRAyQ==/base.apk
12-12 11:59:46.669  2644  4770 W PackageManager: Failure retrieving resources for com.ywesee.amiko.de
12-12 11:59:46.806  1712  1712 D SurfaceFlinger: duplicate layer name: changing com.ywesee.amiko.de/com.ywesee.amiko.MainActivity to com.ywesee.amiko.de/com.ywesee.amiko.MainActivity#1

Sort swiped address book entries by last name, first name.

  1. Sort swiped-in address book entries by: last name, first name.
  2. Add search bar at top of swiped-in page, like on iOS.
  3. If I click Save the data is not saved to the AmiKo address book.
  4. In the AmiKo address book show the entries like: last name, first name. Like on iOS.

Saved prescriptions list for patient

From the prescription view #21 with a selected patient you can swipe from right to left. It will show you the list of saved prescriptions. Longtap on a prescription you can either Cancel or Delete the prescription from the list.

1.4.6 crash log

Samsung Galaxy S9 (starlte), Android 9
Bericht 1 von 1
java.lang.NullPointerException:
at com.ywesee.amiko.MainActivity.onConfigurationChanged (MainActivity.java:1332)
at android.app.ActivityThread.performActivityConfigurationChanged (ActivityThread.java:5267)
at android.app.ActivityThread.performConfigurationChangedForActivity (ActivityThread.java:5121)
at android.app.ActivityThread.performConfigurationChangedForActivity (ActivityThread.java:5099)
at android.app.ActivityThread.handleActivityConfigurationChanged (ActivityThread.java:5500)

The full crash log:

https://play.google.com/apps/publish/?account=4921779936452011385#AndroidMetricsErrorsPlace:p=com.ywesee.amiko.fr&appid=4973390717187410713&appVersion=PRODUCTION&clusterName=apps/com.ywesee.amiko.fr/clusters/8d54c1c7&detailsAppVersion=PRODUCTION&detailsSpan=7

Print single Package Label

the Print Label option should show as first option when longtapping on a package in the prescription view.

The formatting for the package label to be printed has to have the same format like on iOS and macOS.

See zdavatz/amiko-osx#16 as a reference.

SQLiteLog: (1) no such table: amikodb

I am still getting below error after updating to Version 1.4.4 via the Store and then doing the Database update. My device is Android 9.0. Download and unzipping works fine but after initializing the new Database I get SQLiteLog: (1) no such table: amikodb

The full log after initializing is:

02-12 21:37:55.393   809   809 D SurfaceFlinger: duplicate layer name: changing com.ywesee.amiko.de/com.ywesee.amiko.MainActivity to com.ywesee.amiko.de/com.ywesee.amiko.MainActivity#2
02-12 21:37:55.399  1964  1998 I NotificationService: cancelToast pkg=com.ywesee.amiko.de callback=android.app.ITransientNotification$Stub$Proxy@1d811d9
02-12 21:37:55.399  1964  1998 W NotificationService: Toast already cancelled. pkg=com.ywesee.amiko.de callback=android.app.ITransientNotification$Stub$Proxy@1d811d9
02-12 21:37:57.390  1964  3393 W NotificationService: Toast already killed. pkg=com.ywesee.amiko.de callback=android.app.ITransientNotification$Stub$Proxy@dd4a7b2
02-12 21:38:06.839  9822 10634 D DataBaseHelper: Unzipped file amiko_db_full_idx_de.db (244370kB)
02-12 21:38:06.839  9822 10634 D DataBaseHelper: checking database /data/user/0/com.ywesee.amiko.de/databases/amiko_report_de.html
02-12 21:38:12.781  9822 10634 D DataBaseHelper: opening database /data/user/0/com.ywesee.amiko.de/databases/amiko_db_full_idx_de.db...
02-12 21:38:12.784  9822 10634 E SQLiteLog: (1) no such table: amikodb
02-12 21:38:13.175  9822  9832 I ywesee.amiko.d: Background concurrent copying GC freed 398302(18MB) AllocSpace objects, 0(0B) LOS objects, 28% free, 59MB/83MB, paused 88us total 115.244ms
02-12 21:38:13.751  9822  9832 I ywesee.amiko.d: Background concurrent copying GC freed 133956(17MB) AllocSpace objects, 0(0B) LOS objects, 24% free, 72MB/96MB, paused 85us total 177.838ms
02-12 21:38:13.952  9822 10649 E SQLiteLog: (1) no such table: amikodb
02-12 21:38:13.999  1964  8210 I NotificationService: cancelToast pkg=com.ywesee.amiko.de callback=android.app.ITransientNotification$Stub$Proxy@aa76547

Save Patient address

Saving the patient address into a sqlite DB #28. The patient address has the following fields:
Name
Surname
Street
City
ZIP
Country
Brithday DD.MM.JJJJ
Sex m/f
Weight kg
Height cm
Phone
Email

Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Selecting an image still results in the following error

  1. Open the AmiK Desitin.
  2. Select Arzt from top right menu
  3. Select Sign mit Photo
  4. Results in the following Crash
01-17 15:24:51.485  2044  6599 D ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{d102488 com.ywesee.amiko.de} is now in focus and seems to be in full-screen mode
01-17 15:24:51.485  2044  6599 E ActivityTrigger: activityResumeTrigger: not whiteListedcom.ywesee.amiko.de/com.ywesee.amiko.DoctorActivity/142
01-17 15:24:51.517 22503 22503 E AndroidRuntime: Process: com.ywesee.amiko.de, PID: 22503
01-17 15:24:51.517 22503 22503 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:2533 flg=0x1 }} to activity {com.ywesee.amiko.de/com.ywesee.amiko.DoctorActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
01-17 15:24:51.517 22503 22503 E AndroidRuntime:        at com.ywesee.amiko.DoctorActivity.saveSignatureImage(DoctorActivity.java:186)
01-17 15:24:51.517 22503 22503 E AndroidRuntime:        at com.ywesee.amiko.DoctorActivity.onActivityResult(DoctorActivity.java:171)
01-17 15:24:51.520  2044  6077 W ActivityManager:   Force finishing activity com.ywesee.amiko.de/com.ywesee.amiko.DoctorActivity
01-17 15:24:51.525  2044  2117 I ActivityManager: Showing crash dialog for package com.ywesee.amiko.de u0
01-17 15:24:52.021  2044  2116 W ActivityManager: Activity pause timeout for ActivityRecord{7f16ca5 u0 com.ywesee.amiko.de/com.ywesee.amiko.DoctorActivity t678 f}
01-17 15:24:52.024  2044  2116 D ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{844fa39 com.ywesee.amiko.de} is now in focus and seems to be in full-screen mode
01-17 15:24:52.024  2044  2116 E ActivityTrigger: activityResumeTrigger: not whiteListedcom.ywesee.amiko.de/com.ywesee.amiko.MainActivity/142

You can find the Error if you do
adb logcat | grep amiko

This may help: https://commonsware.com/blog/2016/03/15/how-consume-content-uri.html

Add gradle build option for "CoMed"

The French version of the app is called "CoMed Desitin". We have to be able to build "CoMed_Desitin.apk" using gradle as well. Building "CoMed Desitin" should select the French database.

Note:
On iOS we localized the App so the language of the App is selected based on the language settings for the device. So in the Future we could just release one App and add a settings field for the database selection.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.